#include <resbund.h>
Inheritance diagram for ResourceBundle:
Public Member Functions | |
ResourceBundle (const UnicodeString &packageName, const Locale &locale, UErrorCode &err) | |
Constructor. | |
ResourceBundle (const UnicodeString &packageName, UErrorCode &err) | |
Construct a resource bundle for the default bundle in the specified package. | |
ResourceBundle (UErrorCode &err) | |
Construct a resource bundle for the ICU default bundle. | |
ResourceBundle (const char *packageName, const Locale &locale, UErrorCode &err) | |
Standard constructor, onstructs a resource bundle for the locale-specific bundle in the specified package. | |
ResourceBundle (const ResourceBundle &original) | |
Copy constructor. | |
ResourceBundle (UResourceBundle *res, UErrorCode &status) | |
Constructor from a C UResourceBundle. | |
ResourceBundle & | operator= (const ResourceBundle &other) |
Assignment operator. | |
virtual | ~ResourceBundle () |
Destructor. | |
ResourceBundle * | clone () const |
Clone this object. | |
int32_t | getSize (void) const |
Returns the size of a resource. | |
UnicodeString | getString (UErrorCode &status) const |
returns a string from a string resource type | |
const uint8_t * | getBinary (int32_t &len, UErrorCode &status) const |
returns a binary data from a resource. | |
const int32_t * | getIntVector (int32_t &len, UErrorCode &status) const |
returns an integer vector from a resource. | |
uint32_t | getUInt (UErrorCode &status) const |
returns an unsigned integer from a resource. | |
int32_t | getInt (UErrorCode &status) const |
returns a signed integer from a resource. | |
UBool | hasNext (void) const |
Checks whether the resource has another element to iterate over. | |
void | resetIterator (void) |
Resets the internal context of a resource so that iteration starts from the first element. | |
const char * | getKey (void) const |
Returns the key associated with this resource. | |
const char * | getName (void) const |
Gets the locale ID of the resource bundle as a string. | |
UResType | getType (void) const |
Returns the type of a resource. | |
ResourceBundle | getNext (UErrorCode &status) |
Returns the next resource in a given resource or NULL if there are no more resources. | |
UnicodeString | getNextString (UErrorCode &status) |
Returns the next string in a resource or NULL if there are no more resources to iterate over. | |
UnicodeString | getNextString (const char **key, UErrorCode &status) |
Returns the next string in a resource or NULL if there are no more resources to iterate over. | |
ResourceBundle | get (int32_t index, UErrorCode &status) const |
Returns the resource in a resource at the specified index. | |
UnicodeString | getStringEx (int32_t index, UErrorCode &status) const |
Returns the string in a given resource at the specified index. | |
ResourceBundle | get (const char *key, UErrorCode &status) const |
Returns a resource in a resource that has a given key. | |
UnicodeString | getStringEx (const char *key, UErrorCode &status) const |
Returns a string in a resource that has a given key. | |
const char * | getVersionNumber (void) const |
Return the version number associated with this ResourceBundle as a string. | |
void | getVersion (UVersionInfo versionInfo) const |
Return the version number associated with this ResourceBundle as a UVersionInfo array. | |
const Locale & | getLocale (void) const |
Return the Locale associated with this ResourceBundle. | |
const Locale | getLocale (ULocDataLocaleType type, UErrorCode &status) const |
Return the Locale associated with this ResourceBundle. | |
ResourceBundle | getWithFallback (const char *key, UErrorCode &status) |
This API implements multilevel fallback. | |
virtual UClassID | getDynamicClassID () const |
ICU "poor man's RTTI", returns a UClassID for the actual class. | |
Static Public Member Functions | |
static UClassID | getStaticClassID () |
ICU "poor man's RTTI", returns a UClassID for this class. |
A resource bundle provides a way of accessing locale- specfic information in a data file. You create a resource bundle that manages the resources for a given locale and then ask it for individual resources.
Resource bundles in ICU4C are currently defined using text files which conform to the following BNF definition. More on resource bundle concepts and syntax can be found in the Users Guide.
The ResourceBundle class is not suitable for subclassing.
Definition at line 78 of file resbund.h.
|
Constructor.
|
|
Construct a resource bundle for the default bundle in the specified package.
|
|
Construct a resource bundle for the ICU default bundle.
|
|
Standard constructor, onstructs a resource bundle for the locale-specific bundle in the specified package.
|
|
Copy constructor.
|
|
Constructor from a C UResourceBundle. The resource bundle is copied and not adopted. ures_close will still need to be used on the original resource bundle.
|
|
Destructor.
|
|
Clone this object. Clones can be used concurrently in multiple threads. If an error occurs, then NULL is returned. The caller must delete the clone.
|
|
Returns a resource in a resource that has a given key. This procedure works only with table resources.
|
|
Returns the resource in a resource at the specified index.
|
|
returns a binary data from a resource. Can be used at most primitive resource types (binaries, strings, ints)
|
|
ICU "poor man's RTTI", returns a UClassID for the actual class.
Implements UObject. |
|
returns a signed integer from a resource. This integer is originally 28 bit and the sign gets propagated.
|
|
returns an integer vector from a resource.
|
|
Returns the key associated with this resource. Not all the resources have a key - only those that are members of a table.
|
|
Return the Locale associated with this ResourceBundle.
|
|
Return the Locale associated with this ResourceBundle.
|
|
Gets the locale ID of the resource bundle as a string. Same as getLocale().getName() .
|
|
Returns the next resource in a given resource or NULL if there are no more resources.
|
|
Returns the next string in a resource or NULL if there are no more resources to iterate over.
|
|
Returns the next string in a resource or NULL if there are no more resources to iterate over.
|
|
Returns the size of a resource. Size for scalar types is always 1, and for vector/table types is the number of child resources.
|
|
ICU "poor man's RTTI", returns a UClassID for this class.
|
|
returns a string from a string resource type
|
|
Returns a string in a resource that has a given key. This procedure works only with table resources.
|
|
Returns the string in a given resource at the specified index.
|
|
Returns the type of a resource. Available types are defined in enum UResType
|
|
returns an unsigned integer from a resource. This integer is originally 28 bits.
|
|
Return the version number associated with this ResourceBundle as a UVersionInfo array.
|
|
Return the version number associated with this ResourceBundle as a string. Please use getVersion, as this method is going to be deprecated.
|
|
This API implements multilevel fallback.
|
|
Checks whether the resource has another element to iterate over.
|
|
Assignment operator.
|
|
Resets the internal context of a resource so that iteration starts from the first element.
|