The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
t_string Class Reference

#include <tstring.hpp>

Public Types

typedef t_string_base base
 
typedef t_string_base::walker walker
 

Public Member Functions

 t_string ()
 Default implementation, but defined out-of-line for efficiency reasons. More...
 
 ~t_string ()
 Default implementation, but defined out-of-line for efficiency reasons. More...
 
 t_string (const t_string &)
 Default implementation, but defined out-of-line for efficiency reasons. More...
 
t_stringoperator= (const t_string &)
 Default implementation, but defined out-of-line for efficiency reasons. More...
 
 t_string (const base &)
 
 t_string (const char *)
 
 t_string (const std::string &)
 
 t_string (const std::string &str, const std::string &textdomain)
 
t_stringoperator= (const char *o)
 
std::string to_serialized () const
 
 operator const t_string_base & () const
 
t_string operator+ (const t_string &o) const
 
t_string operator+ (const std::string &o) const
 
t_string operator+ (const char *o) const
 
t_stringoperator+= (const t_string &o)
 
t_stringoperator+= (const std::string &o)
 
t_stringoperator+= (const char *o)
 
bool operator== (const t_string &o) const
 
bool operator== (const std::string &o) const
 
bool operator== (const char *o) const
 
bool operator!= (const t_string &o) const
 
bool operator!= (const std::string &o) const
 
bool operator!= (const char *o) const
 
bool operator< (const t_string &o) const
 
bool empty () const
 
std::string::size_type size () const
 
 operator const std::string & () const
 
const std::stringstr () const
 
const char * c_str () const
 
bool translatable () const
 
const std::stringvalue () const
 
std::string base_str () const
 
const t_string_baseget () const
 
void swap (t_string &other)
 

Static Public Member Functions

static t_string from_serialized (const std::string &string)
 
static void add_textdomain (const std::string &name, const std::string &path)
 
static void reset_translations ()
 

Private Member Functions

template<typename T >
void increase_impl (const T &other)
 

Private Attributes

boost::shared_ptr< const
t_string_base
val_
 

Detailed Description

Definition at line 113 of file tstring.hpp.

Member Typedef Documentation

Definition at line 116 of file tstring.hpp.

Definition at line 117 of file tstring.hpp.

Constructor & Destructor Documentation

t_string::t_string ( )

Default implementation, but defined out-of-line for efficiency reasons.

Definition at line 457 of file tstring.cpp.

Referenced by from_serialized().

t_string::~t_string ( )

Default implementation, but defined out-of-line for efficiency reasons.

Definition at line 461 of file tstring.cpp.

t_string::t_string ( const t_string o)

Default implementation, but defined out-of-line for efficiency reasons.

Definition at line 465 of file tstring.cpp.

t_string::t_string ( const base o)

Definition at line 469 of file tstring.cpp.

t_string::t_string ( const char *  o)

Definition at line 473 of file tstring.cpp.

t_string::t_string ( const std::string o)

Definition at line 477 of file tstring.cpp.

t_string::t_string ( const std::string str,
const std::string textdomain 
)

Definition at line 481 of file tstring.cpp.

Member Function Documentation

void t_string::add_textdomain ( const std::string name,
const std::string path 
)
static

Definition at line 498 of file tstring.cpp.

References translation::bind_textdomain(), and LOG_CF.

Referenced by init_textdomains().

std::string t_string::base_str ( ) const
inline

Definition at line 174 of file tstring.hpp.

References base_str().

Referenced by attack_info(), base_str(), and terrain_type::operator==().

const char* t_string::c_str ( ) const
inline

Definition at line 171 of file tstring.hpp.

References c_str().

Referenced by c_str(), and lua_common::impl_tstring_tostring().

bool t_string::empty ( ) const
inline
static t_string t_string::from_serialized ( const std::string string)
inlinestatic

Definition at line 135 of file tstring.hpp.

References t_string_base::from_serialized(), and t_string().

Referenced by mp::wait::generate_menu(), and team::team_info::read().

const t_string_base& t_string::get ( ) const
inline
template<typename T >
void t_string::increase_impl ( const T &  other)
inlineprivate

Definition at line 145 of file tstring.hpp.

References nw, and val_.

Referenced by operator+=().

t_string::operator const std::string & ( ) const
inline

Definition at line 169 of file tstring.hpp.

t_string::operator const t_string_base & ( ) const
inline

Definition at line 138 of file tstring.hpp.

bool t_string::operator!= ( const t_string o) const
inline

Definition at line 160 of file tstring.hpp.

References operator==().

bool t_string::operator!= ( const std::string o) const
inline

Definition at line 161 of file tstring.hpp.

References operator==().

bool t_string::operator!= ( const char *  o) const
inline

Definition at line 162 of file tstring.hpp.

References operator==().

t_string t_string::operator+ ( const t_string o) const
inline

Definition at line 140 of file tstring.hpp.

References get().

t_string t_string::operator+ ( const std::string o) const
inline

Definition at line 141 of file tstring.hpp.

t_string t_string::operator+ ( const char *  o) const
inline

Definition at line 142 of file tstring.hpp.

t_string& t_string::operator+= ( const t_string o)
inline

Definition at line 152 of file tstring.hpp.

References get(), and increase_impl().

t_string& t_string::operator+= ( const std::string o)
inline

Definition at line 153 of file tstring.hpp.

References increase_impl().

t_string& t_string::operator+= ( const char *  o)
inline

Definition at line 154 of file tstring.hpp.

References increase_impl().

bool t_string::operator< ( const t_string o) const
inline

Definition at line 164 of file tstring.hpp.

References get().

t_string & t_string::operator= ( const t_string o)

Default implementation, but defined out-of-line for efficiency reasons.

Definition at line 485 of file tstring.cpp.

References val_.

t_string & t_string::operator= ( const char *  o)

Definition at line 491 of file tstring.cpp.

References swap().

bool t_string::operator== ( const t_string o) const
inline

Definition at line 156 of file tstring.hpp.

References get().

Referenced by operator!=().

bool t_string::operator== ( const std::string o) const
inline

Definition at line 157 of file tstring.hpp.

bool t_string::operator== ( const char *  o) const
inline

Definition at line 158 of file tstring.hpp.

void t_string::reset_translations ( )
static

Definition at line 506 of file tstring.cpp.

References language_counter.

Referenced by do_gameloop().

std::string::size_type t_string::size ( ) const
inline

Definition at line 167 of file tstring.hpp.

References size().

Referenced by hotkey::add_wml_hotkey(), mp::wait::generate_menu(), and size().

const std::string& t_string::str ( ) const
inline
void t_string::swap ( t_string other)
inline

Definition at line 180 of file tstring.hpp.

References val_.

Referenced by operator=().

std::string t_string::to_serialized ( ) const
inline

Definition at line 136 of file tstring.hpp.

References to_serialized().

Referenced by ng::connect_engine::connect_engine(), and to_serialized().

bool t_string::translatable ( ) const
inline

Definition at line 172 of file tstring.hpp.

References translatable().

Referenced by config::attribute_value::operator=(), team::team_info::read(), and translatable().

const std::string& t_string::value ( ) const
inline

Definition at line 173 of file tstring.hpp.

References value().

Referenced by value().

Member Data Documentation

boost::shared_ptr<const t_string_base> t_string::val_
private

Definition at line 183 of file tstring.hpp.

Referenced by get(), increase_impl(), operator=(), and swap().


The documentation for this class was generated from the following files: