Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

LocaleSwitcher Class Reference

class that handels the locale language switch. More...

#include <locale.h>

List of all members.

Public Types

typedef std::list< Tagtag_list
typedef tag_list::iterator tag_list_it
enum  What { LOCALE_OPEN, LOCALE_LANG, LOCALE_CLOSE, OTHERS }

Public Methods

 LocaleSwitcher (tag_list tlist, std::string language, bool no_lang_warn=true)
bool operator! () const
std::string get_locale ()
 returns the locale string of the specific language. More...

Error get_error () const

Private Types

typedef std::list< Languagelanguage_list
typedef language_list::iterator language_list_it

Private Methods

bool create_lang_list ()
 creates the language list. More...

bool is_sane ()
 returns true if tlist contains a sane system. More...

bool find_language ()
 searches for the language. More...

bool compare_language (std::string loc_lang, std::string lang)

Private Attributes

Language lang
language_list langs
tag_list tlist
bool is_valid
 true if the locale system is valid. More...

std::string language
 the current language. More...

Error error

Friends

std::ostream & operator<< (std::ostream &, const LocaleSwitcher::Tag &t)


Detailed Description

class that handels the locale language switch.


Member Typedef Documentation

typedef std::list<Language> LocaleSwitcher::language_list [private]
 

typedef language_list::iterator LocaleSwitcher::language_list_it [private]
 

typedef std::list<Tag> LocaleSwitcher::tag_list
 

typedef tag_list::iterator LocaleSwitcher::tag_list_it
 


Member Enumeration Documentation

enum LocaleSwitcher::What
 

Enumeration values:
LOCALE_OPEN  <locale>.
LOCALE_LANG  <locale language="de">.
LOCALE_CLOSE  </locale>.
OTHERS  anything other.


Constructor & Destructor Documentation

LocaleSwitcher::LocaleSwitcher tag_list    tlist,
std::string    language,
bool    no_lang_warn = true
 


Member Function Documentation

bool LocaleSwitcher::compare_language std::string    loc_lang,
std::string    lang
[private]
 

bool LocaleSwitcher::create_lang_list   [private]
 

creates the language list.

bool LocaleSwitcher::find_language   [private]
 

searches for the language.

and stores the Language in the lang structure

Error LocaleSwitcher::get_error   const [inline]
 

std::string LocaleSwitcher::get_locale  
 

returns the locale string of the specific language.

bool LocaleSwitcher::is_sane   [private]
 

returns true if tlist contains a sane system.

bool LocaleSwitcher::operator!   const [inline]
 


Friends And Related Function Documentation

std::ostream& operator<< std::ostream &    out,
const LocaleSwitcher::Tag   t
[friend]
 


Member Data Documentation

Error LocaleSwitcher::error [private]
 

bool LocaleSwitcher::is_valid [private]
 

true if the locale system is valid.

Language LocaleSwitcher::lang [private]
 

language_list LocaleSwitcher::langs [private]
 

std::string LocaleSwitcher::language [private]
 

the current language.

tag_list LocaleSwitcher::tlist [private]
 


The documentation for this class was generated from the following files:
Generated on Tue Nov 20 02:19:54 2001 for Leo<HTML> by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001