#include <resbund.h>
Inheritance diagram for ResourceBundle::
Public Methods | |
ResourceBundle (const UnicodeString &path, const Locale &locale, UErrorCode &err) | |
Constructor. More... | |
ResourceBundle (const UnicodeString &path, UErrorCode &err) | |
Construct a resource bundle for the root bundle in the specified path. More... | |
ResourceBundle (UErrorCode &err) | |
Construct a resource bundle for the ICU root bundle. More... | |
ResourceBundle (const char *path, const Locale &locale, UErrorCode &err) | |
Standard constructor, onstructs a resource bundle for the locale-specific bundle in the specified path. More... | |
ResourceBundle (const ResourceBundle &original) | |
Copy constructor. More... | |
ResourceBundle (UResourceBundle *res, UErrorCode &status) | |
Constructor from a C UResourceBundle. More... | |
ResourceBundle & | operator= (const ResourceBundle &other) |
Assignment operator. More... | |
~ResourceBundle () | |
Destructor. More... | |
ResourceBundle * | clone () const |
Clone this object. More... | |
int32_t | getSize (void) const |
Returns the size of a resource. More... | |
UnicodeString | getString (UErrorCode &status) const |
returns a string from a string resource type. More... | |
const uint8_t * | getBinary (int32_t &len, UErrorCode &status) const |
returns a binary data from a resource. More... | |
const int32_t * | getIntVector (int32_t &len, UErrorCode &status) const |
returns an integer vector from a resource. More... | |
uint32_t | getUInt (UErrorCode &status) const |
returns an unsigned integer from a resource. More... | |
int32_t | getInt (UErrorCode &status) const |
returns a signed integer from a resource. More... | |
UBool | hasNext (void) const |
Checks whether the resource has another element to iterate over. More... | |
void | resetIterator (void) |
Resets the internal context of a resource so that iteration starts from the first element. More... | |
const char * | getKey (void) |
Returns the key associated with this resource. More... | |
const char * | getName (void) |
Gets the locale ID of the resource bundle as a string. More... | |
UResType | getType (void) |
Returns the type of a resource. More... | |
ResourceBundle | getNext (UErrorCode &status) |
Returns the next resource in a given resource or NULL if there are no more resources. More... | |
UnicodeString | getNextString (UErrorCode &status) |
Returns the next string in a resource or NULL if there are no more resources to iterate over. More... | |
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. More... | |
ResourceBundle | get (int32_t index, UErrorCode &status) const |
Returns the resource in a resource at the specified index. More... | |
UnicodeString | getStringEx (int32_t index, UErrorCode &status) const |
Returns the string in a given resource at the specified index. More... | |
ResourceBundle | get (const char *key, UErrorCode &status) const |
Returns a resource in a resource that has a given key. More... | |
UnicodeString | getStringEx (const char *key, UErrorCode &status) const |
Returns a string in a resource that has a given key. More... | |
const char * | getVersionNumber (void) const |
Return the version number associated with this ResourceBundle as a string. More... | |
void | getVersion (UVersionInfo versionInfo) const |
Return the version number associated with this ResourceBundle as a UVersionInfo array. More... | |
const Locale & | getLocale (void) const |
Return the Locale associated with this ResourceBundle. More... | |
const Locale | getLocale (ULocDataLocaleType type, UErrorCode &status) const |
Return the Locale associated with this ResourceBundle. More... | |
virtual UClassID | getDynamicClassID () const |
ICU "poor man's RTTI", returns a UClassID for the actual class. More... | |
Static Public Methods | |
UClassID | getStaticClassID () |
ICU "poor man's RTTI", returns a UClassID for this class. More... | |
Private Methods | |
ResourceBundle () | |
void | constructForLocale (const UnicodeString &path, const Locale &locale, UErrorCode &error) |
Private Attributes | |
UResourceBundle * | resource |
Locale * | locName |
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 73 of file resbund.h.
|
Constructor.
|
|
Construct a resource bundle for the root bundle in the specified path.
|
|
Construct a resource bundle for the ICU root bundle.
|
|
Standard constructor, onstructs a resource bundle for the locale-specific bundle in the specified path.
|
|
Copy constructor.
|
|
Constructor from a C UResourceBundle.
|
|
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.
Reimplemented from 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.
|
|
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.
|
|
|
|
|