Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

UMessageFormat Class Reference

Inheritance diagram for UMessageFormat:

ICU List of all members.

Public Member Functions

 this (UText pattern, inout ULocale locale)
 ~this ()
UMessageFormat setLocale (inout ULocale locale)
UMessageFormat getLocale (inout ULocale locale)
UMessageFormat setPattern (UText pattern)
UMessageFormat getPattern (UString s)
UMessageFormat format (UString s, UList list)

Static Public Member Functions

void test ()

Private Types

typedef void * Handle
enum  Error { OK, BufferOverflow = 15 }

Static Private Member Functions

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

Detailed Description

Provides means to produce concatenated messages in language-neutral way. Use this for all concatenations that show up to end users. Takes a set of objects, formats them, then inserts the formatted strings into the pattern at the appropriate places.

See this page for full details.

Definition at line 101 of file UMessageFormat.d.


Member Typedef Documentation

typedef void* Handle [protected, inherited]
 

Use this for the primary argument-type to most ICU functions

Definition at line 109 of file ICU.d.


Member Enumeration Documentation

enum Error [protected, inherited]
 

ICU error codes (the ones which are referenced)

Enumeration values:
OK 
BufferOverflow 

Definition at line 117 of file ICU.d.


Constructor & Destructor Documentation

~this  )  [inline]
 

Release message formatter

Definition at line 126 of file UMessageFormat.d.


Member Function Documentation

this UText  pattern,
inout ULocale  locale
[inline]
 

Open a message formatter with given pattern and for the given locale.

Definition at line 112 of file UMessageFormat.d.

References ICU::testError(), and ICU::toString().

UMessageFormat setLocale inout ULocale  locale  )  [inline]
 

This locale is used for fetching default number or date format information

Definition at line 138 of file UMessageFormat.d.

References ICU::toString().

UMessageFormat getLocale inout ULocale  locale  )  [inline]
 

This locale is used for fetching default number or date format information

Definition at line 151 of file UMessageFormat.d.

References ICU::toArray().

UMessageFormat setPattern UText  pattern  )  [inline]
 

Sets the pattern

Definition at line 163 of file UMessageFormat.d.

References UText::get(), UText::len, and ICU::testError().

UMessageFormat getPattern UString  s  )  [inline]
 

Gets the pattern

Definition at line 178 of file UMessageFormat.d.

References UString::format().

UMessageFormat format UString  s,
UList  list
[inline]
 

This function may perform re-ordering of the arguments depending on the locale. For all numeric arguments, double is assumed unless the type is explicitly integer. All choice format arguments must be of type double.

Definition at line 198 of file UMessageFormat.d.

References UList::args, and UString::format().

Referenced by test().

void test  )  [inline, static]
 

Definition at line 278 of file UMessageFormat.d.

References format(), UMessageFormat, and UString.

bool isError Error  e  )  [inline, static, protected, inherited]
 

Definition at line 127 of file ICU.d.

Referenced by UConverter::detectSignature(), UString::format(), and UConverter::this().

void testError Error  e,
char[]  msg
[inline, static, protected, inherited]
 

Definition at line 145 of file ICU.d.

Referenced by UCalendar::add(), UText::compareFolded(), UConverter::decode(), UConverter::encode(), UResourceBundle::get(), UCalendar::get(), UResourceBundle::getBinary(), UResourceBundle::getInt(), UResourceBundle::getIntVector(), UCalendar::getLimit(), UResourceBundle::getLocale(), UCalendar::getMillis(), UConverter::getName(), UResourceBundle::getNextString(), UResourceBundle::getString(), UDateFormat::getTwoDigitYearStart(), UCalendar::inDaylightTime(), UDateFormat::parse(), UCalendar::roll(), UCalendar::setDate(), UCalendar::setDateTime(), UCalendar::setMillis(), UDecimalFormat::setPattern(), setPattern(), UCalendar::setTimeZone(), UDateFormat::setTwoDigitYearStart(), UResourceBundle::this(), UNumberFormat::this(), this(), UDateFormat::this(), and UCalendar::this().

char* toString char[]  string  )  [inline, static, protected, inherited]
 

Definition at line 155 of file ICU.d.

Referenced by UConverter::compareNames(), UResourceBundle::getResource(), UResourceBundle::getString(), UCalendar::getTimeZoneName(), setLocale(), UResourceBundle::this(), this(), UDateFormat::this(), UText::toLower(), ICU::toString(), and UText::toUpper().

wchar* toString wchar[]  string  )  [inline, static, protected, inherited]
 

Definition at line 175 of file ICU.d.

References ICU::toString().

uint length char *  s  )  [inline, static, protected, inherited]
 

Definition at line 184 of file ICU.d.

References strlen().

uint length wchar *  s  )  [inline, static, protected, inherited]
 

Definition at line 193 of file ICU.d.

References wcslen().

char [] toArray char *  s  )  [inline, static, protected, inherited]
 

Definition at line 202 of file ICU.d.

References strlen().

Referenced by UConverter::detectSignature(), UResourceBundle::getKey(), UResourceBundle::getLocale(), getLocale(), and UConverter::getName().

wchar [] toArray wchar *  s  )  [inline, static, protected, inherited]
 

Definition at line 213 of file ICU.d.

References wcslen().


Member Data Documentation

Handle handle [private]
 

Definition at line 103 of file UMessageFormat.d.


The documentation for this class was generated from the following file:
Generated on Sun Nov 7 19:07:13 2004 for Mango by doxygen 1.3.6