6 #ifndef SPIRIT_PO_PO_MESSAGE_HPP_INCLUDED
7 #define SPIRIT_PO_PO_MESSAGE_HPP_INCLUDED
9 #include <boost/optional/optional.hpp>
41 #ifdef SPIRIT_PO_DEBUG
42 inline std::string debug_string(
const po_message &
msg) {
43 std::string result =
"{\n";
45 result +=
" context: \"" + *
msg.context +
"\"\n";
47 result +=
" id: \"" +
msg.id +
"\"\n";
48 result +=
" id_plural: \"" +
msg.id_plural() +
"\"\n";
49 result +=
" strings: { ";
51 if (
i) { result +=
", "; }
52 result +=
'"' +
msg.strings()[
i] +
'"';
std::pair< std::string, std::vector< std::string > > plural_and_strings_type
std::size_t size(std::string_view str)
Length in characters of a UTF-8 string.
static void msg(const char *act, debug_info &i, const char *to="", const char *result="")
plural_and_strings_type plural_and_strings
std::vector< std::string > & strings()
const std::string & id_plural() const
boost::optional< std::string > context
std::string & id_plural()
const std::vector< std::string > & strings() const