zeus::TLocale Class Reference

#include <Locale.h>

Inheritance diagram for zeus::TLocale:

zeus::TZObject zeus::IZUnknown

List of all members.

Public Member Functions

 TLocale ()
 TLocale (const IString &rLanguage)
 TLocale (const IString &rLanguage, const IString &rCountry)
 TLocale (const IString &rLanguage, const IString &rCountry, const IString &rVariant)
 TLocale (TString strLanguage, TString strCountry=L"", TString strVariant=L"")
 TLocale (const TLocale &rLocale)
virtual ~TLocale ()
TString getCountry () const
TString getLanguage () const
TString getVariant () const
TString toString () const
TLocaleoperator= (const TLocale &rLocale)
bool operator== (const TLocale &rLocale) const

Static Public Member Functions

static const TLocalegetDefault ()
static void setDefault (const TLocale &rLocale)
static Retval activateTemporaryLocale (const TLocale &rLocale)
static void deactivateTemporaryLocale ()


Detailed Description

The locale class is used for internationalisation. All information about language settings, charsets etc. are stored.

Constructor & Destructor Documentation

TLocale::TLocale (  ) 

Creates a default locale

TLocale::TLocale ( const IString rLanguage  ) 

Creates a locale

Parameters:
rLanguage : Language of the locale

TLocale::TLocale ( const IString rLanguage,
const IString rCountry 
)

Creates a locale

Parameters:
rLanguage : Language of the locale
rCountry : Contry code of the locale

TLocale::TLocale ( const IString rLanguage,
const IString rCountry,
const IString rVariant 
)

Creates a locale

Parameters:
rLanguage : Language of the locale
rCountry : Contry code of the locale
rVariant : some variants of the locale

TLocale::TLocale ( TString  strLanguage,
TString  strCountry = L"",
TString  strVariant = L"" 
)

Creates a default locale

Parameters:
strLanguage : Language of the locale
strCountry : Contry code of the locale
strVariant : some variants of the locale

TLocale::TLocale ( const TLocale rLocale  ) 

Protected copy constructor

Parameters:
rLocale : Object to copy

TLocale::~TLocale (  )  [virtual]

Destroys the locale


Member Function Documentation

TString zeus::TLocale::getCountry (  )  const [inline]

returns the country code of the locale

TString zeus::TLocale::getLanguage (  )  const [inline]

returns the language code of the locale

TString zeus::TLocale::getVariant (  )  const [inline]

returns the variant code of the locale

TString TLocale::toString (  )  const

returns the locale as a string value. Format is like en_US

Reimplemented from zeus::TZObject.

const TLocale & TLocale::getDefault (  )  [static]

static method to return a default locale instance

Parameters:
rpLocale : return parameter of the default locale
Return values:
RET_NOERROR : default locale returned
RET_REQUEST_FAILED : could not return the default locale

void TLocale::setDefault ( const TLocale rLocale  )  [static]

sets a new locale as default

Parameters:
rLocale : Default locale to set

Retval TLocale::activateTemporaryLocale ( const TLocale rLocale  )  [static]

activates a locale object. All locale settings will be stored inside a backup list. Use deactivateTemporaryLocale() to switch back to the last locale settings. If the backup list is empty the default locale will be activated

Parameters:
rLocale : locale to activate temporary

void TLocale::deactivateTemporaryLocale (  )  [static]

reactivates the last locale

TLocale & TLocale::operator= ( const TLocale rLocale  ) 

Assign operator

Parameters:
rLocale : Object to assign
Returns:
this locale

bool TLocale::operator== ( const TLocale rLocale  )  const

compare operator

Parameters:
rLocale : Object to compare
Return values:
true : Locales are equal
false,: Locales are different


The documentation for this class was generated from the following files:


Written by Benjamin Hadorn http://www.xatlantis.ch.
Last change made on Wed Oct 28 21:42:35 2009