#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_metadata & | get_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_ |
Definition at line 45 of file catalog.hpp.
|
inline |
Definition at line 144 of file catalog.hpp.
References spirit_po::catalog< hashmap_type, pf_compiler >::hashmap_, spirit_po::po_grammar< Iterator >::ignored_comments, spirit_po::catalog< hashmap_type, pf_compiler >::insert_message(), spirit_po::iterator_context(), spirit_po::po_grammar< Iterator >::message_preamble, spirit_po::catalog< hashmap_type, pf_compiler >::metadata_, wfl::msg(), spirit_po::catalog_metadata::num_plural_forms, p, spirit_po::catalog_metadata::parse_header(), spirit_po::catalog< hashmap_type, pf_compiler >::pf_function_object_, spirit_po::catalog_metadata::plural_forms_function_string, spirit_po::catalog< hashmap_type, pf_compiler >::singular_index_, spirit_po::po_grammar< Iterator >::skipped_block, and SPIRIT_PO_CATALOG_FAIL.
Referenced by spirit_po::catalog< hashmap_type, pf_compiler >::from_iterators().
|
inlinestatic |
Definition at line 61 of file catalog.hpp.
References id.
Referenced by spirit_po::catalog< hashmap_type, pf_compiler >::form_index(), spirit_po::catalog< hashmap_type, pf_compiler >::npgettext(), spirit_po::catalog< hashmap_type, pf_compiler >::npgettext_str_impl(), spirit_po::catalog< hashmap_type, pf_compiler >::pgettext(), spirit_po::catalog< hashmap_type, pf_compiler >::pgettext_line_no(), and spirit_po::catalog< hashmap_type, pf_compiler >::pgettext_str_impl().
|
inlinestatic |
Definition at line 71 of file catalog.hpp.
References spirit_po::catalog< hashmap_type, pf_compiler >::form_context_index(), and wfl::msg().
Referenced by spirit_po::catalog< hashmap_type, pf_compiler >::insert_message().
|
inlinestatic |
Definition at line 269 of file catalog.hpp.
References spirit_po::catalog< hashmap_type, pf_compiler >::from_iterators(), and w.
|
inlinestatic |
Definition at line 250 of file catalog.hpp.
References b, spirit_po::catalog< hashmap_type, pf_compiler >::catalog(), e, and w.
Referenced by spirit_po::catalog< hashmap_type, pf_compiler >::from_istream(), and spirit_po::catalog< hashmap_type, pf_compiler >::from_range().
|
inlinestatic |
Definition at line 257 of file catalog.hpp.
References b, spirit_po::catalog< hashmap_type, pf_compiler >::catalog(), e, and w.
|
inlinestatic |
Definition at line 263 of file catalog.hpp.
References spirit_po::catalog< hashmap_type, pf_compiler >::from_iterators(), and w.
|
inlineprivate |
Definition at line 81 of file catalog.hpp.
References wfl::msg(), and spirit_po::catalog< hashmap_type, pf_compiler >::singular_index_.
Referenced by spirit_po::catalog< hashmap_type, pf_compiler >::gettext(), spirit_po::catalog< hashmap_type, pf_compiler >::gettext_str_impl(), spirit_po::catalog< hashmap_type, pf_compiler >::ngettext(), spirit_po::catalog< hashmap_type, pf_compiler >::ngettext_str_impl(), spirit_po::catalog< hashmap_type, pf_compiler >::npgettext(), spirit_po::catalog< hashmap_type, pf_compiler >::npgettext_str_impl(), spirit_po::catalog< hashmap_type, pf_compiler >::pgettext(), and spirit_po::catalog< hashmap_type, pf_compiler >::pgettext_str_impl().
|
inlineprivate |
Definition at line 86 of file catalog.hpp.
References wfl::msg(), spirit_po::catalog< hashmap_type, pf_compiler >::pf_function_object_, and spirit_po::catalog< hashmap_type, pf_compiler >::singular_index_.
|
inline |
Definition at line 440 of file catalog.hpp.
References spirit_po::catalog< hashmap_type, pf_compiler >::hashmap_.
|
inline |
Definition at line 427 of file catalog.hpp.
References spirit_po::catalog< hashmap_type, pf_compiler >::metadata_.
|
inline |
Definition at line 291 of file catalog.hpp.
References spirit_po::catalog< hashmap_type, pf_compiler >::get(), and spirit_po::catalog< hashmap_type, pf_compiler >::hashmap_.
|
inline |
Definition at line 406 of file catalog.hpp.
References spirit_po::catalog< hashmap_type, pf_compiler >::hashmap_.
|
inline |
Definition at line 387 of file catalog.hpp.
References spirit_po::catalog< hashmap_type, pf_compiler >::gettext_str_impl().
|
inline |
Definition at line 388 of file catalog.hpp.
References spirit_po::catalog< hashmap_type, pf_compiler >::gettext_str_impl().
|
inlineprivate |
Definition at line 337 of file catalog.hpp.
References spirit_po::catalog< hashmap_type, pf_compiler >::get(), and spirit_po::catalog< hashmap_type, pf_compiler >::hashmap_.
Referenced by spirit_po::catalog< hashmap_type, pf_compiler >::gettext_str().
|
inlineprivate |
Definition at line 95 of file catalog.hpp.
References spirit_po::catalog< hashmap_type, pf_compiler >::form_index(), spirit_po::catalog< hashmap_type, pf_compiler >::hashmap_, utf8::index(), spirit_po::catalog< hashmap_type, pf_compiler >::metadata_, wfl::msg(), spirit_po::catalog_metadata::num_plural_forms, and spirit_po::catalog< hashmap_type, pf_compiler >::warning_channel_.
Referenced by spirit_po::catalog< hashmap_type, pf_compiler >::catalog(), and spirit_po::catalog< hashmap_type, pf_compiler >::merge().
|
inline |
Definition at line 451 of file catalog.hpp.
References spirit_po::catalog_metadata::check_compatibility(), spirit_po::catalog< hashmap_type, pf_compiler >::insert_message(), spirit_po::catalog< hashmap_type, pf_compiler >::metadata_, p, and SPIRIT_PO_CATALOG_FAIL.
|
inline |
Definition at line 300 of file catalog.hpp.
References spirit_po::catalog< hashmap_type, pf_compiler >::get(), and spirit_po::catalog< hashmap_type, pf_compiler >::hashmap_.
|
inline |
Definition at line 390 of file catalog.hpp.
References spirit_po::catalog< hashmap_type, pf_compiler >::ngettext_str_impl().
|
inline |
Definition at line 392 of file catalog.hpp.
References spirit_po::catalog< hashmap_type, pf_compiler >::ngettext_str_impl().
|
inline |
Definition at line 391 of file catalog.hpp.
References spirit_po::catalog< hashmap_type, pf_compiler >::ngettext_str_impl().
|
inline |
Definition at line 393 of file catalog.hpp.
References spirit_po::catalog< hashmap_type, pf_compiler >::ngettext_str_impl().
|
inlineprivate |
Definition at line 347 of file catalog.hpp.
References spirit_po::catalog< hashmap_type, pf_compiler >::get(), and spirit_po::catalog< hashmap_type, pf_compiler >::hashmap_.
Referenced by spirit_po::catalog< hashmap_type, pf_compiler >::ngettext_str().
|
inline |
Definition at line 318 of file catalog.hpp.
References spirit_po::catalog< hashmap_type, pf_compiler >::form_context_index(), spirit_po::catalog< hashmap_type, pf_compiler >::get(), and spirit_po::catalog< hashmap_type, pf_compiler >::hashmap_.
|
inline |
Definition at line 398 of file catalog.hpp.
References spirit_po::catalog< hashmap_type, pf_compiler >::npgettext_str_impl().
|
inline |
Definition at line 400 of file catalog.hpp.
References spirit_po::catalog< hashmap_type, pf_compiler >::npgettext_str_impl().
|
inline |
Definition at line 399 of file catalog.hpp.
References spirit_po::catalog< hashmap_type, pf_compiler >::npgettext_str_impl().
|
inline |
Definition at line 401 of file catalog.hpp.
References spirit_po::catalog< hashmap_type, pf_compiler >::npgettext_str_impl().
|
inlineprivate |
Definition at line 371 of file catalog.hpp.
References spirit_po::catalog< hashmap_type, pf_compiler >::form_context_index(), spirit_po::catalog< hashmap_type, pf_compiler >::get(), and spirit_po::catalog< hashmap_type, pf_compiler >::hashmap_.
Referenced by spirit_po::catalog< hashmap_type, pf_compiler >::npgettext_str().
|
inline |
Definition at line 309 of file catalog.hpp.
References spirit_po::catalog< hashmap_type, pf_compiler >::form_context_index(), spirit_po::catalog< hashmap_type, pf_compiler >::get(), and spirit_po::catalog< hashmap_type, pf_compiler >::hashmap_.
|
inline |
Definition at line 415 of file catalog.hpp.
References spirit_po::catalog< hashmap_type, pf_compiler >::form_context_index(), and spirit_po::catalog< hashmap_type, pf_compiler >::hashmap_.
|
inline |
Definition at line 395 of file catalog.hpp.
References spirit_po::catalog< hashmap_type, pf_compiler >::pgettext_str_impl().
|
inline |
Definition at line 396 of file catalog.hpp.
References spirit_po::catalog< hashmap_type, pf_compiler >::pgettext_str_impl().
|
inlineprivate |
Definition at line 361 of file catalog.hpp.
References spirit_po::catalog< hashmap_type, pf_compiler >::form_context_index(), spirit_po::catalog< hashmap_type, pf_compiler >::get(), and spirit_po::catalog< hashmap_type, pf_compiler >::hashmap_.
Referenced by spirit_po::catalog< hashmap_type, pf_compiler >::pgettext_str().
|
inline |
Definition at line 445 of file catalog.hpp.
References w, and spirit_po::catalog< hashmap_type, pf_compiler >::warning_channel_.
|
inline |
Definition at line 432 of file catalog.hpp.
References spirit_po::catalog< hashmap_type, pf_compiler >::hashmap_.
|
private |
Definition at line 58 of file catalog.hpp.
Referenced by spirit_po::catalog< hashmap_type, pf_compiler >::catalog(), spirit_po::catalog< hashmap_type, pf_compiler >::get_hashmap(), spirit_po::catalog< hashmap_type, pf_compiler >::gettext(), spirit_po::catalog< hashmap_type, pf_compiler >::gettext_line_no(), spirit_po::catalog< hashmap_type, pf_compiler >::gettext_str_impl(), spirit_po::catalog< hashmap_type, pf_compiler >::insert_message(), spirit_po::catalog< hashmap_type, pf_compiler >::ngettext(), spirit_po::catalog< hashmap_type, pf_compiler >::ngettext_str_impl(), spirit_po::catalog< hashmap_type, pf_compiler >::npgettext(), spirit_po::catalog< hashmap_type, pf_compiler >::npgettext_str_impl(), spirit_po::catalog< hashmap_type, pf_compiler >::pgettext(), spirit_po::catalog< hashmap_type, pf_compiler >::pgettext_line_no(), spirit_po::catalog< hashmap_type, pf_compiler >::pgettext_str_impl(), and spirit_po::catalog< hashmap_type, pf_compiler >::size().
|
private |
Definition at line 46 of file catalog.hpp.
Referenced by spirit_po::catalog< hashmap_type, pf_compiler >::catalog(), spirit_po::catalog< hashmap_type, pf_compiler >::get_metadata(), spirit_po::catalog< hashmap_type, pf_compiler >::insert_message(), and spirit_po::catalog< hashmap_type, pf_compiler >::merge().
|
private |
Definition at line 48 of file catalog.hpp.
Referenced by spirit_po::catalog< hashmap_type, pf_compiler >::catalog(), and spirit_po::catalog< hashmap_type, pf_compiler >::get().
|
private |
Definition at line 49 of file catalog.hpp.
Referenced by spirit_po::catalog< hashmap_type, pf_compiler >::catalog(), and spirit_po::catalog< hashmap_type, pf_compiler >::get().
|
private |
Definition at line 56 of file catalog.hpp.
Referenced by spirit_po::catalog< hashmap_type, pf_compiler >::insert_message(), and spirit_po::catalog< hashmap_type, pf_compiler >::set_warning_channel().