6 #ifndef SPIRIT_PO_PO_MESSAGE_HPP_INCLUDED 7 #define SPIRIT_PO_PO_MESSAGE_HPP_INCLUDED 9 #include <boost/optional/optional.hpp> 27 std::string &
id_plural() {
return plural_and_strings.first; }
28 const std::string &
id_plural()
const {
return plural_and_strings.first; }
30 std::vector<std::string> &
strings() {
return plural_and_strings.second; }
31 const std::vector<std::string> &
strings()
const {
return plural_and_strings.second; }
41 #ifdef SPIRIT_PO_DEBUG 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] +
'"';
58 #endif // SPIRIT_PO_DEBUG 62 #endif // SPIRIT_PO_PO_MESSAGE_HPP_INCLUDED
const std::string & id_plural() const
static void msg(const char *act, debug_info &i, const char *to="", const char *result="")
plural_and_strings_type plural_and_strings
std::string & id_plural()
boost::optional< std::string > context
std::vector< std::string > & strings()
std::pair< std::string, std::vector< std::string > > plural_and_strings_type
const std::vector< std::string > & strings() const