This structure may grow in the future, indicated by the * size field.
size
ICU data must be at least 8-aligned, and should be 16-aligned. * The UDataInfo struct begins 4 bytes after the start of the data item, * so it is 4-aligned. * *
The platform data property fields help determine if a data * file can be efficiently used on a given machine. * The particular fields are of importance only if the data * is affected by the properties - if there is integer data * with word sizes > 1 byte, char* text, or UChar* text.
The implementation for the udata_open[Choice]() * functions may reject data based on the value in isBigEndian. * No other field is used by the udata API implementation.
udata_open[Choice]()
isBigEndian
udata
The dataFormat may be used to identify * the kind of data, e.g. a converter table.
dataFormat
The formatVersion field should be used to * make sure that the format can be interpreted. * It may be a good idea to check only for the one or two highest * of the version elements to allow the data memory to * get more or somewhat rearranged contents, for as long * as the using code can still interpret the older contents.
formatVersion
The dataVersion field is intended to be a * common place to store the source version of the data; * for data from the Unicode character database, this could * reflect the Unicode version.
dataVersion
udata_openChoice()
NULL
UDataInfo
TRUE
udata_openChoice
udata_getMemory()
The implementation depends on platform properties and user preferences * and may involve loading shared libraries (DLLs), mapping * files into memory, or fopen()/fread() files. * It may also involve using static memory or database queries etc. * Several or all data items may be combined into one entity * (DLL, memory-mappable file).
The data is always preceded by a header that includes * a UDataInfo structure. * The caller's isAcceptable() function is called to make * sure that the data is useful. It may be called several times if it * rejects the data and there is more than one location with data * matching the type and name.
isAcceptable()
If path==NULL, then ICU data is loaded. * Otherwise, it is separated into a basename and a basename-less directory string. * The basename is used as the data package name, and the directory is * logically prepended to the ICU data directory string.
path==NULL
For details about ICU data loading see the User Guide * Data Management chapter. (http://icu-project.org/userguide/icudata.html)
sizeof(UDataInfo)
*pInfo
pInfo->size
U_USING_DEFAULT_WARNING, U_UNSUPPORTED_ERROR