| Boost.Locale

Public Types | Public Member Functions | Friends | List of all members
boost::locale::basic_message< CharType > Class Template Reference
Message Formatting (translation)

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_type > | string_type
| The string type this object can be used with.
typedef message_format< char_type > | facet_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, count_type 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, count_type n)
| basic_message (const string_type &id)
| Create a simple message from a string.
| basic_message (const string_type &single, const string_type &plural, count_type 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, count_type number)
| basic_message (const basic_message &)=default
| Copy an object.
| basic_message (basic_message &&) noexcept=default
basic_message & | operator= (const basic_message &)=default
| Assign other message object to this one.
basic_message & | operator= (basic_message &&) noexcept(std::is_nothrow_move_assignable< string_type >::value)=default
void | swap (basic_message &other) noexcept(noexcept(std::declval< string_type & >().swap(std::declval< string_type & >())))
| 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

## Friends
void | swap (basic_message &x, basic_message &y) noexcept(noexcept(x.swap(y)))

## 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:

- boost/locale/message.hpp

- © Copyright 2009-2012 Artyom Beilis, Distributed under the Boost Software License, Version 1.0.