Boost.Locale
boost::locale::basic_message< CharType > Class Template Reference

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

#include <boost/locale/message.hpp>

Public Types

typedef CharType char_type
 The character this message object is used with.
 
typedef std::basic_string< char_typestring_type
 The string type this object can be used with.
 
typedef message_format< char_typefacet_type
 The type of the facet the messages are fetched with.
 

Public Member Functions

 basic_message ()
 Create default empty message.
 
 basic_message (const char_type *id)
 
 basic_message (const char_type *single, const char_type *plural, int n)
 
 basic_message (const char_type *context, const char_type *id)
 
 basic_message (const char_type *context, const char_type *single, const char_type *plural, int n)
 
 basic_message (const string_type &id)
 Create a simple message from a string.
 
 basic_message (const string_type &single, const string_type &plural, int number)
 
 basic_message (const string_type &context, const string_type &id)
 Create a simple message from a string with context.
 
 basic_message (const string_type &context, const string_type &single, const string_type &plural, int number)
 
 basic_message (const basic_message &other)=default
 Copy an object.
 
 basic_message (basic_message &&other)=default
 
basic_messageoperator= (const basic_message &other)=default
 Assign other message object to this one.
 
basic_messageoperator= (basic_message &&other)=default
 
void swap (basic_message &other)
 Swap two message objects.
 
 operator string_type () const
 Message class can be explicitly converted to string class.
 
string_type str () const
 Translate message to a string in the default global locale, using default domain.
 
string_type str (const std::locale &locale) const
 Translate message to a string in the locale locale, using default domain.
 
string_type str (const std::locale &locale, const std::string &domain_id) const
 Translate message to a string using locale locale and message domain domain_id.
 
string_type str (const std::string &domain_id) const
 Translate message to a string using the default locale and message domain domain_id.
 
string_type str (const std::locale &loc, int id) const
 Translate message to a string using locale loc and message domain index id.
 
void write (std::basic_ostream< char_type > &out) const
 

Detailed Description

template<typename CharType>
class boost::locale::basic_message< CharType >

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

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


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