Home | History | Annotate | Download | only in genrb

Lines Matching refs:bundle

46  * Align binary data at a 16-byte offset from the start of the resource bundle,
53 // and it makes no sense to move it to the pool bundle.
55 // the smaller the savings, and the smaller the pool bundle.
56 // We trade some total size reduction to reduce the pool bundle a bit,
58 // removing bundle files without rebuilding the pool bundle.
84 * for use in non-error cases when no resource is to be added to the bundle.
150 SResource::SResource(SRBRoot *bundle, const char *tag, int8_t type, const UString* comment,
153 fKey(bundle != NULL ? bundle->addTag(tag, errorCode) : -1), fKey16(-1),
264 StringBaseResource::StringBaseResource(SRBRoot *bundle, const char *tag, int8_t type,
267 : SResource(bundle, tag, type, comment, errorCode) {
281 StringBaseResource::StringBaseResource(SRBRoot *bundle, int8_t type,
283 : SResource(bundle, NULL, type, NULL, errorCode), fString(value) {
296 // Pool bundle string, alias the buffer. Guaranteed NUL-terminated and not empty.
323 IntResource::IntResource(SRBRoot *bundle, const char *tag, int32_t value,
325 : SResource(bundle, tag, URES_INT, comment, errorCode) {
333 IntVectorResource::IntVectorResource(SRBRoot *bundle, const char *tag,
335 : SResource(bundle, tag, URES_INT_VECTOR, comment, errorCode),
353 BinaryResource::BinaryResource(SRBRoot *bundle, const char *tag,
356 : SResource(bundle, tag, URES_BINARY, comment, errorCode),
392 StringResource::handlePreflightStrings(SRBRoot *bundle, UHashtable *stringSet,
397 // This is a duplicate of a pool bundle string or of an earlier-visited string.
401 if (poolStringIndex >= bundle->fPoolStringIndexLimit) {
402 bundle->fPoolStringIndexLimit = poolStringIndex + 1;
411 if (bundle->fStringsForm != STRINGS_UTF16_V1) {
427 bundle->f16BitStringsLength += fNumCharsForLength + len + 1; /* +1 for the NUL */
432 ContainerResource::handlePreflightStrings(SRBRoot *bundle, UHashtable *stringSet,
435 current->preflightStrings(bundle, stringSet, errorCode);
440 SResource::preflightStrings(SRBRoot *bundle, UHashtable *stringSet, UErrorCode &errorCode) {
452 handlePreflightStrings(bundle, stringSet, errorCode);
456 SResource::handlePreflightStrings(SRBRoot * /*bundle*/, UHashtable * /*stringSet*/,
513 StringResource::handleWrite16(SRBRoot * /*bundle*/) {
524 ContainerResource::writeAllRes16(SRBRoot *bundle) {
526 bundle->f16BitUnits.append((UChar)current->fRes16);
532 bundle) {
541 current->write16(bundle);
545 fRes = URES_MAKE_RESOURCE(URES_ARRAY16, bundle->f16BitUnits.length());
546 bundle->f16BitUnits.append((UChar)fCount);
547 writeAllRes16(bundle);
552 TableResource::handleWrite16(SRBRoot *bundle) {
562 current->write16(bundle);
566 if(fCount > (uint32_t)bundle->fMaxTableLength) {
567 bundle->fMaxTableLength = fCount;
572 fRes = URES_MAKE_RESOURCE(URES_TABLE16, bundle->f16BitUnits.length());
573 bundle->f16BitUnits.append((UChar)fCount);
575 bundle->f16BitUnits.append((UChar)current->fKey16);
577 writeAllRes16(bundle);
589 PseudoListResource::handleWrite16(SRBRoot * /*bundle*/) {
595 SResource::write16(SRBRoot *bundle) {
599 // After the mapping, negative key indexes are used for shared pool bundle keys.
600 fKey = bundle->mapKey(fKey);
605 if (fKey < bundle->fLocalKeyLimit) {
611 poolKeyIndex += bundle->fLocalKeyLimit;
626 handleWrite16(bundle);
629 fRes16 = bundle->makeRes16(fRes);
633 SResource::handleWrite16(SRBRoot * /*bundle*/) {
910 // but there are no pool bundle strings to share
911 // and we do not write a pool bundle,
1021 * more compact string value storage, optional pool bundle
1057 // share string values via pool bundle strings
1072 /* write all of the bundle contents: the root item and its children */
1087 TableResource* table_open(struct SRBRoot *bundle, const char *tag, const struct UString* comment, UErrorCode *status) {
1088 LocalPointer<TableResource> res(new TableResource(bundle, tag, comment, *status), *status);
1092 ArrayResource* array_open(struct SRBRoot *bundle, const char *tag, const struct UString* comment, UErrorCode *status) {
1093 LocalPointer<ArrayResource> res(new ArrayResource(bundle, tag, comment, *status), *status);
1097 struct SResource *string_open(struct SRBRoot *bundle, const char *tag, const UChar *value, int32_t len, const struct UString* comment, UErrorCode *status) {
1099 new StringResource(bundle, tag, value, len, comment, *status), *status);
1103 struct SResource *alias_open(struct SRBRoot *bundle, const char *tag, UChar *value, int32_t len, const struct UString* comment, UErrorCode *status) {
1105 new AliasResource(bundle, tag, value, len, comment, *status), *status);
1109 IntVectorResource *intvector_open(struct SRBRoot *bundle, const char *tag, const struct UString* comment, UErrorCode *status) {
1111 new IntVectorResource(bundle, tag, comment, *status), *status);
1115 struct SResource *int_open(struct SRBRoot *bundle, const char *tag, int32_t value, const struct UString* comment, UErrorCode *status) {
1116 LocalPointer<SResource> res(new IntResource(bundle, tag, value, comment, *status), *status);
1120 struct SResource *bin_open(struct SRBRoot *bundle, const char *tag, uint32_t length, uint8_t *data, const char* fileName, const struct UString* comment, UErrorCode *status) {
1122 new BinaryResource(bundle, tag, length, data, fileName, comment, *status), *status);
1218 SResource::getKeyString(const SRBRoot *bundle) const {
1222 return bundle->getKeyString(fKey);
1300 const struct SRBRoot *bundle=(const struct SRBRoot *)context;
1303 const char *lStart = bundle->getKeyString(lPos);
1305 const char *rStart = bundle->getKeyString(rPos);
1322 /* Sort pool bundle keys first (negative oldpos), and otherwise keys in parsing order. */
1385 /* Key string from the pool bundle, do not delete. */
1425 /* skip key offsets that point into the pool bundle rather than this new bundle */