The Battle for Wesnoth  1.13.10+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
spirit_po::catalog< hashmap_type, pf_compiler > Class Template Reference

#include <catalog.hpp>

Public Member Functions

template<typename Iterator >
 catalog (spirit::line_pos_iterator< Iterator > &it, spirit::line_pos_iterator< Iterator > &end, warning_channel_type warn_channel=warning_channel_type(), pf_compiler compiler=pf_compiler())
 
const char * gettext (const char *msgid) const
 
const char * ngettext (const char *msgid, const char *msgid_plural, uint plural) const
 
const char * pgettext (const char *context, const char *msgid) const
 
const char * npgettext (const char *context, const char *msgid, const char *msgid_plural, uint plural) const
 
std::string gettext_str (const std::string &msgid) const
 
std::string gettext_str (std::string &&msgid) const
 
std::string ngettext_str (const std::string &msgid, const std::string &msgid_plural, uint plural) const
 
std::string ngettext_str (std::string &&msgid, const std::string &msgid_plural, uint plural) const
 
std::string ngettext_str (const std::string &msgid, std::string &&msgid_plural, uint plural) const
 
std::string ngettext_str (std::string &&msgid, std::string &&msgid_plural, uint plural) const
 
std::string pgettext_str (const std::string &context, const std::string &msgid) const
 
std::string pgettext_str (const std::string &context, std::string &&msgid) const
 
std::string npgettext_str (const std::string &context, const std::string &msgid, const std::string &msgid_plural, uint plural) const
 
std::string npgettext_str (const std::string &context, std::string &&msgid, const std::string &msgid_plural, uint plural) const
 
std::string npgettext_str (const std::string &context, const std::string &msgid, std::string &&msgid_plural, uint plural) const
 
std::string npgettext_str (const std::string &context, std::string &&msgid, std::string &&msgid_plural, uint plural) const
 
std::size_t gettext_line_no (const std::string &msgid) const
 
std::size_t pgettext_line_no (const std::string &context, const std::string &msgid) const
 
const catalog_metadataget_metadata () const
 
uint size () const
 
const hashmap_type & get_hashmap () const
 
void set_warning_channel (const warning_channel_type &w)
 
template<typename H , typename P >
void merge (catalog< H, P > &&other)
 

Static Public Member Functions

static std::string form_context_index (const std::string &msgctxt, const std::string &id)
 
static std::string form_index (const po_message &msg)
 
template<typename Iterator >
static catalog from_iterators (Iterator &b, Iterator &e, warning_channel_type w=warning_channel_type())
 
template<typename Iterator >
static catalog from_iterators (spirit::line_pos_iterator< Iterator > &b, spirit::line_pos_iterator< Iterator > &e, warning_channel_type w=warning_channel_type())
 
template<typename Range >
static catalog from_range (const Range &range, warning_channel_type w=warning_channel_type())
 
static catalog from_istream (std::istream &is, warning_channel_type w=warning_channel_type())
 

Private Member Functions

const std::string & get (const po_message &msg) const
 
const std::string & get (const po_message &msg, uint plural) const
 
void insert_message (po_message &&msg)
 
template<typename S >
std::string gettext_str_impl (S &&msgid) const
 
template<typename S1 , typename S2 >
std::string ngettext_str_impl (S1 &&msgid, S2 &&msgid_plural, uint plural) const
 
template<typename S >
std::string pgettext_str_impl (const std::string &context, S &&msgid) const
 
template<typename S1 , typename S2 >
std::string npgettext_str_impl (const std::string &context, S1 &&msgid, S2 &&msgid_plural, uint plural) const
 

Private Attributes

catalog_metadata metadata_
 
pf_compiler::result_type pf_function_object_
 
uint singular_index_
 
warning_channel_type warning_channel_
 
hashmap_type hashmap_
 

Detailed Description

template<typename hashmap_type = default_hashmap_type, typename pf_compiler = default_plural_forms::compiler>
class spirit_po::catalog< hashmap_type, pf_compiler >

Definition at line 45 of file catalog.hpp.

Constructor & Destructor Documentation

template<typename hashmap_type = default_hashmap_type, typename pf_compiler = default_plural_forms::compiler>
template<typename Iterator >
spirit_po::catalog< hashmap_type, pf_compiler >::catalog ( spirit::line_pos_iterator< Iterator > &  it,
spirit::line_pos_iterator< Iterator > &  end,
warning_channel_type  warn_channel = warning_channel_type(),
pf_compiler  compiler = pf_compiler() 
)
inline

Member Function Documentation

template<typename hashmap_type = default_hashmap_type, typename pf_compiler = default_plural_forms::compiler>
static std::string spirit_po::catalog< hashmap_type, pf_compiler >::form_context_index ( const std::string &  msgctxt,
const std::string &  id 
)
inlinestatic
template<typename hashmap_type = default_hashmap_type, typename pf_compiler = default_plural_forms::compiler>
static std::string spirit_po::catalog< hashmap_type, pf_compiler >::form_index ( const po_message msg)
inlinestatic
template<typename hashmap_type = default_hashmap_type, typename pf_compiler = default_plural_forms::compiler>
static catalog spirit_po::catalog< hashmap_type, pf_compiler >::from_istream ( std::istream &  is,
warning_channel_type  w = warning_channel_type() 
)
inlinestatic
template<typename hashmap_type = default_hashmap_type, typename pf_compiler = default_plural_forms::compiler>
template<typename Iterator >
static catalog spirit_po::catalog< hashmap_type, pf_compiler >::from_iterators ( Iterator &  b,
Iterator &  e,
warning_channel_type  w = warning_channel_type() 
)
inlinestatic
template<typename hashmap_type = default_hashmap_type, typename pf_compiler = default_plural_forms::compiler>
template<typename Iterator >
static catalog spirit_po::catalog< hashmap_type, pf_compiler >::from_iterators ( spirit::line_pos_iterator< Iterator > &  b,
spirit::line_pos_iterator< Iterator > &  e,
warning_channel_type  w = warning_channel_type() 
)
inlinestatic

Definition at line 257 of file catalog.hpp.

References spirit_po::catalog< hashmap_type, pf_compiler >::catalog(), and w.

template<typename hashmap_type = default_hashmap_type, typename pf_compiler = default_plural_forms::compiler>
template<typename Range >
static catalog spirit_po::catalog< hashmap_type, pf_compiler >::from_range ( const Range &  range,
warning_channel_type  w = warning_channel_type() 
)
inlinestatic
template<typename hashmap_type = default_hashmap_type, typename pf_compiler = default_plural_forms::compiler>
const std::string& spirit_po::catalog< hashmap_type, pf_compiler >::get ( const po_message msg) const
inlineprivate
template<typename hashmap_type = default_hashmap_type, typename pf_compiler = default_plural_forms::compiler>
const std::string& spirit_po::catalog< hashmap_type, pf_compiler >::get ( const po_message msg,
uint  plural 
) const
inlineprivate
template<typename hashmap_type = default_hashmap_type, typename pf_compiler = default_plural_forms::compiler>
const hashmap_type& spirit_po::catalog< hashmap_type, pf_compiler >::get_hashmap ( ) const
inline
template<typename hashmap_type = default_hashmap_type, typename pf_compiler = default_plural_forms::compiler>
const catalog_metadata& spirit_po::catalog< hashmap_type, pf_compiler >::get_metadata ( ) const
inline
template<typename hashmap_type = default_hashmap_type, typename pf_compiler = default_plural_forms::compiler>
const char* spirit_po::catalog< hashmap_type, pf_compiler >::gettext ( const char *  msgid) const
inline

Definition at line 291 of file catalog.hpp.

template<typename hashmap_type = default_hashmap_type, typename pf_compiler = default_plural_forms::compiler>
std::size_t spirit_po::catalog< hashmap_type, pf_compiler >::gettext_line_no ( const std::string &  msgid) const
inline

Definition at line 406 of file catalog.hpp.

template<typename hashmap_type = default_hashmap_type, typename pf_compiler = default_plural_forms::compiler>
std::string spirit_po::catalog< hashmap_type, pf_compiler >::gettext_str ( const std::string &  msgid) const
inline
template<typename hashmap_type = default_hashmap_type, typename pf_compiler = default_plural_forms::compiler>
std::string spirit_po::catalog< hashmap_type, pf_compiler >::gettext_str ( std::string &&  msgid) const
inline
template<typename hashmap_type = default_hashmap_type, typename pf_compiler = default_plural_forms::compiler>
template<typename S >
std::string spirit_po::catalog< hashmap_type, pf_compiler >::gettext_str_impl ( S &&  msgid) const
inlineprivate
template<typename hashmap_type = default_hashmap_type, typename pf_compiler = default_plural_forms::compiler>
void spirit_po::catalog< hashmap_type, pf_compiler >::insert_message ( po_message &&  msg)
inlineprivate
template<typename hashmap_type = default_hashmap_type, typename pf_compiler = default_plural_forms::compiler>
template<typename H , typename P >
void spirit_po::catalog< hashmap_type, pf_compiler >::merge ( catalog< H, P > &&  other)
inline
template<typename hashmap_type = default_hashmap_type, typename pf_compiler = default_plural_forms::compiler>
const char* spirit_po::catalog< hashmap_type, pf_compiler >::ngettext ( const char *  msgid,
const char *  msgid_plural,
uint  plural 
) const
inline

Definition at line 300 of file catalog.hpp.

template<typename hashmap_type = default_hashmap_type, typename pf_compiler = default_plural_forms::compiler>
std::string spirit_po::catalog< hashmap_type, pf_compiler >::ngettext_str ( const std::string &  msgid,
const std::string &  msgid_plural,
uint  plural 
) const
inline
template<typename hashmap_type = default_hashmap_type, typename pf_compiler = default_plural_forms::compiler>
std::string spirit_po::catalog< hashmap_type, pf_compiler >::ngettext_str ( std::string &&  msgid,
const std::string &  msgid_plural,
uint  plural 
) const
inline
template<typename hashmap_type = default_hashmap_type, typename pf_compiler = default_plural_forms::compiler>
std::string spirit_po::catalog< hashmap_type, pf_compiler >::ngettext_str ( const std::string &  msgid,
std::string &&  msgid_plural,
uint  plural 
) const
inline
template<typename hashmap_type = default_hashmap_type, typename pf_compiler = default_plural_forms::compiler>
std::string spirit_po::catalog< hashmap_type, pf_compiler >::ngettext_str ( std::string &&  msgid,
std::string &&  msgid_plural,
uint  plural 
) const
inline
template<typename hashmap_type = default_hashmap_type, typename pf_compiler = default_plural_forms::compiler>
template<typename S1 , typename S2 >
std::string spirit_po::catalog< hashmap_type, pf_compiler >::ngettext_str_impl ( S1 &&  msgid,
S2 &&  msgid_plural,
uint  plural 
) const
inlineprivate
template<typename hashmap_type = default_hashmap_type, typename pf_compiler = default_plural_forms::compiler>
const char* spirit_po::catalog< hashmap_type, pf_compiler >::npgettext ( const char *  context,
const char *  msgid,
const char *  msgid_plural,
uint  plural 
) const
inline
template<typename hashmap_type = default_hashmap_type, typename pf_compiler = default_plural_forms::compiler>
std::string spirit_po::catalog< hashmap_type, pf_compiler >::npgettext_str ( const std::string &  context,
const std::string &  msgid,
const std::string &  msgid_plural,
uint  plural 
) const
inline
template<typename hashmap_type = default_hashmap_type, typename pf_compiler = default_plural_forms::compiler>
std::string spirit_po::catalog< hashmap_type, pf_compiler >::npgettext_str ( const std::string &  context,
std::string &&  msgid,
const std::string &  msgid_plural,
uint  plural 
) const
inline
template<typename hashmap_type = default_hashmap_type, typename pf_compiler = default_plural_forms::compiler>
std::string spirit_po::catalog< hashmap_type, pf_compiler >::npgettext_str ( const std::string &  context,
const std::string &  msgid,
std::string &&  msgid_plural,
uint  plural 
) const
inline
template<typename hashmap_type = default_hashmap_type, typename pf_compiler = default_plural_forms::compiler>
std::string spirit_po::catalog< hashmap_type, pf_compiler >::npgettext_str ( const std::string &  context,
std::string &&  msgid,
std::string &&  msgid_plural,
uint  plural 
) const
inline
template<typename hashmap_type = default_hashmap_type, typename pf_compiler = default_plural_forms::compiler>
template<typename S1 , typename S2 >
std::string spirit_po::catalog< hashmap_type, pf_compiler >::npgettext_str_impl ( const std::string &  context,
S1 &&  msgid,
S2 &&  msgid_plural,
uint  plural 
) const
inlineprivate
template<typename hashmap_type = default_hashmap_type, typename pf_compiler = default_plural_forms::compiler>
const char* spirit_po::catalog< hashmap_type, pf_compiler >::pgettext ( const char *  context,
const char *  msgid 
) const
inline
template<typename hashmap_type = default_hashmap_type, typename pf_compiler = default_plural_forms::compiler>
std::size_t spirit_po::catalog< hashmap_type, pf_compiler >::pgettext_line_no ( const std::string &  context,
const std::string &  msgid 
) const
inline
template<typename hashmap_type = default_hashmap_type, typename pf_compiler = default_plural_forms::compiler>
std::string spirit_po::catalog< hashmap_type, pf_compiler >::pgettext_str ( const std::string &  context,
const std::string &  msgid 
) const
inline
template<typename hashmap_type = default_hashmap_type, typename pf_compiler = default_plural_forms::compiler>
std::string spirit_po::catalog< hashmap_type, pf_compiler >::pgettext_str ( const std::string &  context,
std::string &&  msgid 
) const
inline
template<typename hashmap_type = default_hashmap_type, typename pf_compiler = default_plural_forms::compiler>
template<typename S >
std::string spirit_po::catalog< hashmap_type, pf_compiler >::pgettext_str_impl ( const std::string &  context,
S &&  msgid 
) const
inlineprivate
template<typename hashmap_type = default_hashmap_type, typename pf_compiler = default_plural_forms::compiler>
void spirit_po::catalog< hashmap_type, pf_compiler >::set_warning_channel ( const warning_channel_type w)
inline

Definition at line 445 of file catalog.hpp.

References w.

template<typename hashmap_type = default_hashmap_type, typename pf_compiler = default_plural_forms::compiler>
uint spirit_po::catalog< hashmap_type, pf_compiler >::size ( ) const
inline

Definition at line 432 of file catalog.hpp.

Member Data Documentation

template<typename hashmap_type = default_hashmap_type, typename pf_compiler = default_plural_forms::compiler>
hashmap_type spirit_po::catalog< hashmap_type, pf_compiler >::hashmap_
private
template<typename hashmap_type = default_hashmap_type, typename pf_compiler = default_plural_forms::compiler>
catalog_metadata spirit_po::catalog< hashmap_type, pf_compiler >::metadata_
private
template<typename hashmap_type = default_hashmap_type, typename pf_compiler = default_plural_forms::compiler>
pf_compiler::result_type spirit_po::catalog< hashmap_type, pf_compiler >::pf_function_object_
private
template<typename hashmap_type = default_hashmap_type, typename pf_compiler = default_plural_forms::compiler>
uint spirit_po::catalog< hashmap_type, pf_compiler >::singular_index_
private

Definition at line 49 of file catalog.hpp.

Referenced by spirit_po::catalog< hashmap_type, pf_compiler >::get().

template<typename hashmap_type = default_hashmap_type, typename pf_compiler = default_plural_forms::compiler>
warning_channel_type spirit_po::catalog< hashmap_type, pf_compiler >::warning_channel_
private

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