18393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius/* 28393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius ******************************************************************************* 3fceb39872958b9fa2505e63f8b8699a9e0f882f4ccornelius * Copyright (C) 2014, International Business Machines Corporation and others. 48393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * All Rights Reserved. 58393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius ******************************************************************************* 68393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius */ 78393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius 88393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius#ifndef REGION_H 98393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius#define REGION_H 108393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius 118393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius/** 128393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * \file 138393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * \brief C++ API: Region classes (territory containment) 148393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius */ 158393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius 168393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius#include "unicode/utypes.h" 1759d709d503bab6e2b61931737e662dd293b40578ccornelius#include "unicode/uregion.h" 188393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius 198393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius#if !UCONFIG_NO_FORMATTING 208393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius 218393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius#include "unicode/uobject.h" 228393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius#include "unicode/uniset.h" 238393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius#include "unicode/unistr.h" 248393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius#include "unicode/strenum.h" 258393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius 268393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig CorneliusU_NAMESPACE_BEGIN 278393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius 288393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius/** 298393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * <code>Region</code> is the class representing a Unicode Region Code, also known as a 308393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * Unicode Region Subtag, which is defined based upon the BCP 47 standard. We often think of 318393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * "regions" as "countries" when defining the characteristics of a locale. Region codes There are different 328393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * types of region codes that are important to distinguish. 338393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * <p> 348393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * Macroregion - A code for a "macro geographical (continental) region, geographical sub-region, or 358393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * selected economic and other grouping" as defined in 368393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * UN M.49 (http://unstats.un.org/unsd/methods/m49/m49regin.htm). 378393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * These are typically 3-digit codes, but contain some 2-letter codes, such as the LDML code QO 388393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * added for Outlying Oceania. Not all UNM.49 codes are defined in LDML, but most of them are. 398393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * Macroregions are represented in ICU by one of three region types: WORLD ( region code 001 ), 408393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * CONTINENTS ( regions contained directly by WORLD ), and SUBCONTINENTS ( things contained directly 418393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * by a continent ). 428393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * <p> 438393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * TERRITORY - A Region that is not a Macroregion. These are typically codes for countries, but also 448393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * include areas that are not separate countries, such as the code "AQ" for Antarctica or the code 458393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * "HK" for Hong Kong (SAR China). Overseas dependencies of countries may or may not have separate 468393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * codes. The codes are typically 2-letter codes aligned with the ISO 3166 standard, but BCP47 allows 478393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * for the use of 3-digit codes in the future. 488393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * <p> 498393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * UNKNOWN - The code ZZ is defined by Unicode LDML for use to indicate that the Region is unknown, 508393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * or that the value supplied as a region was invalid. 518393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * <p> 528393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * DEPRECATED - Region codes that have been defined in the past but are no longer in modern usage, 538393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * usually due to a country splitting into multiple territories or changing its name. 548393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * <p> 558393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * GROUPING - A widely understood grouping of territories that has a well defined membership such 568393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * that a region code has been assigned for it. Some of these are UNM.49 codes that do't fall into 578393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * the world/continent/sub-continent hierarchy, while others are just well known groupings that have 588393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * their own region code. Region "EU" (European Union) is one such region code that is a grouping. 598393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * Groupings will never be returned by the getContainingRegion() API, since a different type of region 608393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * ( WORLD, CONTINENT, or SUBCONTINENT ) will always be the containing region instead. 618393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * 628393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * The Region class is not intended for public subclassing. 638393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * 648393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * @author John Emmons 65fceb39872958b9fa2505e63f8b8699a9e0f882f4ccornelius * @stable ICU 51 668393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius */ 678393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius 688393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Corneliusclass U_I18N_API Region : public UObject { 698393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Corneliuspublic: 708393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius /** 718393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * Destructor. 72fceb39872958b9fa2505e63f8b8699a9e0f882f4ccornelius * @stable ICU 51 738393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius */ 748393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius virtual ~Region(); 758393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius 768393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius /** 778393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * Returns true if the two regions are equal. 78fceb39872958b9fa2505e63f8b8699a9e0f882f4ccornelius * @stable ICU 51 798393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius */ 808393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius UBool operator==(const Region &that) const; 818393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius 828393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius /** 838393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * Returns true if the two regions are NOT equal; that is, if operator ==() returns false. 84fceb39872958b9fa2505e63f8b8699a9e0f882f4ccornelius * @stable ICU 51 858393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius */ 868393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius UBool operator!=(const Region &that) const; 878393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius 888393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius /** 898393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * Returns a pointer to a Region using the given region code. The region code can be either 2-letter ISO code, 908393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * 3-letter ISO code, UNM.49 numeric code, or other valid Unicode Region Code as defined by the LDML specification. 918393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * The identifier will be canonicalized internally using the supplemental metadata as defined in the CLDR. 928393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * If the region code is NULL or not recognized, the appropriate error code will be set ( U_ILLEGAL_ARGUMENT_ERROR ) 93fceb39872958b9fa2505e63f8b8699a9e0f882f4ccornelius * @stable ICU 51 948393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius */ 958393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius static const Region* U_EXPORT2 getInstance(const char *region_code, UErrorCode &status); 968393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius 978393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius /** 988393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * Returns a pointer to a Region using the given numeric region code. If the numeric region code is not recognized, 998393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * the appropriate error code will be set ( U_ILLEGAL_ARGUMENT_ERROR ). 100fceb39872958b9fa2505e63f8b8699a9e0f882f4ccornelius * @stable ICU 51 1018393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius */ 1028393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius static const Region* U_EXPORT2 getInstance (int32_t code, UErrorCode &status); 1038393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius 104fceb39872958b9fa2505e63f8b8699a9e0f882f4ccornelius#ifndef U_HIDE_DRAFT_API 1058393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius /** 1068393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * Returns an enumeration over the IDs of all known regions that match the given type. 107fceb39872958b9fa2505e63f8b8699a9e0f882f4ccornelius * @draft ICU 51 1088393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius */ 1098393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius static StringEnumeration* U_EXPORT2 getAvailable(URegionType type); 110fceb39872958b9fa2505e63f8b8699a9e0f882f4ccornelius#endif /* U_HIDE_DRAFT_API */ 1118393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius 1128393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius /** 1138393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * Returns a pointer to the region that contains this region. Returns NULL if this region is code "001" (World) 1148393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * or "ZZ" (Unknown region). For example, calling this method with region "IT" (Italy) returns the 1158393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * region "039" (Southern Europe). 116fceb39872958b9fa2505e63f8b8699a9e0f882f4ccornelius * @stable ICU 51 1178393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius */ 1188393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius const Region* getContainingRegion() const; 1198393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius 1208393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius /** 1218393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * Return a pointer to the region that geographically contains this region and matches the given type, 1228393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * moving multiple steps up the containment chain if necessary. Returns NULL if no containing region can be found 1238393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * that matches the given type. Note: The URegionTypes = "URGN_GROUPING", "URGN_DEPRECATED", or "URGN_UNKNOWN" 1248393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * are not appropriate for use in this API. NULL will be returned in this case. For example, calling this method 1258393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * with region "IT" (Italy) for type "URGN_CONTINENT" returns the region "150" ( Europe ). 126fceb39872958b9fa2505e63f8b8699a9e0f882f4ccornelius * @stable ICU 51 1278393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius */ 1288393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius const Region* getContainingRegion(URegionType type) const; 1298393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius 130fceb39872958b9fa2505e63f8b8699a9e0f882f4ccornelius#ifndef U_HIDE_DRAFT_API 1318393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius /** 1328393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * Return an enumeration over the IDs of all the regions that are immediate children of this region in the 1338393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * region hierarchy. These returned regions could be either macro regions, territories, or a mixture of the two, 1348393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * depending on the containment data as defined in CLDR. This API may return NULL if this region doesn't have 1358393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * any sub-regions. For example, calling this method with region "150" (Europe) returns an enumeration containing 1368393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * the various sub regions of Europe - "039" (Southern Europe) - "151" (Eastern Europe) - "154" (Northern Europe) 1378393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * and "155" (Western Europe). 1388393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * @draft ICU 51 1398393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius */ 1408393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius StringEnumeration* getContainedRegions() const; 1418393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius 1428393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius /** 1438393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * Returns an enumeration over the IDs of all the regions that are children of this region anywhere in the region 1448393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * hierarchy and match the given type. This API may return an empty enumeration if this region doesn't have any 1458393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * sub-regions that match the given type. For example, calling this method with region "150" (Europe) and type 1468393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * "URGN_TERRITORY" returns a set containing all the territories in Europe ( "FR" (France) - "IT" (Italy) - "DE" (Germany) etc. ) 1478393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * @draft ICU 51 1488393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius */ 1498393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius StringEnumeration* getContainedRegions( URegionType type ) const; 150fceb39872958b9fa2505e63f8b8699a9e0f882f4ccornelius#endif /* U_HIDE_DRAFT_API */ 1518393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius 1528393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius /** 1538393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * Returns true if this region contains the supplied other region anywhere in the region hierarchy. 154fceb39872958b9fa2505e63f8b8699a9e0f882f4ccornelius * @stable ICU 51 1558393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius */ 1568393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius UBool contains(const Region &other) const; 1578393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius 158fceb39872958b9fa2505e63f8b8699a9e0f882f4ccornelius#ifndef U_HIDE_DRAFT_API 1598393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius /** 1608393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * For deprecated regions, return an enumeration over the IDs of the regions that are the preferred replacement 1618393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * regions for this region. Returns null for a non-deprecated region. For example, calling this method with region 1628393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * "SU" (Soviet Union) would return a list of the regions containing "RU" (Russia), "AM" (Armenia), "AZ" (Azerbaijan), etc... 1638393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * @draft ICU 51 1648393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius */ 1658393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius StringEnumeration* getPreferredValues() const; 166fceb39872958b9fa2505e63f8b8699a9e0f882f4ccornelius #endif /* U_HIDE_DRAFT_API */ 1678393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius 1688393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius /** 1698393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * Return this region's canonical region code. 170fceb39872958b9fa2505e63f8b8699a9e0f882f4ccornelius * @stable ICU 51 1718393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius */ 1728393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius const char* getRegionCode() const; 1738393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius 1748393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius /** 1758393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * Return this region's numeric code. 1768393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * Returns a negative value if the given region does not have a numeric code assigned to it. 177fceb39872958b9fa2505e63f8b8699a9e0f882f4ccornelius * @stable ICU 51 1788393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius */ 1798393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius int32_t getNumericCode() const; 1808393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius 1818393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius /** 1828393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * Returns the region type of this region. 183fceb39872958b9fa2505e63f8b8699a9e0f882f4ccornelius * @stable ICU 51 1848393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius */ 1858393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius URegionType getType() const; 1868393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius 1878393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius#ifndef U_HIDE_INTERNAL_API 1888393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius /** 1898393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * Cleans up statically allocated memory. 1908393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * @internal 1918393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius */ 1928393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius static void cleanupRegionData(); 1938393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius#endif /* U_HIDE_INTERNAL_API */ 1948393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius 1958393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Corneliusprivate: 1968393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius char id[4]; 1978393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius UnicodeString idStr; 1988393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius int32_t code; 1998393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius URegionType type; 2008393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius Region *containingRegion; 2018393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius UVector *containedRegions; 2028393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius UVector *preferredValues; 2038393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius 2048393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius /** 2058393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * Default Constructor. Internal - use factory methods only. 2068393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius */ 2078393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius Region(); 2088393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius 2098393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius 2108393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius /* 2118393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * Initializes the region data from the ICU resource bundles. The region data 2128393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * contains the basic relationships such as which regions are known, what the numeric 2138393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * codes are, any known aliases, and the territory containment data. 2148393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * 2158393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * If the region data has already loaded, then this method simply returns without doing 2168393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius * anything meaningful. 2178393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius */ 2188393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius 2198393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius static void loadRegionData(); 2208393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius 2218393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius}; 2228393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius 2238393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig CorneliusU_NAMESPACE_END 2248393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius 22559d709d503bab6e2b61931737e662dd293b40578ccornelius#endif /* #if !UCONFIG_NO_FORMATTING */ 2268393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius#endif // REGION_H 2278393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius 2288393335b955da7340c9f19b1b4b2d6c0c2c04be7Craig Cornelius//eof 229