1 // © 2016 and later: Unicode, Inc. and others. 2 // License & terms of use: http://www.unicode.org/copyright.html 4 ****************************************************************************** 6 * Copyright (C) 1999-2014, International Business Machines 7 * Corporation and others. All Rights Reserved. 9 ****************************************************************************** 12 * tab size: 8 (not used) 15 * created on: 1999oct25 16 * created by: Markus W. Scherer 24 #if U_SHOW_CPLUSPLUS_API 26 #endif// U_SHOW_CPLUSPLUS_API 45 #ifndef U_HIDE_INTERNAL_API 50 #define U_TREE_SEPARATOR '-' 56 #define U_TREE_SEPARATOR_STRING "-" 62 #define U_TREE_ENTRY_SEP_CHAR '/' 68 #define U_TREE_ENTRY_SEP_STRING "/" 74 #define U_ICUDATA_ALIAS "ICUDATA" 76 #endif/* U_HIDE_INTERNAL_API */ 125 /* platform data properties */ 144 uint8_t dataFormat[4];
148 uint8_t formatVersion[4];
152 uint8_t dataVersion[4];
155 /* API for reading data -----------------------------------------------------*/ 178 constchar *type,
constchar *name,
279 U_CAPIconstvoid * U_EXPORT2
397 #ifndef U_HIDE_DEPRECATED_API 403 #endif// U_HIDE_DEPRECATED_API 421 #if U_SHOW_CPLUSPLUS_API 438 #endif// U_SHOW_CPLUSPLUS_API "Smart pointer" class, closes a UDataMemory via udata_close().
C++ API: "Smart pointers" for use with and in ICU4C C++ code.
#define U_DEFINE_LOCAL_OPEN_POINTER(LocalPointerClassName, Type, closeFunction)
"Smart pointer" definition macro, deletes objects via the closeFunction.
#define U_CALLCONV
Similar to U_CDECL_BEGIN/U_CDECL_END, this qualifier is necessary in callback function typedefs to ma...
UDataInfo contains the properties about the requested data.
uint8_t sizeofUChar
sizeof(UChar), one of { 1, 2, 4 }
uint8_t charsetFamily
see U_CHARSET_FAMILY values in utypes.h
uint8_t isBigEndian
0 for little-endian machine, 1 for big-endian
uint16_t size
sizeof(UDataInfo)
uint8_t reservedByte
unused, set to 0
uint16_t reservedWord
unused, set to 0
U_CAPI void udata_setAppData(const char *packageName, const void *data, UErrorCode *err)
This function bypasses the normal ICU data loading process for application-specific data and allows y...
UDataFileAccess
Possible settings for udata_setFileAccess()
@ UDATA_FILE_ACCESS_COUNT
Number of real UDataFileAccess values.
@ UDATA_ONLY_PACKAGES
ICU only loads data from packages, not from single files.
@ UDATA_DEFAULT_ACCESS
An alias for the default access mode.
@ UDATA_FILES_FIRST
ICU looks for data in single files first, then in packages.
@ UDATA_PACKAGES_FIRST
ICU loads data from packages first, and only from single files if the data cannot be found in a packa...
@ UDATA_NO_FILES
ICU does not access the file system for data loading.
U_CAPI UDataMemory * udata_openChoice(const char *path, const char *type, const char *name, UDataMemoryIsAcceptable *isAcceptable, void *context, UErrorCode *pErrorCode)
Data loading function.
U_CAPI void udata_getInfo(UDataMemory *pData, UDataInfo *pInfo)
Get the information from the data memory header.
U_CAPI void udata_setFileAccess(UDataFileAccess access, UErrorCode *status)
This function may be called to control how ICU loads data.
U_CAPI void udata_close(UDataMemory *pData)
Close the data memory.
U_CAPI UDataMemory * udata_open(const char *path, const char *type, const char *name, UErrorCode *pErrorCode)
Convenience function.
U_CAPI void udata_setCommonData(const void *data, UErrorCode *err)
This function bypasses the normal ICU data loading process and allows you to force ICU's system data ...
UBool UDataMemoryIsAcceptable(void *context, const char *type, const char *name, const UDataInfo *pInfo)
Callback function for udata_openChoice().
struct UDataMemory UDataMemory
Forward declaration of the data memory type.
U_CAPI const void * udata_getMemory(UDataMemory *pData)
Get the pointer to the actual data inside the data memory.
#define U_CDECL_END
This is used to end a declaration of a library private ICU C API.
int8_t UBool
The ICU boolean type, a signed-byte integer.
#define U_CAPI
This is used to declare a function as a public ICU C API.
#define U_CDECL_BEGIN
This is used to begin a declaration of a library private ICU C API.
Basic definitions for ICU, for both C and C++ APIs.
UErrorCode
Standard ICU4C error code type, a substitute for exceptions.