ICU 56.1: uregion.h Source File

ICU 56.1 56.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- File List
- Globals

uregion.h
Go to the documentation of this file.
1 /*
2 *****************************************************************************************
3 * Copyright (C) 2014, 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
63 typedef enum URegionType {
68 URGN_UNKNOWN,
69
74 URGN_TERRITORY,
75
80 URGN_WORLD,
81
86 URGN_CONTINENT,
87
92 URGN_SUBCONTINENT,
93
99 URGN_GROUPING,
100
106 URGN_DEPRECATED,
107
112 URGN_LIMIT
113 } URegionType;
114
115 #if !UCONFIG_NO_FORMATTING
116
121 struct URegion;
122 typedef struct URegion URegion;
132 U_STABLE const URegion* U_EXPORT2
133 uregion_getRegionFromCode(const char *regionCode, UErrorCode *status);
134
140 U_STABLE const URegion* U_EXPORT2
141 uregion_getRegionFromNumericCode (int32_t code, UErrorCode *status);
142
148 U_STABLE UEnumeration* U_EXPORT2
149 uregion_getAvailable(URegionType type, UErrorCode *status);
150
155 U_STABLE UBool U_EXPORT2
156 uregion_areEqual(const URegion* uregion, const URegion* otherRegion);
157
164 U_STABLE const URegion* U_EXPORT2
165 uregion_getContainingRegion(const URegion* uregion);
166
176 U_STABLE const URegion* U_EXPORT2
177 uregion_getContainingRegionOfType(const URegion* uregion, URegionType type);
178
189 U_STABLE UEnumeration* U_EXPORT2
190 uregion_getContainedRegions(const URegion* uregion, UErrorCode *status);
191
201 U_STABLE UEnumeration* U_EXPORT2
202 uregion_getContainedRegionsOfType(const URegion* uregion, URegionType type, UErrorCode *status);
203
209 U_STABLE UBool U_EXPORT2
210 uregion_contains(const URegion* uregion, const URegion* otherRegion);
211
220 U_STABLE UEnumeration* U_EXPORT2
221 uregion_getPreferredValues(const URegion* uregion, UErrorCode *status);
222
227 U_STABLE const char* U_EXPORT2
228 uregion_getRegionCode(const URegion* uregion);
229
235 U_STABLE int32_t U_EXPORT2
236 uregion_getNumericCode(const URegion* uregion);
237
242 U_STABLE URegionType U_EXPORT2
243 uregion_getType(const URegion* uregion);
244
245
246 #endif /* #if !UCONFIG_NO_FORMATTING */
247
248 #endif
URGN_WORLD
Type representing the whole world.
Definition: uregion.h:80
URegionType
URegionType
URegionType is an enumeration defining the different types of regions.
Definition: uregion.h:63
uregion_getContainingRegionOfType
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...
URGN_UNKNOWN
Type representing the unknown region.
Definition: uregion.h:68
uregion_getAvailable
UEnumeration * uregion_getAvailable(URegionType type, UErrorCode *status)
Returns an enumeration over the canonical codes of all known regions that match the given type...
UEnumeration
struct UEnumeration UEnumeration
structure representing an enumeration object instance
Definition: uenum.h:39
uregion_areEqual
UBool uregion_areEqual(const URegion *uregion, const URegion *otherRegion)
Returns true if the specified uregion is equal to the specified otherRegion.
URGN_SUBCONTINENT
Type representing a sub-continent.
Definition: uregion.h:92
uregion_getContainedRegions
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 ...
URGN_GROUPING
Type representing a grouping of territories that is not to be used in the normal WORLD/CONTINENT/SUBC...
Definition: uregion.h:99
URGN_LIMIT
Maximum value for this unumeration.
Definition: uregion.h:112
uregion_getContainedRegionsOfType
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...
URGN_TERRITORY
Type representing a territory.
Definition: uregion.h:74
uregion_getRegionFromNumericCode
const URegion * uregion_getRegionFromNumericCode(int32_t code, UErrorCode *status)
Returns a pointer to a URegion for the specified numeric region code.
uregion_getNumericCode
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...
URGN_DEPRECATED
Type representing a region whose code has been deprecated, usually due to a country splitting into mu...
Definition: uregion.h:106
URegion
struct URegion URegion
Definition: uregion.h:122
URGN_CONTINENT
Type representing a continent.
Definition: uregion.h:86
UErrorCode
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers...
Definition: utypes.h:476
uenum.h
C API: String Enumeration.
uregion_getContainingRegion
const URegion * uregion_getContainingRegion(const URegion *uregion)
Returns a pointer to the URegion that contains the specified uregion.
utypes.h
Basic definitions for ICU, for both C and C++ APIs.
uregion_getRegionCode
const char * uregion_getRegionCode(const URegion *uregion)
Returns the specified uregion's canonical code.
uregion_getRegionFromCode
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...
uregion_contains
UBool uregion_contains(const URegion *uregion, const URegion *otherRegion)
Returns true if the specified uregion contains the specified otherRegion anywhere in the region hiera...
uregion_getType
URegionType uregion_getType(const URegion *uregion)
Returns the URegionType of the specified uregion.
uregion_getPreferredValues
UEnumeration * uregion_getPreferredValues(const URegion *uregion, UErrorCode *status)
If the specified uregion is deprecated, returns an enumeration over the canonical codes of the region...
U_STABLE
#define U_STABLE
This is used to declare a function as a stable public ICU C API.
Definition: umachine.h:109
UBool
int8_t UBool
The ICU boolean type.
Definition: umachine.h:234