/usr/include/unicode
NameSizeModeActions
alphaindex.h271180644editdlrm
appendable.h86940644editdlrm
basictz.h94910644editdlrm
brkiter.h284640644editdlrm
bytestream.h110370644editdlrm
bytestrie.h212660644editdlrm
bytestriebuilder.h72480644editdlrm
calendar.h1082780644editdlrm
caniter.h76110644editdlrm
casemap.h259330644editdlrm
char16ptr.h73930644editdlrm
chariter.h246320644editdlrm
choicfmt.h244820644editdlrm
coleitr.h140940644editdlrm
coll.h575810644editdlrm
compactdecimalformat.h70470644editdlrm
curramt.h38510644editdlrm
currpinf.h74730644editdlrm
currunit.h40940644editdlrm
datefmt.h416410644editdlrm
dbbi.h12230644editdlrm
dcfmtsym.h208970644editdlrm
decimfmt.h892780644editdlrm
docmain.h71420644editdlrm
dtfmtsym.h386090644editdlrm
dtintrv.h39300644editdlrm
dtitvfmt.h476340644editdlrm
dtitvinf.h190640644editdlrm
dtptngen.h264190644editdlrm
dtrule.h88880644editdlrm
edits.h212370644editdlrm
enumset.h21300644editdlrm
errorcode.h49560644editdlrm
fieldpos.h88990644editdlrm
filteredbrk.h55010644editdlrm
fmtable.h250070644editdlrm
format.h128020644editdlrm
formattedvalue.h99870644editdlrm
fpositer.h31090644editdlrm
gender.h34080644editdlrm
gregocal.h324720644editdlrm
icudataver.h10510644editdlrm
icuplug.h121660644editdlrm
idna.h130000644editdlrm
listformatter.h94930644editdlrm
localebuilder.h115020644editdlrm
localematcher.h251470644editdlrm
localpointer.h198290644editdlrm
locdspnm.h72920644editdlrm
locid.h488210644editdlrm
measfmt.h116030644editdlrm
measunit.h975630644editdlrm
measure.h44230644editdlrm
messagepattern.h345210644editdlrm
msgfmt.h451680644editdlrm
normalizer2.h348510644editdlrm
normlzr.h316820644editdlrm
nounit.h27540644editdlrm
numberformatter.h862760644editdlrm
numberrangeformatter.h286170644editdlrm
numfmt.h509500644editdlrm
numsys.h75000644editdlrm
parseerr.h31550644editdlrm
parsepos.h56920644editdlrm
platform.h287510644editdlrm
plurfmt.h258000644editdlrm
plurrule.h187800644editdlrm
ptypes.h35770644editdlrm
putil.h64870644editdlrm
rbbi.h272180644editdlrm
rbnf.h498990644editdlrm
rbtz.h159790644editdlrm
regex.h863670644editdlrm
region.h94040644editdlrm
reldatefmt.h228010644editdlrm
rep.h95990644editdlrm
resbund.h185030644editdlrm
schriter.h64750644editdlrm
scientificnumberformatter.h65530644editdlrm
search.h227570644editdlrm
selfmt.h146430644editdlrm
simpleformatter.h128880644editdlrm
simpletz.h465270644editdlrm
smpdtfmt.h727130644editdlrm
sortkey.h114440644editdlrm
std_string.h10760644editdlrm
strenum.h101580644editdlrm
stringoptions.h59260644editdlrm
stringpiece.h105970644editdlrm
stringtriebuilder.h156980644editdlrm
stsearch.h218100644editdlrm
symtable.h43740644editdlrm
tblcoll.h374890644editdlrm
timezone.h420050644editdlrm
tmunit.h34610644editdlrm
tmutamt.h50150644editdlrm
tmutfmt.h80420644editdlrm
translit.h674000644editdlrm
tzfmt.h439160644editdlrm
tznames.h172520644editdlrm
tzrule.h362150644editdlrm
tztrans.h62710644editdlrm
ubidi.h917110644editdlrm
ubiditransform.h129500644editdlrm
ubrk.h245470644editdlrm
ucal.h582650644editdlrm
ucasemap.h155460644editdlrm
ucat.h54840644editdlrm
uchar.h1446300644editdlrm
ucharstrie.h231200644editdlrm
ucharstriebuilder.h73780644editdlrm
uchriter.h135210644editdlrm
uclean.h114740644editdlrm
ucnv.h850850644editdlrm
ucnvsel.h62830644editdlrm
ucnv_cb.h67480644editdlrm
ucnv_err.h214920644editdlrm
ucol.h629390644editdlrm
ucoleitr.h96840644editdlrm
uconfig.h123560644editdlrm
ucpmap.h56630644editdlrm
ucptrie.h230020644editdlrm
ucsdet.h150180644editdlrm
ucurr.h165070644editdlrm
udat.h628510644editdlrm
udata.h159300644editdlrm
udateintervalformat.h109950644editdlrm
udatpg.h274470644editdlrm
udisplaycontext.h60290644editdlrm
uenum.h79700644editdlrm
ufieldpositer.h44610644editdlrm
uformattable.h111980644editdlrm
uformattedvalue.h124130644editdlrm
ugender.h20520644editdlrm
uidna.h341690644editdlrm
uiter.h233190644editdlrm
uldnames.h107020644editdlrm
ulistformatter.h110860644editdlrm
uloc.h544320644editdlrm
ulocdata.h115330644editdlrm
umachine.h148840644editdlrm
umisc.h13650644editdlrm
umsg.h248120644editdlrm
umutablecptrie.h84350644editdlrm
unifilt.h40550644editdlrm
unifunct.h41410644editdlrm
unimatch.h62440644editdlrm
unirepl.h34640644editdlrm
uniset.h664590644editdlrm
unistr.h1745230644editdlrm
unorm.h210150644editdlrm
unorm2.h252540644editdlrm
unum.h547430644editdlrm
unumberformatter.h258240644editdlrm
unumsys.h73870644editdlrm
uobject.h109360644editdlrm
upluralrules.h80130644editdlrm
uregex.h737840644editdlrm
uregion.h100730644editdlrm
ureldatefmt.h174090644editdlrm
urename.h1344490644editdlrm
urep.h55070644editdlrm
ures.h374150644editdlrm
uscript.h278670644editdlrm
usearch.h390390644editdlrm
uset.h409580644editdlrm
usetiter.h97810644editdlrm
ushape.h184320644editdlrm
uspoof.h674800644editdlrm
usprep.h83310644editdlrm
ustdio.h394690644editdlrm
ustream.h19340644editdlrm
ustring.h742110644editdlrm
ustringtrie.h32240644editdlrm
utext.h595270644editdlrm
utf.h80460644editdlrm
utf8.h317000644editdlrm
utf16.h238780644editdlrm
utf32.h7630644editdlrm
utf_old.h469290644editdlrm
utmscale.h141130644editdlrm
utrace.h177060644editdlrm
utrans.h261300644editdlrm
utypes.h314810644editdlrm
uvernum.h68320644editdlrm
uversion.h61450644editdlrm
vtzone.h207840644editdlrm
Edit: /usr/include/unicode/region.h (9404B)
// © 2016 and later: Unicode, Inc. and others. // License & terms of use: http://www.unicode.org/copyright.html /* ******************************************************************************* * Copyright (C) 2014-2016, International Business Machines Corporation and others. * All Rights Reserved. ******************************************************************************* */ #ifndef REGION_H #define REGION_H /** * \file * \brief C++ API: Region classes (territory containment) */ #include "unicode/utypes.h" #if U_SHOW_CPLUSPLUS_API #if !UCONFIG_NO_FORMATTING #include "unicode/uregion.h" #include "unicode/uobject.h" #include "unicode/uniset.h" #include "unicode/unistr.h" #include "unicode/strenum.h" U_NAMESPACE_BEGIN /** * Region is the class representing a Unicode Region Code, also known as a * Unicode Region Subtag, which is defined based upon the BCP 47 standard. We often think of * "regions" as "countries" when defining the characteristics of a locale. Region codes There are different * types of region codes that are important to distinguish. *

* Macroregion - A code for a "macro geographical (continental) region, geographical sub-region, or * selected economic and other grouping" as defined in * UN M.49 (http://unstats.un.org/unsd/methods/m49/m49regin.htm). * These are typically 3-digit codes, but contain some 2-letter codes, such as the LDML code QO * added for Outlying Oceania. Not all UNM.49 codes are defined in LDML, but most of them are. * Macroregions are represented in ICU by one of three region types: WORLD ( region code 001 ), * CONTINENTS ( regions contained directly by WORLD ), and SUBCONTINENTS ( things contained directly * by a continent ). *

* TERRITORY - A Region that is not a Macroregion. These are typically codes for countries, but also * include areas that are not separate countries, such as the code "AQ" for Antarctica or the code * "HK" for Hong Kong (SAR China). Overseas dependencies of countries may or may not have separate * codes. The codes are typically 2-letter codes aligned with the ISO 3166 standard, but BCP47 allows * for the use of 3-digit codes in the future. *

* UNKNOWN - The code ZZ is defined by Unicode LDML for use to indicate that the Region is unknown, * or that the value supplied as a region was invalid. *

* DEPRECATED - Region codes that have been defined in the past but are no longer in modern usage, * usually due to a country splitting into multiple territories or changing its name. *

* GROUPING - A widely understood grouping of territories that has a well defined membership such * that a region code has been assigned for it. Some of these are UNM.49 codes that do't fall into * the world/continent/sub-continent hierarchy, while others are just well known groupings that have * their own region code. Region "EU" (European Union) is one such region code that is a grouping. * Groupings will never be returned by the getContainingRegion() API, since a different type of region * ( WORLD, CONTINENT, or SUBCONTINENT ) will always be the containing region instead. * * The Region class is not intended for public subclassing. * * @author John Emmons * @stable ICU 51 */ class U_I18N_API Region : public UObject { public: /** * Destructor. * @stable ICU 51 */ virtual ~Region(); /** * Returns true if the two regions are equal. * @stable ICU 51 */ UBool operator==(const Region &that) const; /** * Returns true if the two regions are NOT equal; that is, if operator ==() returns false. * @stable ICU 51 */ UBool operator!=(const Region &that) const; /** * Returns a pointer to a Region using the given region code. The region code can be either 2-letter ISO code, * 3-letter ISO code, UNM.49 numeric code, or other valid Unicode Region Code as defined by the LDML specification. * The identifier will be canonicalized internally using the supplemental metadata as defined in the CLDR. * If the region code is NULL or not recognized, the appropriate error code will be set ( U_ILLEGAL_ARGUMENT_ERROR ) * @stable ICU 51 */ static const Region* U_EXPORT2 getInstance(const char *region_code, UErrorCode &status); /** * Returns a pointer to a Region using the given numeric region code. If the numeric region code is not recognized, * the appropriate error code will be set ( U_ILLEGAL_ARGUMENT_ERROR ). * @stable ICU 51 */ static const Region* U_EXPORT2 getInstance (int32_t code, UErrorCode &status); /** * Returns an enumeration over the IDs of all known regions that match the given type. * @stable ICU 55 */ static StringEnumeration* U_EXPORT2 getAvailable(URegionType type, UErrorCode &status); /** * Returns a pointer to the region that contains this region. Returns NULL if this region is code "001" (World) * or "ZZ" (Unknown region). For example, calling this method with region "IT" (Italy) returns the * region "039" (Southern Europe). * @stable ICU 51 */ const Region* getContainingRegion() const; /** * Return a pointer to the region that geographically contains this region and matches the given type, * moving multiple steps up the containment chain if necessary. Returns NULL if no containing region can be found * that matches the given type. Note: The URegionTypes = "URGN_GROUPING", "URGN_DEPRECATED", or "URGN_UNKNOWN" * are not appropriate for use in this API. NULL will be returned in this case. For example, calling this method * with region "IT" (Italy) for type "URGN_CONTINENT" returns the region "150" ( Europe ). * @stable ICU 51 */ const Region* getContainingRegion(URegionType type) const; /** * Return an enumeration over the IDs of all the regions that are immediate children of this region in the * region hierarchy. These returned regions could be either macro regions, territories, or a mixture of the two, * depending on the containment data as defined in CLDR. This API may return NULL if this region doesn't have * any sub-regions. For example, calling this method with region "150" (Europe) returns an enumeration containing * the various sub regions of Europe - "039" (Southern Europe) - "151" (Eastern Europe) - "154" (Northern Europe) * and "155" (Western Europe). * @stable ICU 55 */ StringEnumeration* getContainedRegions(UErrorCode &status) const; /** * Returns an enumeration over the IDs of all the regions that are children of this region anywhere in the region * hierarchy and match the given type. This API may return an empty enumeration if this region doesn't have any * sub-regions that match the given type. For example, calling this method with region "150" (Europe) and type * "URGN_TERRITORY" returns a set containing all the territories in Europe ( "FR" (France) - "IT" (Italy) - "DE" (Germany) etc. ) * @stable ICU 55 */ StringEnumeration* getContainedRegions( URegionType type, UErrorCode &status ) const; /** * Returns true if this region contains the supplied other region anywhere in the region hierarchy. * @stable ICU 51 */ UBool contains(const Region &other) const; /** * For deprecated regions, return an enumeration over the IDs of the regions that are the preferred replacement * regions for this region. Returns null for a non-deprecated region. For example, calling this method with region * "SU" (Soviet Union) would return a list of the regions containing "RU" (Russia), "AM" (Armenia), "AZ" (Azerbaijan), etc... * @stable ICU 55 */ StringEnumeration* getPreferredValues(UErrorCode &status) const; /** * Return this region's canonical region code. * @stable ICU 51 */ const char* getRegionCode() const; /** * Return this region's numeric code. * Returns a negative value if the given region does not have a numeric code assigned to it. * @stable ICU 51 */ int32_t getNumericCode() const; /** * Returns the region type of this region. * @stable ICU 51 */ URegionType getType() const; #ifndef U_HIDE_INTERNAL_API /** * Cleans up statically allocated memory. * @internal */ static void cleanupRegionData(); #endif /* U_HIDE_INTERNAL_API */ private: char id[4]; UnicodeString idStr; int32_t code; URegionType fType; Region *containingRegion; UVector *containedRegions; UVector *preferredValues; /** * Default Constructor. Internal - use factory methods only. */ Region(); /* * Initializes the region data from the ICU resource bundles. The region data * contains the basic relationships such as which regions are known, what the numeric * codes are, any known aliases, and the territory containment data. * * If the region data has already loaded, then this method simply returns without doing * anything meaningful. */ static void U_CALLCONV loadRegionData(UErrorCode &status); }; U_NAMESPACE_END #endif /* #if !UCONFIG_NO_FORMATTING */ #endif /* U_SHOW_CPLUSPLUS_API */ #endif // REGION_H //eof