Inheritance diagram for UResourceBundle:
Public Types | |
enum | ResType { None = -1, String = 0, Binary = 1, Table = 2, Alias = 3, Int = 7, Array = 8, IntVector = 14 } |
Public Member Functions | |
this (inout ULocale locale, char[] path=null) | |
~this () | |
uint | getSize () |
int | getInt () |
UText | getString () |
UText | getString (uint index) |
UText | getString (char[] key) |
UText | getNextString () |
void[] | getBinary () |
int[] | getIntVector () |
bool | hasNext () |
void | resetIterator () |
UResourceBundle | getNextResource () |
UResourceBundle | getResource (char[] key) |
UResourceBundle | getResource (uint index) |
void | getVersion (inout Version info) |
void | getLocale (inout ULocale locale) |
char[] | getKey () |
ResType | getType () |
Static Public Member Functions | |
void | test () |
Private Types | |
typedef void * | Handle |
enum | Error { OK, BufferOverflow = 15 } |
Private Member Functions | |
this (Handle handle) | |
Static Private Member Functions | |
UResourceBundle | get (Handle handle, inout Error e) |
bool | isError (Error e) |
void | testError (Error e, char[] msg) |
char * | toString (char[] string) |
wchar * | toString (wchar[] string) |
uint | length (char *s) |
uint | length (wchar *s) |
char[] | toArray (char *s) |
wchar[] | toArray (wchar *s) |
Private Attributes | |
Handle | handle |
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.
See this page for full details.
Definition at line 106 of file UResourceBundle.d.
|
Use this for the primary argument-type to most ICU functions |
|
Internals opened up to the public Definition at line 117 of file UResourceBundle.d. Referenced by getType(). |
|
ICU error codes (the ones which are referenced) |
|
Definition at line 186 of file UResourceBundle.d. |
|
private constructor for internal use only Definition at line 141 of file UResourceBundle.d. |
|
Constructs a resource bundle for the locale-specific bundle in the specified path. locale This is the locale this resource bundle is for. To get resources for the French locale, for example, you would create a ResourceBundle passing ULocale::FRENCH for the "locale" parameter, and all subsequent calls to that resource bundle will return resources that pertain to the French locale. If the caller passes a Locale.Default parameter, the default locale for the system (as returned by ULocale.getDefault()) will be used. Passing Locale.Root will cause the root-locale to be used. path This is a full pathname in the platform-specific format for the directory containing the resource data files we want to load resources from. We use locale IDs to generate filenames, and the filenames have this string prepended to them before being passed to the C++ I/O functions. Therefore, this string must always end with a directory delimiter (whatever that is for the target OS) for this class to work correctly. A null value will open the default ICU data-files Definition at line 174 of file UResourceBundle.d. References ICU::testError(), and ICU::toString(). |
|
Returns the size of a resource. Size for scalar types is always 1, and for vector/table types is the number of child resources. Definition at line 199 of file UResourceBundle.d. |
|
Returns a signed integer from a resource. This integer is originally 28 bit and the sign gets propagated. Definition at line 211 of file UResourceBundle.d. References ICU::testError(). |
|
Returns a string from a string resource type Definition at line 226 of file UResourceBundle.d. References ICU::testError(). |
|
Returns the string in a given resource at the specified index Definition at line 243 of file UResourceBundle.d. References ICU::testError(). |
|
Returns a string in a resource that has a given key. This procedure works only with table resources. Definition at line 260 of file UResourceBundle.d. References ICU::testError(), and ICU::toString(). |
|
Returns the next string in a resource or NULL if there are no more resources to iterate over Definition at line 277 of file UResourceBundle.d. References ICU::testError(). Referenced by test(). |
|
Returns a binary data from a resource. Can be used at most primitive resource types (binaries, strings, ints) Definition at line 295 of file UResourceBundle.d. References ICU::testError(). |
|
Returns an integer vector from a resource Definition at line 311 of file UResourceBundle.d. References ICU::testError(). |
|
Checks whether the resource has another element to iterate over Definition at line 328 of file UResourceBundle.d. |
|
Resets the internal context of a resource so that iteration starts from the first element Definition at line 340 of file UResourceBundle.d. |
|
Returns the next resource in a given resource or NULL if there are no more resources Definition at line 352 of file UResourceBundle.d. References get(). Referenced by test(). |
|
Returns a resource that has a given key. This procedure works only with table resources. Definition at line 366 of file UResourceBundle.d. References get(), and ICU::toString(). |
|
Returns the resource at the specified index Definition at line 379 of file UResourceBundle.d. References get(). |
|
Return the version number associated with this ResourceBundle as a UVersionInfo array Definition at line 393 of file UResourceBundle.d. |
|
Return the ULocale associated with this ResourceBundle Definition at line 404 of file UResourceBundle.d. References ICU::testError(), and ICU::toArray(). |
|
Returns the key associated with this resource. Not all the resources have a key - only those that are members of a table. Definition at line 420 of file UResourceBundle.d. References ICU::toArray(). |
|
Returns the type of a resource. Available types are defined in enum UResType Definition at line 432 of file UResourceBundle.d. References ResType. |
|
Worker function for constructing internal ResourceBundle instances. Returns null when the provided handle is null. Definition at line 444 of file UResourceBundle.d. References ICU::testError(), and UResourceBundle. Referenced by getNextResource(), and getResource(). |
|
Definition at line 539 of file UResourceBundle.d. References getNextResource(), getNextString(), and UResourceBundle. |
|
Definition at line 127 of file ICU.d. Referenced by UConverter::detectSignature(), UString::format(), and UConverter::this(). |
|
|
Definition at line 155 of file ICU.d. Referenced by UConverter::compareNames(), getResource(), getString(), UCalendar::getTimeZoneName(), UMessageFormat::setLocale(), this(), UMessageFormat::this(), UDateFormat::this(), UText::toLower(), ICU::toString(), and UText::toUpper(). |
|
Definition at line 175 of file ICU.d. References ICU::toString(). |
|
Definition at line 184 of file ICU.d. References strlen(). |
|
Definition at line 193 of file ICU.d. References wcslen(). |
|
Definition at line 202 of file ICU.d. References strlen(). Referenced by UConverter::detectSignature(), getKey(), getLocale(), UMessageFormat::getLocale(), and UConverter::getName(). |
|
Definition at line 213 of file ICU.d. References wcslen(). |
|
Definition at line 108 of file UResourceBundle.d. |