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 (wchar[] pattern, inout ULocale locale=ULocale.Default)
 this (UText pattern, inout ULocale locale=ULocale.Default)
 ~this ()
UMessageFormat setLocale (inout ULocale locale)
UMessageFormat getLocale (inout ULocale locale)
UMessageFormat setPattern (UText pattern)
UMessageFormat getPattern (UString s)
UMessageFormat format (UString s, Args *list)

Static Public Member Functions

 this ()
 ~this ()
void test ()

Static Public Attributes

FunctionLoader Bind[] targets

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

Static Private Attributes

void * library

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 104 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 114 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 148 of file ICU.d.


Constructor & Destructor Documentation

~this  )  [inline]
 

Release message formatter

Definition at line 141 of file UMessageFormat.d.

~this  )  [inline, static]
 

Definition at line 370 of file UMessageFormat.d.


Member Function Documentation

this wchar[]  pattern,
inout ULocale  locale = ULocale.Default
[inline]
 

Open a message formatter with given wchar[] and for the given locale.

Definition at line 115 of file UMessageFormat.d.

References ICU::testError().

this UText  pattern,
inout ULocale  locale = ULocale.Default
[inline]
 

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

Definition at line 130 of file UMessageFormat.d.

UMessageFormat setLocale inout ULocale  locale  )  [inline]
 

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

Definition at line 153 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 166 of file UMessageFormat.d.

References ICU::toArray().

UMessageFormat setPattern UText  pattern  )  [inline]
 

Sets the pattern

Definition at line 178 of file UMessageFormat.d.

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

UMessageFormat getPattern UString  s  )  [inline]
 

Gets the pattern

Definition at line 193 of file UMessageFormat.d.

References UString::format().

UMessageFormat format UString  s,
Args 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 213 of file UMessageFormat.d.

References UMessageFormat::Args::args, and UString::format().

Referenced by test().

this  )  [inline, static]
 

Definition at line 360 of file UMessageFormat.d.

void test  )  [inline, static]
 

Definition at line 379 of file UMessageFormat.d.

References format(), UMessageFormat, and UString.

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

Definition at line 158 of file ICU.d.

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

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

Definition at line 176 of file ICU.d.

Referenced by UCalendar::add(), USet::applyPattern(), UChar::charFromName(), UNormalize::check(), URegex::clone(), UNormalize::compare(), UDomainName::compare(), UConverter::UTranscoder::convert(), UEnumeration::count(), UConverter::decode(), UConverter::encode(), URegex::end(), UTransform::execute(), USearch::first(), UResourceBundle::get(), UCalendar::get(), UCollator::getAttribute(), UResourceBundle::getBinary(), UCollator::getBound(), UChar::getCharName(), UChar::getComment(), UCollator::getContractions(), URegex::getFlags(), UResourceBundle::getInt(), UResourceBundle::getIntVector(), UCalendar::getLimit(), UResourceBundle::getLocale(), UCalendar::getMillis(), UConverter::getName(), UResourceBundle::getNextString(), URegex::getPattern(), UCollator::getShortDefinitionString(), UResourceBundle::getString(), UCollator::getTailoredSet(), UDateFormat::getTwoDigitYearStart(), UCollator::getVariableTop(), URegex::groupCount(), UCalendar::inDaylightTime(), UNormalize::isNormalized(), USearch::last(), URegex::match(), USearch::next(), URegex::next(), UEnumeration::next(), UCollator::normalizeShortDefinitionString(), UDateFormat::parse(), USearch::previous(), URegex::probe(), URegex::replaceAll(), URegex::replaceFirst(), URegex::reset(), UEnumeration::reset(), UCalendar::roll(), UCollator::setAttribute(), USearch::setCollator(), UCalendar::setDate(), UCalendar::setDateTime(), UTransform::setFilter(), USearch::setIterator(), UCalendar::setMillis(), USearch::setOffset(), USearch::setPattern(), UDecimalFormat::setPattern(), setPattern(), USearch::setText(), URegex::setText(), UBreakIterator::setText(), UCalendar::setTimeZone(), UDateFormat::setTwoDigitYearStart(), UCollator::setVariableTop(), URegex::split(), URegex::start(), UTransform::this(), UStringPrep::this(), USet::this(), USearch::this(), UResourceBundle::this(), URegex::this(), UNumberFormat::this(), this(), UDateFormat::this(), UCollator::this(), UCalendar::this(), UBreakIterator::this(), URuleIterator::this(), and UText::toUtf8().

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

Definition at line 186 of file ICU.d.

References string.

Referenced by UChar::charFromName(), UConverter::compareNames(), UCollator::getDisplayName(), UResourceBundle::getResource(), UCollator::getShortDefinitionString(), UResourceBundle::getString(), UCalendar::getTimeZoneName(), UCollator::normalizeShortDefinitionString(), setLocale(), UStringPrep::this(), UResourceBundle::this(), UDateFormat::this(), UCollator::this(), UBreakIterator::this(), UText::toLower(), and UText::toUpper().

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

Definition at line 208 of file ICU.d.

References string.

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

Definition at line 230 of file ICU.d.

References strlen().

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

Definition at line 239 of file ICU.d.

References wcslen().

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

Definition at line 248 of file ICU.d.

References strlen().

Referenced by UConverter::detectSignature(), UResourceBundle::getKey(), UResourceBundle::getLocale(), getLocale(), UCollator::getLocale(), UConverter::getName(), UChar::getPropertyName(), UChar::getPropertyValueName(), and UConverter::opApply().

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

Definition at line 259 of file ICU.d.

References wcslen().


Member Data Documentation

Handle handle [private]
 

Definition at line 106 of file UMessageFormat.d.

void* library [static, private]
 

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 324 of file UMessageFormat.d.

FunctionLoader Bind [] targets [static]
 

Initial value:

 
                [
                {cast(void**) &umsg_open,               "umsg_open"}

Definition at line 345 of file UMessageFormat.d.


The documentation for this class was generated from the following file:
Generated on Sun Mar 6 00:31:17 2005 for Mango by doxygen 1.3.6