The Battle for Wesnoth  1.19.7+dev
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

◆ catalog()

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

◆ form_context_index()

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

◆ form_index()

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

◆ from_istream()

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

◆ from_iterators() [1/2]

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

◆ from_iterators() [2/2]

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 b, spirit_po::catalog< hashmap_type, pf_compiler >::catalog(), e, and w.

◆ from_range()

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

◆ get() [1/2]

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

◆ get() [2/2]

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

◆ get_hashmap()

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

◆ get_metadata()

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

◆ gettext()

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

◆ gettext_line_no()

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

◆ gettext_str() [1/2]

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

◆ gettext_str() [2/2]

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

◆ gettext_str_impl()

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

◆ insert_message()

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

◆ merge()

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

◆ ngettext()

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

◆ ngettext_str() [1/4]

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

◆ ngettext_str() [2/4]

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

◆ ngettext_str() [3/4]

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

◆ ngettext_str() [4/4]

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

◆ ngettext_str_impl()

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

◆ npgettext()

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

◆ npgettext_str() [1/4]

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

◆ npgettext_str() [2/4]

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

◆ npgettext_str() [3/4]

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

◆ npgettext_str() [4/4]

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

◆ npgettext_str_impl()

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

◆ pgettext()

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

◆ pgettext_line_no()

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

◆ pgettext_str() [1/2]

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

◆ pgettext_str() [2/2]

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

◆ pgettext_str_impl()

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

◆ set_warning_channel()

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

◆ size()

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

Member Data Documentation

◆ hashmap_

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

◆ metadata_

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

◆ pf_function_object_

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

◆ singular_index_

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

◆ warning_channel_

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: