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 | |
this () | |
~this () | |
void | test () |
Static Public Attributes | |
FunctionLoader Bind[] | targets |
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 |
Static Private Attributes | |
void * | library |
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 109 of file UResourceBundle.d.
|
Use this for the primary argument-type to most ICU functions |
|
Internals opened up to the public Definition at line 120 of file UResourceBundle.d. Referenced by getType(). |
|
ICU error codes (the ones which are referenced) |
|
Definition at line 183 of file UResourceBundle.d. |
|
Definition at line 527 of file UResourceBundle.d. |
|
private constructor for internal use only Definition at line 138 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 171 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 196 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 208 of file UResourceBundle.d. References ICU::testError(). |
|
Returns a string from a string resource type Definition at line 223 of file UResourceBundle.d. References ICU::testError(). |
|
Returns the string in a given resource at the specified index Definition at line 240 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 257 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 274 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 292 of file UResourceBundle.d. References ICU::testError(). |
|
Returns an integer vector from a resource Definition at line 308 of file UResourceBundle.d. References ICU::testError(). |
|
Checks whether the resource has another element to iterate over Definition at line 325 of file UResourceBundle.d. |
|
Resets the internal context of a resource so that iteration starts from the first element Definition at line 337 of file UResourceBundle.d. |
|
Returns the next resource in a given resource or NULL if there are no more resources Definition at line 349 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 363 of file UResourceBundle.d. References get(), and ICU::toString(). |
|
Returns the resource at the specified index Definition at line 376 of file UResourceBundle.d. References get(). |
|
Return the version number associated with this ResourceBundle as a UVersionInfo array Definition at line 390 of file UResourceBundle.d. |
|
Return the ULocale associated with this ResourceBundle Definition at line 401 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 417 of file UResourceBundle.d. References ICU::toArray(). |
|
Returns the type of a resource. Available types are defined in enum UResType Definition at line 429 of file UResourceBundle.d. References ResType. |
|
Worker function for constructing internal ResourceBundle instances. Returns null when the provided handle is null. Definition at line 441 of file UResourceBundle.d. References ICU::testError(), and UResourceBundle. Referenced by getNextResource(), and getResource(). |
|
Definition at line 517 of file UResourceBundle.d. |
|
Definition at line 536 of file UResourceBundle.d. References getNextResource(), getNextString(), and UResourceBundle. |
|
Definition at line 110 of file ICU.d. Referenced by UConverter::detectSignature(), UString::format(), UCollator::getLocale(), and UConverter::this(). |
|
|
Definition at line 138 of file ICU.d. References string. Referenced by UChar::charFromName(), UConverter::compareNames(), UCollator::getDisplayName(), getResource(), UCollator::getShortDefinitionString(), getString(), UCalendar::getTimeZoneName(), UCollator::normalizeShortDefinitionString(), UMessageFormat::setLocale(), UStringPrep::this(), this(), UDateFormat::this(), UCollator::this(), UBreakIterator::this(), UText::toLower(), and UText::toUpper(). |
|
Definition at line 160 of file ICU.d. References string. |
|
Definition at line 182 of file ICU.d. References strlen(). |
|
Definition at line 191 of file ICU.d. References wcslen(). |
|
Definition at line 200 of file ICU.d. References strlen(). Referenced by UConverter::detectSignature(), getKey(), getLocale(), UMessageFormat::getLocale(), UCollator::getLocale(), UConverter::getName(), UChar::getPropertyName(), UChar::getPropertyValueName(), and UConverter::opApply(). |
|
Definition at line 211 of file ICU.d. References wcslen(). |
|
Definition at line 111 of file UResourceBundle.d. |
|
Bind the ICU functions from a shared library. This is complicated by the issues regarding D and DLLs on the Windows platform Definition at line 458 of file UResourceBundle.d. |
|
Initial value: [ {cast(void**) &ures_open, "ures_open"} Definition at line 491 of file UResourceBundle.d. |