ICU 52.1  52.1
uregion.h
Go to the documentation of this file.
1 /*
2 *****************************************************************************************
3 * Copyright (C) 2013, International Business Machines
4 * Corporation and others. All Rights Reserved.
5 *****************************************************************************************
6 */
7 
8 #ifndef UREGION_H
9 #define UREGION_H
10 
11 #include "unicode/utypes.h"
12 #include "unicode/uenum.h"
13 
56 #ifndef U_HIDE_DRAFT_API
57 
64 typedef enum URegionType {
70 
76 
82 
88 
94 
101 
108 
114 } URegionType;
115 #endif /* U_HIDE_DRAFT_API */
116 
117 #if !UCONFIG_NO_FORMATTING
118 
119 #ifndef U_HIDE_DRAFT_API
120 
125 struct URegion;
126 typedef struct URegion URegion;
136 U_DRAFT const URegion* U_EXPORT2
137 uregion_getRegionFromCode(const char *regionCode, UErrorCode *status);
138 
144 U_DRAFT const URegion* U_EXPORT2
145 uregion_getRegionFromNumericCode (int32_t code, UErrorCode *status);
146 
152 U_DRAFT UEnumeration* U_EXPORT2
154 
159 U_DRAFT UBool U_EXPORT2
160 uregion_areEqual(const URegion* uregion, const URegion* otherRegion);
161 
168 U_DRAFT const URegion* U_EXPORT2
169 uregion_getContainingRegion(const URegion* uregion);
170 
180 U_DRAFT const URegion* U_EXPORT2
182 
193 U_DRAFT UEnumeration* U_EXPORT2
194 uregion_getContainedRegions(const URegion* uregion, UErrorCode *status);
195 
205 U_DRAFT UEnumeration* U_EXPORT2
206 uregion_getContainedRegionsOfType(const URegion* uregion, URegionType type, UErrorCode *status);
207 
213 U_DRAFT UBool U_EXPORT2
214 uregion_contains(const URegion* uregion, const URegion* otherRegion);
215 
224 U_DRAFT UEnumeration* U_EXPORT2
225 uregion_getPreferredValues(const URegion* uregion, UErrorCode *status);
226 
231 U_DRAFT const char* U_EXPORT2
232 uregion_getRegionCode(const URegion* uregion);
233 
239 U_DRAFT int32_t U_EXPORT2
240 uregion_getNumericCode(const URegion* uregion);
241 
246 U_DRAFT URegionType U_EXPORT2
247 uregion_getType(const URegion* uregion);
248 
249 #endif /* U_HIDE_DRAFT_API */
250 
251 #endif /* #if !UCONFIG_NO_FORMATTING */
252 
253 #endif
Type representing the whole world.
Definition: uregion.h:81
URegionType
URegionType is an enumeration defining the different types of regions.
Definition: uregion.h:64
const URegion * uregion_getContainingRegionOfType(const URegion *uregion, URegionType type)
Return a pointer to the URegion that geographically contains this uregion and matches the specified t...
Type representing the unknown region.
Definition: uregion.h:69
UEnumeration * uregion_getAvailable(URegionType type, UErrorCode *status)
Returns an enumeration over the canonical codes of all known regions that match the given type...
struct UEnumeration UEnumeration
structure representing an enumeration object instance
Definition: uenum.h:39
UBool uregion_areEqual(const URegion *uregion, const URegion *otherRegion)
Returns true if the specified uregion is equal to the specified otherRegion.
Type representing a sub-continent.
Definition: uregion.h:93
UEnumeration * uregion_getContainedRegions(const URegion *uregion, UErrorCode *status)
Return an enumeration over the canonical codes of all the regions that are immediate children of the ...
Type representing a grouping of territories that is not to be used in the normal WORLD/CONTINENT/SUBC...
Definition: uregion.h:100
Maximum value for this unumeration.
Definition: uregion.h:113
UEnumeration * uregion_getContainedRegionsOfType(const URegion *uregion, URegionType type, UErrorCode *status)
Returns an enumeration over the canonical codes of all the regions that are children of the specified...
Type representing a territory.
Definition: uregion.h:75
const URegion * uregion_getRegionFromNumericCode(int32_t code, UErrorCode *status)
Returns a pointer to a URegion for the specified numeric region code.
int32_t uregion_getNumericCode(const URegion *uregion)
Returns the specified uregion's numeric code, or a negative value if there is no numeric code for the...
Type representing a region whose code has been deprecated, usually due to a country splitting into mu...
Definition: uregion.h:107
struct URegion URegion
Definition: uregion.h:126
Type representing a continent.
Definition: uregion.h:87
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers...
Definition: utypes.h:476
C API: String Enumeration.
const URegion * uregion_getContainingRegion(const URegion *uregion)
Returns a pointer to the URegion that contains the specified uregion.
Basic definitions for ICU, for both C and C++ APIs.
const char * uregion_getRegionCode(const URegion *uregion)
Returns the specified uregion's canonical code.
#define U_DRAFT
This is used to declare a function as a draft public ICU C API.
Definition: umachine.h:111
const URegion * uregion_getRegionFromCode(const char *regionCode, UErrorCode *status)
Returns a pointer to a URegion for the specified region code: A 2-letter or 3-letter ISO 3166 code...
UBool uregion_contains(const URegion *uregion, const URegion *otherRegion)
Returns true if the specified uregion contains the specified otherRegion anywhere in the region hiera...
URegionType uregion_getType(const URegion *uregion)
Returns the URegionType of the specified uregion.
UEnumeration * uregion_getPreferredValues(const URegion *uregion, UErrorCode *status)
If the specified uregion is deprecated, returns an enumeration over the canonical codes of the region...
int8_t UBool
The ICU boolean type.
Definition: umachine.h:200