Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: source/common/uresdata.h

Issue 1621943002: ICU 56 step 4: Apply post-56 fixes for measure/date format (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@56goog
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « source/common/uresbund.cpp ('k') | source/common/uresdata.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 ****************************************************************************** 2 ******************************************************************************
3 * Copyright (C) 1999-2015, International Business Machines 3 * Copyright (C) 1999-2015, International Business Machines
4 * Corporation and others. All Rights Reserved. 4 * Corporation and others. All Rights Reserved.
5 ****************************************************************************** 5 ******************************************************************************
6 * file name: uresdata.h 6 * file name: uresdata.h
7 * encoding: US-ASCII 7 * encoding: US-ASCII
8 * tab size: 8 (not used) 8 * tab size: 8 (not used)
9 * indentation:4 9 * indentation:4
10 * 10 *
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 446
447 U_INTERNAL Resource U_EXPORT2 447 U_INTERNAL Resource U_EXPORT2
448 res_getArrayItem(const ResourceData *pResData, Resource array, int32_t indexS); 448 res_getArrayItem(const ResourceData *pResData, Resource array, int32_t indexS);
449 449
450 U_INTERNAL Resource U_EXPORT2 450 U_INTERNAL Resource U_EXPORT2
451 res_getTableItemByIndex(const ResourceData *pResData, Resource table, int32_t in dexS, const char ** key); 451 res_getTableItemByIndex(const ResourceData *pResData, Resource table, int32_t in dexS, const char ** key);
452 452
453 U_INTERNAL Resource U_EXPORT2 453 U_INTERNAL Resource U_EXPORT2
454 res_getTableItemByKey(const ResourceData *pResData, Resource table, int32_t *ind exS, const char* * key); 454 res_getTableItemByKey(const ResourceData *pResData, Resource table, int32_t *ind exS, const char* * key);
455 455
456 /* 456 /**
457 * Iterates over the path and stops when a scalar resource is found.
458 * Follows aliases.
457 * Modifies the contents of *path (replacing separators with NULs), 459 * Modifies the contents of *path (replacing separators with NULs),
458 * and also moves *path forward while it finds items. 460 * and also moves *path forward while it finds items.
461 *
462 * @param path input: "CollationElements/Sequence" or "zoneStrings/3/2" etc.;
463 * output: points to the part that has not yet been processed
459 */ 464 */
460 U_CFUNC Resource res_findResource(const ResourceData *pResData, Resource r, char ** path, const char** key); 465 U_CFUNC Resource res_findResource(const ResourceData *pResData, Resource r,
466 char** path, const char** key);
467
468 #ifdef __cplusplus
469
470 #include "resource.h"
471
472 U_NAMESPACE_BEGIN
473
474 class ResourceDataValue : public ResourceValue {
475 public:
476 ResourceDataValue() : pResData(NULL), res(URES_NONE) {}
477 virtual ~ResourceDataValue();
478
479 void setData(const ResourceData *data) { pResData = data; }
480 void setResource(Resource r) { res = r; }
481
482 virtual UResType getType() const;
483 virtual const UChar *getString(int32_t &length, UErrorCode &errorCode) const ;
484 virtual const UChar *getAliasString(int32_t &length, UErrorCode &errorCode) const;
485 virtual int32_t getInt(UErrorCode &errorCode) const;
486 virtual uint32_t getUInt(UErrorCode &errorCode) const;
487 virtual const int32_t *getIntVector(int32_t &length, UErrorCode &errorCode) const;
488 virtual const uint8_t *getBinary(int32_t &length, UErrorCode &errorCode) con st;
489
490 const ResourceData *pResData;
491
492 private:
493 Resource res;
494 };
495
496 U_NAMESPACE_END
497
498 /**
499 * @param value will be set during enumeration; input contents is ignored
500 * @param sink receives all table item key-value pairs
501 */
502 U_CFUNC void
503 ures_getAllTableItems(const ResourceData *pResData, Resource table,
504 icu::ResourceDataValue &value, icu::ResourceTableSink &sin k,
505 UErrorCode &errorCode);
506
507 /**
508 * @param value will be set during enumeration; input contents is ignored
509 * @param sink receives all array item values
510 */
511 U_CFUNC void
512 ures_getAllArrayItems(const ResourceData *pResData, Resource array,
513 icu::ResourceDataValue &value, icu::ResourceArraySink &sin k,
514 UErrorCode &errorCode);
515
516 #endif /* __cplusplus */
461 517
462 /** 518 /**
463 * Swap an ICU resource bundle. See udataswp.h. 519 * Swap an ICU resource bundle. See udataswp.h.
464 * @internal 520 * @internal
465 */ 521 */
466 U_CAPI int32_t U_EXPORT2 522 U_CAPI int32_t U_EXPORT2
467 ures_swap(const UDataSwapper *ds, 523 ures_swap(const UDataSwapper *ds,
468 const void *inData, int32_t length, void *outData, 524 const void *inData, int32_t length, void *outData,
469 UErrorCode *pErrorCode); 525 UErrorCode *pErrorCode);
470 526
471 #endif 527 #endif
OLDNEW
« no previous file with comments | « source/common/uresbund.cpp ('k') | source/common/uresdata.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698