#include "unicode/utypes.h"
#include "unicode/udata.h"
#include "unicode/ustring.h"
#include "unicode/utf16.h"
#include "cmemory.h"
#include "cstring.h"
#include "resource.h"
#include "uarrsort.h"
#include "uassert.h"
#include "ucol_swp.h"
#include "udataswp.h"
#include "uinvchar.h"
#include "uresdata.h"
#include "uresimp.h"
#include "utracimp.h"
#define RES_GET_KEY16(pResData, keyOffset) …
#define RES_GET_KEY32(pResData, keyOffset) …
#define URESDATA_ITEM_NOT_FOUND …
static const uint16_t gEmpty16= …;
static const struct { … } gEmpty32= …;
static const struct { … } gEmptyString= …;
static int32_t
_res_findTableItem(const ResourceData *pResData, const uint16_t *keyOffsets, int32_t length,
const char *key, const char **realKey) { … }
static int32_t
_res_findTable32Item(const ResourceData *pResData, const int32_t *keyOffsets, int32_t length,
const char *key, const char **realKey) { … }
static UBool U_CALLCONV
isAcceptable(void *context,
const char * , const char * ,
const UDataInfo *pInfo) { … }
static void
res_init(ResourceData *pResData,
UVersionInfo formatVersion, const void *inBytes, int32_t length,
UErrorCode *errorCode) { … }
U_CAPI void U_EXPORT2
res_read(ResourceData *pResData,
const UDataInfo *pInfo, const void *inBytes, int32_t length,
UErrorCode *errorCode) { … }
U_CFUNC void
res_load(ResourceData *pResData,
const char *path, const char *name, UErrorCode *errorCode) { … }
U_CFUNC void
res_unload(ResourceData *pResData) { … }
static const int8_t gPublicTypes[URES_LIMIT] = …;
U_CAPI UResType U_EXPORT2
res_getPublicType(Resource res) { … }
U_CAPI const char16_t * U_EXPORT2
res_getStringNoTrace(const ResourceData *pResData, Resource res, int32_t *pLength) { … }
namespace {
UBool isNoInheritanceMarker(const ResourceData *pResData, Resource res) { … }
int32_t getStringArray(const ResourceData *pResData, const icu::ResourceArray &array,
icu::UnicodeString *dest, int32_t capacity,
UErrorCode &errorCode) { … }
}
U_CAPI const char16_t * U_EXPORT2
res_getAlias(const ResourceData *pResData, Resource res, int32_t *pLength) { … }
U_CAPI const uint8_t * U_EXPORT2
res_getBinaryNoTrace(const ResourceData *pResData, Resource res, int32_t *pLength) { … }
U_CAPI const int32_t * U_EXPORT2
res_getIntVectorNoTrace(const ResourceData *pResData, Resource res, int32_t *pLength) { … }
U_CAPI int32_t U_EXPORT2
res_countArrayItems(const ResourceData *pResData, Resource res) { … }
U_NAMESPACE_BEGIN
ResourceDataValue::~ResourceDataValue() { … }
UResType ResourceDataValue::getType() const { … }
const char16_t *ResourceDataValue::getString(int32_t &length, UErrorCode &errorCode) const { … }
const char16_t *ResourceDataValue::getAliasString(int32_t &length, UErrorCode &errorCode) const { … }
int32_t ResourceDataValue::getInt(UErrorCode &errorCode) const { … }
uint32_t ResourceDataValue::getUInt(UErrorCode &errorCode) const { … }
const int32_t *ResourceDataValue::getIntVector(int32_t &length, UErrorCode &errorCode) const { … }
const uint8_t *ResourceDataValue::getBinary(int32_t &length, UErrorCode &errorCode) const { … }
ResourceArray ResourceDataValue::getArray(UErrorCode &errorCode) const { … }
ResourceTable ResourceDataValue::getTable(UErrorCode &errorCode) const { … }
UBool ResourceDataValue::isNoInheritanceMarker() const { … }
int32_t ResourceDataValue::getStringArray(UnicodeString *dest, int32_t capacity,
UErrorCode &errorCode) const { … }
int32_t ResourceDataValue::getStringArrayOrStringAsArray(UnicodeString *dest, int32_t capacity,
UErrorCode &errorCode) const { … }
UnicodeString ResourceDataValue::getStringOrFirstOfArray(UErrorCode &errorCode) const { … }
U_NAMESPACE_END
static Resource
makeResourceFrom16(const ResourceData *pResData, int32_t res16) { … }
U_CAPI Resource U_EXPORT2
res_getTableItemByKey(const ResourceData *pResData, Resource table,
int32_t *indexR, const char **key) { … }
U_CAPI Resource U_EXPORT2
res_getTableItemByIndex(const ResourceData *pResData, Resource table,
int32_t indexR, const char **key) { … }
U_CAPI Resource U_EXPORT2
res_getResource(const ResourceData *pResData, const char *key) { … }
UBool icu::ResourceTable::getKeyAndValue(int32_t i,
const char *&key, icu::ResourceValue &value) const { … }
UBool icu::ResourceTable::findValue(const char *key, ResourceValue &value) const { … }
U_CAPI Resource U_EXPORT2
res_getArrayItem(const ResourceData *pResData, Resource array, int32_t indexR) { … }
uint32_t icu::ResourceArray::internalGetResource(const ResourceData *pResData, int32_t i) const { … }
UBool icu::ResourceArray::getValue(int32_t i, icu::ResourceValue &value) const { … }
U_CFUNC Resource
res_findResource(const ResourceData *pResData, Resource r, char** path, const char** key) { … }
Row;
static int32_t U_CALLCONV
ures_compareRows(const void *context, const void *left, const void *right) { … }
TempTable;
enum { … };
static const char *const gUnknownKey= …;
#if !UCONFIG_NO_COLLATION
static const char16_t gCollationBinKey[]=u"%%CollationBin";
#endif
static void
ures_swapResource(const UDataSwapper *ds,
const Resource *inBundle, Resource *outBundle,
Resource res,
const char *key,
TempTable *pTempTable,
UErrorCode *pErrorCode) { … }
U_CAPI int32_t U_EXPORT2
ures_swap(const UDataSwapper *ds,
const void *inData, int32_t length, void *outData,
UErrorCode *pErrorCode) { … }