Loading...
Searching...
No Matches
uregion.h
Go to the documentation of this file.
// © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/*
*****************************************************************************************
* Copyright (C) 2014, International Business Machines
* Corporation and others. All Rights Reserved.
*****************************************************************************************
*/
#ifndef UREGION_H
#define UREGION_H
#include "unicode/utypes.h"
#include "unicode/uenum.h"
typedef enum URegionType {
URGN_UNKNOWN,
URGN_TERRITORY,
URGN_WORLD,
URGN_CONTINENT,
URGN_SUBCONTINENT,
URGN_GROUPING,
URGN_DEPRECATED,
#ifndef U_HIDE_DEPRECATED_API
URGN_LIMIT
#endif /* U_HIDE_DEPRECATED_API */
} URegionType;
#if !UCONFIG_NO_FORMATTING
struct URegion;
typedef struct URegion URegion;
U_CAPI const URegion* U_EXPORT2
uregion_getRegionFromCode(const char *regionCode, UErrorCode *status);
U_CAPI const URegion* U_EXPORT2
uregion_getRegionFromNumericCode (int32_t code, UErrorCode *status);
U_CAPI UEnumeration* U_EXPORT2
uregion_getAvailable(URegionType type, UErrorCode *status);
U_CAPI UBool U_EXPORT2
uregion_areEqual(const URegion* uregion, const URegion* otherRegion);
U_CAPI const URegion* U_EXPORT2
uregion_getContainingRegion(const URegion* uregion);
U_CAPI const URegion* U_EXPORT2
uregion_getContainingRegionOfType(const URegion* uregion, URegionType type);
U_CAPI UEnumeration* U_EXPORT2
uregion_getContainedRegions(const URegion* uregion, UErrorCode *status);
U_CAPI UEnumeration* U_EXPORT2
uregion_getContainedRegionsOfType(const URegion* uregion, URegionType type, UErrorCode *status);
U_CAPI UBool U_EXPORT2
uregion_contains(const URegion* uregion, const URegion* otherRegion);
U_CAPI UEnumeration* U_EXPORT2
uregion_getPreferredValues(const URegion* uregion, UErrorCode *status);
U_CAPI const char* U_EXPORT2
uregion_getRegionCode(const URegion* uregion);
U_CAPI int32_t U_EXPORT2
uregion_getNumericCode(const URegion* uregion);
U_CAPI URegionType U_EXPORT2
uregion_getType(const URegion* uregion);
#endif /* #if !UCONFIG_NO_FORMATTING */
#endif
uenum.h
C API: String Enumeration.
UEnumeration
struct UEnumeration UEnumeration
structure representing an enumeration object instance
Definition uenum.h:44
UBool
int8_t UBool
The ICU boolean type, a signed-byte integer.
Definition umachine.h:269
U_CAPI
#define U_CAPI
This is used to declare a function as a public ICU C API.
Definition umachine.h:110
uregion_getPreferredValues
U_CAPI UEnumeration * uregion_getPreferredValues(const URegion *uregion, UErrorCode *status)
If the specified uregion is deprecated, returns an enumeration over the canonical codes of the region...
uregion_contains
U_CAPI 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_getContainingRegionOfType
U_CAPI 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...
uregion_getRegionCode
U_CAPI const char * uregion_getRegionCode(const URegion *uregion)
Returns the specified uregion's canonical code.
uregion_getContainedRegionsOfType
U_CAPI 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...
uregion_getAvailable
U_CAPI UEnumeration * uregion_getAvailable(URegionType type, UErrorCode *status)
Returns an enumeration over the canonical codes of all known regions that match the given type.
URegionType
URegionType
URegionType is an enumeration defining the different types of regions.
Definition uregion.h:65
URGN_LIMIT
@ URGN_LIMIT
One more than the highest normal URegionType value.
Definition uregion.h:115
URGN_CONTINENT
@ URGN_CONTINENT
Type representing a continent.
Definition uregion.h:88
URGN_WORLD
@ URGN_WORLD
Type representing the whole world.
Definition uregion.h:82
URGN_GROUPING
@ URGN_GROUPING
Type representing a grouping of territories that is not to be used in the normal WORLD/CONTINENT/SUBC...
Definition uregion.h:101
URGN_UNKNOWN
@ URGN_UNKNOWN
Type representing the unknown region.
Definition uregion.h:70
URGN_DEPRECATED
@ URGN_DEPRECATED
Type representing a region whose code has been deprecated, usually due to a country splitting into mu...
Definition uregion.h:108
URGN_TERRITORY
@ URGN_TERRITORY
Type representing a territory.
Definition uregion.h:76
URGN_SUBCONTINENT
@ URGN_SUBCONTINENT
Type representing a sub-continent.
Definition uregion.h:94
URegion
struct URegion URegion
Definition uregion.h:126
uregion_areEqual
U_CAPI UBool uregion_areEqual(const URegion *uregion, const URegion *otherRegion)
Returns true if the specified uregion is equal to the specified otherRegion.
uregion_getContainingRegion
U_CAPI const URegion * uregion_getContainingRegion(const URegion *uregion)
Returns a pointer to the URegion that contains the specified uregion.
uregion_getNumericCode
U_CAPI 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...
uregion_getRegionFromCode
U_CAPI 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_getType
U_CAPI URegionType uregion_getType(const URegion *uregion)
Returns the URegionType of the specified uregion.
uregion_getContainedRegions
U_CAPI 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 ...
uregion_getRegionFromNumericCode
U_CAPI const URegion * uregion_getRegionFromNumericCode(int32_t code, UErrorCode *status)
Returns a pointer to a URegion for the specified numeric region code.
utypes.h
Basic definitions for ICU, for both C and C++ APIs.
UErrorCode
UErrorCode
Standard ICU4C error code type, a substitute for exceptions.
Definition utypes.h:509