Lines Matching full:region

10 * File REGION.CPP
20 * \brief C++ API: Region classes (territory containment)
23 #include "unicode/region.h"
44 delete (icu::Region *)obj; in deleteRegion()
52 icu::Region::cleanupRegionData(); in region_cleanup()
77 * Initializes the region data from the ICU resource bundles. The region data in UOBJECT_DEFINE_RTTI_IMPLEMENTATION()
81 * If the region data has already loaded, then this method simply returns without doing in UOBJECT_DEFINE_RTTI_IMPLEMENTATION()
84 void U_CALLCONV Region::loadRegionData(UErrorCode &status) { in UOBJECT_DEFINE_RTTI_IMPLEMENTATION()
103 …LocalUResourceBundlePointer regionList(ures_getByKey(idValidity.getAlias(),"region",NULL,&status)); in UOBJECT_DEFINE_RTTI_IMPLEMENTATION()
183 LocalPointer<Region> r(new Region(), status); in UOBJECT_DEFINE_RTTI_IMPLEMENTATION()
214 const Region *aliasToRegion = (Region *) uhash_get(newRegionIDMap.getAlias(),&aliasTo); in UOBJECT_DEFINE_RTTI_IMPLEMENTATION()
215Region *aliasFromRegion = (Region *)uhash_get(newRegionIDMap.getAlias(),aliasFromStr.getAlias()); in UOBJECT_DEFINE_RTTI_IMPLEMENTATION()
217 …Region != NULL && aliasFromRegion == NULL ) { // This is just an alias from some string to a region in UOBJECT_DEFINE_RTTI_IMPLEMENTATION()
220 …romRegion == NULL ) { // Deprecated region code not in the primary codes list - so need to create … in UOBJECT_DEFINE_RTTI_IMPLEMENTATION()
221 LocalPointer<Region> newRgn(new Region, status); in UOBJECT_DEFINE_RTTI_IMPLEMENTATION()
257Region *target = (Region *)uhash_get(newRegionIDMap.getAlias(),(void *)&currentRegion); in UOBJECT_DEFINE_RTTI_IMPLEMENTATION()
276 Region *r = (Region *)uhash_get(newRegionIDMap.getAlias(),(void *)&codeMappingID); in UOBJECT_DEFINE_RTTI_IMPLEMENTATION()
292 Region *r; in UOBJECT_DEFINE_RTTI_IMPLEMENTATION()
294 r = (Region *) uhash_get(newRegionIDMap.getAlias(),(void *)&WORLD_ID_STRING); in UOBJECT_DEFINE_RTTI_IMPLEMENTATION()
300 r = (Region *) uhash_get(newRegionIDMap.getAlias(),(void *)&UNKNOWN_REGION_ID_STRING); in UOBJECT_DEFINE_RTTI_IMPLEMENTATION()
306 r = (Region *) uhash_get(newRegionIDMap.getAlias(),(void *)continents->elementAt(i)); in UOBJECT_DEFINE_RTTI_IMPLEMENTATION()
313 r = (Region *) uhash_get(newRegionIDMap.getAlias(),(void *)groupings->elementAt(i)); in UOBJECT_DEFINE_RTTI_IMPLEMENTATION()
319 // Special case: The region code "QO" (Outlying Oceania) is a subcontinent code added by CLDR in UOBJECT_DEFINE_RTTI_IMPLEMENTATION()
323 r = (Region *) uhash_get(newRegionIDMap.getAlias(),(void *)&OUTLYING_OCEANIA_REGION_ID_STRING); in UOBJECT_DEFINE_RTTI_IMPLEMENTATION()
340 Region *parentRegion = (Region *) uhash_get(newRegionIDMap.getAlias(),(void *)&parentStr); in UOBJECT_DEFINE_RTTI_IMPLEMENTATION()
344 Region *childRegion = (Region *) uhash_get(newRegionIDMap.getAlias(),(void *)&child); in UOBJECT_DEFINE_RTTI_IMPLEMENTATION()
347 // Add the child region to the set of regions contained by the parent in UOBJECT_DEFINE_RTTI_IMPLEMENTATION()
359 // Set the parent region to be the containing region of the child. in UOBJECT_DEFINE_RTTI_IMPLEMENTATION()
360 // Regions of type GROUPING can't be set as the parent, since another region in UOBJECT_DEFINE_RTTI_IMPLEMENTATION()
372 Region *ar = (Region *)element->value.pointer; in UOBJECT_DEFINE_RTTI_IMPLEMENTATION()
391 void Region::cleanupRegionData() { in cleanupRegionData()
420 Region::Region () in Region() function in Region
429 Region::~Region () { in ~Region()
440 * Per PMC, just use pointer compare, since we have at most one instance of each Region.
443 Region::operator==(const Region &that) const { in operator ==()
449 * Per PMC, just use pointer compare, since we have at most one instance of each Region.
452 Region::operator!=(const Region &that) const { in operator !=()
457 …* Returns a pointer to a Region using the given region code. The region code can be either 2-lett…
458 …* 3-letter ISO code, UNM.49 numeric code, or other valid Unicode Region Code as defined by the LD…
460 …* If the region code is NULL or not recognized, the appropriate error code will be set ( U_ILLEGAL…
462 const Region* U_EXPORT2
463 Region::getInstance(const char *region_code, UErrorCode &status) { in getInstance()
476 Region *r = (Region *)uhash_get(regionIDMap,(void *)&regionCodeString); in getInstance()
479 r = (Region *)uhash_get(regionAliases,(void *)&regionCodeString); in getInstance()
482 if ( !r ) { // Unknown region code in getInstance()
491 r = (Region *)uhash_get(regionIDMap,(void *)ustr); in getInstance()
500 …* Returns a pointer to a Region using the given numeric region code. If the numeric region code is…
503 const Region* U_EXPORT2
504 Region::getInstance (int32_t code, UErrorCode &status) { in getInstance()
511 Region *r = (Region *)uhash_iget(numericCodeMap,code); in getInstance()
516 r = (Region *)uhash_get(regionAliases,&id); in getInstance()
532 r = (Region *)uhash_get(regionIDMap,(void *)ustr); in getInstance()
544 Region::getAvailable(URegionType type, UErrorCode &status) { in getAvailable()
553 …* Returns a pointer to the region that contains this region. Returns NULL if this region is code …
554 * or "ZZ" (Unknown region). For example, calling this method with region "IT" (Italy) returns the
555 * region "039" (Southern Europe).
557 const Region*
558 Region::getContainingRegion() const { in getContainingRegion()
565 …* Return a pointer to the region that geographically contains this region and matches the given ty…
566 …ple steps up the containment chain if necessary. Returns NULL if no containing region can be found
569 * with region "IT" (Italy) for type "URGN_CONTINENT" returns the region "150" ( Europe ).
571 const Region*
572 Region::getContainingRegion(URegionType type) const { in getContainingRegion()
583 …* Return an enumeration over the IDs of all the regions that are immediate children of this region
584 …* region hierarchy. These returned regions could be either macro regions, territories, or a mixtur…
585 …* depending on the containment data as defined in CLDR. This API may return NULL if this region d…
586 …* any sub-regions. For example, calling this method with region "150" (Europe) returns an enumerat…
591 Region::getContainedRegions(UErrorCode &status) const { in getContainedRegions()
600 …enumeration over the IDs of all the regions that are children of this region anywhere in the region
601 …* hierarchy and match the given type. This API may return an empty enumeration if this region doe…
602 …* sub-regions that match the given type. For example, calling this method with region "150" (Europ…
606 Region::getContainedRegions( URegionType type, UErrorCode &status ) const { in getContainedRegions()
618 const Region *r = Region::getInstance(regionId,status); in getContainedRegions()
625 const Region *r2 = Region::getInstance(id2,status); in getContainedRegions()
638 * Returns true if this region contains the supplied other region anywhere in the region hierarchy.
641 Region::contains(const Region &other) const { in contains()
653 Region *cr = (Region *) uhash_get(regionIDMap,(void *)crStr); in contains()
665 …* regions for this region. Returns NULL for a non-deprecated region. For example, calling this m…
669 Region::getPreferredValues(UErrorCode &status) const { in getPreferredValues()
679 * Return this region's canonical region code.
682 Region::getRegionCode() const { in getRegionCode()
687 Region::getNumericCode() const { in getNumericCode()
692 * Returns the region type of this region.
695 Region::getType() const { in getType()