Classes | Namespaces | Defines | Functions | Variables

formula_string_utils.cpp File Reference

#include "formula_string_utils.hpp"
#include "config.hpp"
#include "log.hpp"
#include "formula.hpp"
#include "gettext.hpp"
Include dependency graph for formula_string_utils.cpp:

Go to the source code of this file.

Classes

class  utils::string_map_variable_set

Namespaces

namespace  utils

Defines

#define ERR_NG   LOG_STREAM(err, log_engine)

Functions

static bool two_dots (char a, char b)
static std::string do_interpolation (const std::string &str, const variable_set &set)
std::string utils::interpolate_variables_into_string (const std::string &str, const string_map *const symbols)
 Function which will interpolate variables, starting with '$' in the string 'str' with the equivalent symbols in the given symbol table.
std::string utils::interpolate_variables_into_string (const std::string &str, const variable_set &variables)
t_string utils::interpolate_variables_into_tstring (const t_string &str, const variable_set &variables)
 Function that does the same as the above, for t_stringS.
std::string vgettext (const char *msgid, const utils::string_map &symbols)
 Handy wrappers around interpolate_variables_into_string and gettext.
std::string vgettext (const char *domain, const char *msgid, const utils::string_map &symbols)
std::string vngettext (const char *sing, const char *plur, int n, const utils::string_map &symbols)

Variables

static lg::log_domain log_engine ("engine")

Define Documentation

#define ERR_NG   LOG_STREAM(err, log_engine)

Definition at line 25 of file formula_string_utils.cpp.

Referenced by do_interpolation().


Function Documentation

static std::string do_interpolation ( const std::string &  str,
const variable_set set 
) [static]
static bool two_dots ( char  a,
char  b 
) [static]

Definition at line 27 of file formula_string_utils.cpp.

Referenced by do_interpolation().

Here is the caller graph for this function:

std::string vgettext ( const char *  msgid,
const utils::string_map symbols 
)
std::string vgettext ( const char *  domain,
const char *  msgid,
const utils::string_map symbols 
)

Definition at line 226 of file formula_string_utils.cpp.

References utils::interpolate_variables_into_string(), and game_logic::msg().

Here is the call graph for this function:

std::string vngettext ( const char *  sing,
const char *  plur,
int  n,
const utils::string_map symbols 
)

Definition at line 234 of file formula_string_utils.cpp.

References _n, utils::interpolate_variables_into_string(), and game_logic::msg().

Referenced by events::menu_handler::recall(), and playsingle_controller::report_victory().

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

lg::log_domain log_engine("engine") [static]
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Fri May 25 2012 01:04:19 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs