YLocale Class Reference

#include <YCode.h>

Inheritance diagram for YLocale:
YCode Rep

List of all members.

Classes

struct  eqstr

Public Types

typedef __gnu_cxx::hash_map
< const char *, bool,
__gnu_cxx::hash< const char * >
, eqstr
t_uniquedomains

Public Member Functions

 YLocale (const char *locale, const char *textdomain)
 YLocale (bytecodeistream &str)
 ~YLocale ()
virtual ykind kind () const
const char * value () const
const char * domain () const
string toString () const
std::ostream & toStream (std::ostream &str) const
std::ostream & toXml (std::ostream &str, int indent) const
YCPValue evaluate (bool cse=false)
constTypePtr type () const

Static Public Member Functions

static
t_uniquedomains::const_iterator 
setDomainStatus (const string &domain, bool status)
static void ensureBindDomain (const string &domain)
static void bindDomainDir (const string &domain, const string &domain_path)
static bool findDomain (const string &domain)

Static Public Attributes

static t_uniquedomains domains

Private Member Functions

 REP_BODY (YLocale)

Private Attributes

const char * m_locale
t_uniquedomains::const_iterator m_domain

Member Typedef Documentation

typedef __gnu_cxx::hash_map<const char*, bool, __gnu_cxx::hash<const char*>, eqstr> YLocale::t_uniquedomains

Constructor & Destructor Documentation

YLocale::YLocale ( const char *  locale,
const char *  textdomain 
)

References domains, and m_domain.

YLocale::YLocale ( bytecodeistream str  ) 
YLocale::~YLocale (  ) 

References m_locale.


Member Function Documentation

void YLocale::bindDomainDir ( const string &  domain,
const string &  domain_path 
) [static]

References setDomainStatus(), and y2debug.

Referenced by ensureBindDomain(), and s_dpgettext().

const char * YLocale::domain (  )  const

References m_domain.

void YLocale::ensureBindDomain ( const string &  domain  )  [static]
YCPValue YLocale::evaluate ( bool  cse = false  )  [virtual]

Execute YCP code to get the resulting YCPValue. Every inherited class of YCode should reimplement this method.

Returns:
YCPValue after executing the code
Parameters:
cse should the evaluation be done for parse time evaluation (i.e. constant subexpression elimination)

Reimplemented from YCode.

References m_domain, m_locale, and y2debug.

bool YLocale::findDomain ( const string &  domain  )  [static]

References domains.

Referenced by s_dpgettext().

virtual ykind YLocale::kind (  )  const [inline, virtual]

Kind of this YCode. This method must be reimplemented in the inherited classes.

Returns:
the YCode kind

Implements YCode.

References YCode::ycLocale.

YLocale::REP_BODY ( YLocale   )  [private]
YLocale::t_uniquedomains::const_iterator YLocale::setDomainStatus ( const string &  domain,
bool  status 
) [static]

References domains.

Referenced by bindDomainDir().

std::ostream & YLocale::toStream ( std::ostream &  str  )  const [virtual]

Write YCP code to a byte stream (bytecode implementation). Every class inheriting from YCode must reimplement this method.

Parameters:
str byte stream to store into
Returns:
byte stream for chaining writing bytecode (str)

Implements YCode.

References m_domain, m_locale, and Bytecode::writeCharp().

string YLocale::toString ( void   )  const [virtual]

Return ASCII represtation of this YCP code.

Returns:
ASCII string representation

Reimplemented from YCode.

References m_locale.

std::ostream & YLocale::toXml ( std::ostream &  str,
int  indent 
) const [virtual]

Write YCP code as XML representation. Every class inheriting from YCode must reimplement this method.

Parameters:
str string stream to store into
indend indentation level for pretty print
Returns:
string stream for chaining writing XML (str)

Implements YCode.

References m_domain, m_locale, and Xmlcode::xmlify().

constTypePtr YLocale::type (  )  const [inline, virtual]

Return type of this YCP code (interesting mostly for function calls).

Returns:
type of the value to be returned after calling evaluate

Reimplemented from YCode.

References Type::Locale.

const char * YLocale::value (  )  const

References m_locale.


Member Data Documentation

t_uniquedomains::const_iterator YLocale::m_domain [private]
const char* YLocale::m_locale [private]

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

Generated on a sunny day for yast2-core by doxygen 1.6.3