boost::locale::message Struct Reference
[Message Formatting (translation)]

This class represents a message that can be converted to specific locale message. More...

#include <boost/locale/message.hpp>

List of all members.

Public Member Functions

 message ()
 message (char const *id)
 message (char const *single, char const *plural, int n)
 message (std::string const &id)
 message (std::string const &single, std::string const &plural, int number)
template<typename CharType>
 operator std::basic_string< CharType > () const
template<typename CharType>
std::basic_string< CharType > str () const
template<typename CharType>
std::basic_string< CharType > str (std::locale const &locale) const
template<typename CharType>
std::basic_string< CharType > str (std::locale const &locale, std::string domain_id) const
template<typename CharType>
std::basic_string< CharType > str (std::string domain_id) const
template<typename CharType>
std::basic_string< CharType > str (std::locale const &loc, int id) const
template<typename CharType>
void write (std::basic_ostream< CharType > &out) const


Detailed Description

This class represents a message that can be converted to specific locale message.

/** It holds original ASCII string that is queried in the dictionary when converting to output string. The created string may be UTF-8, UTF-16, UTF-32 or other 8-bit encoded string according to target character type and locale encoding.


Constructor & Destructor Documentation

boost::locale::message::message (  )  [inline]

Create default empty message

boost::locale::message::message ( char const *  id  )  [inline, explicit]

Create a simple message from 0 terminated string. The string should exist until message is destroyed. Generally useful with static constant strings

boost::locale::message::message ( char const *  single,
char const *  plural,
int  n 
) [inline, explicit]

Create a simple plural form message from 0 terminated strings. The strings should exist until message is destroyed. Generally useful with static constant strings.

n is the number, single and plural are single and plural forms of message

boost::locale::message::message ( std::string const &  id  )  [inline, explicit]

Create a simple message from string.

boost::locale::message::message ( std::string const &  single,
std::string const &  plural,
int  number 
) [inline, explicit]

Create a simple plural form message from strings.

n is the number, single and plural are single and plural forms of message


Member Function Documentation

template<typename CharType>
boost::locale::message::operator std::basic_string< CharType > (  )  const [inline]

Message class can be explicitly converter to string class

template<typename CharType>
std::basic_string<CharType> boost::locale::message::str (  )  const [inline]

Translate message to the string in default global locale, using default domain

template<typename CharType>
std::basic_string<CharType> boost::locale::message::str ( std::locale const &  locale  )  const [inline]

Translate message to string in the locale locale, using default domain

template<typename CharType>
std::basic_string<CharType> boost::locale::message::str ( std::locale const &  locale,
std::string  domain_id 
) const [inline]

Translate message to string using locale locale and message domain \ a domain_id

template<typename CharType>
std::basic_string<CharType> boost::locale::message::str ( std::string  domain_id  )  const [inline]

Translate message to string using defailt locale message domain \ a domain_id

template<typename CharType>
std::basic_string<CharType> boost::locale::message::str ( std::locale const &  loc,
int  id 
) const [inline]

Translate message to string using locale loc and message domain index \ a id

template<typename CharType>
void boost::locale::message::write ( std::basic_ostream< CharType > &  out  )  const [inline]

Translate message and write to stream out, using imbued locale and domain set to the stream


The documentation for this struct was generated from the following file:

Generated on Thu Mar 18 23:02:03 2010 for Boost.Locale by doxygen 1.5.6