The Battle for Wesnoth  1.15.2+dev
Macros | Functions | Variables
tstring.cpp File Reference

Routines for translatable strings. More...

#include "tstring.hpp"
#include "gettext.hpp"
#include "log.hpp"
#include <boost/multi_index/hashed_index.hpp>
#include <map>
#include <mutex>
#include <vector>
Include dependency graph for tstring.cpp:

Go to the source code of this file.

Macros

#define LOG_CF   LOG_STREAM(info, log_config)
 
#define ERR_CF   LOG_STREAM(err, log_config)
 

Functions

void swap (t_string &lhs, t_string &rhs)
 Implement non-member swap function for std::swap (calls t_string::swap). More...
 
std::ostream & operator<< (std::ostream &stream, const t_string_base &string)
 

Variables

static lg::log_domain log_config ("config")
 
static unsigned language_counter = 0
 
static std::string mark = std::string(TRANSLATABLE_PART, 1) + UNTRANSLATABLE_PART + ID_TRANSLATABLE_PART + PLURAL_PART
 

Detailed Description

Routines for translatable strings.

Definition in file tstring.cpp.

Macro Definition Documentation

◆ ERR_CF

#define ERR_CF   LOG_STREAM(err, log_config)

Definition at line 34 of file tstring.cpp.

Referenced by t_string_base::walker::update().

◆ LOG_CF

#define LOG_CF   LOG_STREAM(info, log_config)

Definition at line 33 of file tstring.cpp.

Referenced by t_string::add_textdomain().

Function Documentation

◆ operator<<()

std::ostream& operator<< ( std::ostream &  stream,
const t_string_base string 
)

Definition at line 664 of file tstring.cpp.

Referenced by hash_value().

◆ swap()

void swap ( t_string lhs,
t_string rhs 
)

Implement non-member swap function for std::swap (calls t_string::swap).

Definition at line 659 of file tstring.cpp.

References t_string::swap().

Variable Documentation

◆ language_counter

unsigned language_counter = 0
static

Definition at line 36 of file tstring.cpp.

Referenced by t_string::reset_translations(), and t_string_base::str().

◆ log_config

lg::log_domain log_config("config")
static

◆ mark

std::string mark = std::string(TRANSLATABLE_PART, 1) + UNTRANSLATABLE_PART + ID_TRANSLATABLE_PART + PLURAL_PART
static