The Battle for Wesnoth  1.13.10+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_string (const std::string &sing, const std::string &pl, int count, 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::string & str () const
 
const char * c_str () const
 
bool translatable () const
 
const std::string & value () 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

std::shared_ptr< const
t_string_base
val_
 

Detailed Description

Definition at line 123 of file tstring.hpp.

Member Typedef Documentation

Definition at line 126 of file tstring.hpp.

Definition at line 127 of file tstring.hpp.

Constructor & Destructor Documentation

t_string::t_string ( )

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

Definition at line 594 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 599 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 603 of file tstring.cpp.

t_string::t_string ( const base o)

Definition at line 608 of file tstring.cpp.

t_string::t_string ( const char *  o)

Definition at line 613 of file tstring.cpp.

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

Definition at line 618 of file tstring.cpp.

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

Definition at line 623 of file tstring.cpp.

t_string::t_string ( const std::string &  sing,
const std::string &  pl,
int  count,
const std::string &  textdomain 
)

Definition at line 628 of file tstring.cpp.

Member Function Documentation

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

Definition at line 646 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 190 of file tstring.hpp.

References base_str().

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

const char* t_string::c_str ( ) const
inline

Definition at line 187 of file tstring.hpp.

References c_str().

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

bool t_string::empty ( ) const
inline

Definition at line 182 of file tstring.hpp.

References empty().

Referenced by unit::ability_tooltips(), unit::add_modification(), unit::add_trait_description(), attack_type::apply_modification(), attack_type::attack_type(), gui2::styled_widget::calculate_best_size(), terrain_label::calculate_shroud(), gui2::image::can_mouse_focus(), gui2::label::can_mouse_focus(), team::change_team(), terrain_type::description(), terrain_label::draw(), terrain_type::editor_name(), empty(), unit::generate_name(), gui2::styled_widget::get_best_text_size(), gui2::slider::get_value_label(), gui2::gui_definition::gui_definition(), font::load_font_config(), team_builder::objectives(), help::terrain_topic_generator::operator()(), gui2::styled_widget::place(), gui2::dialogs::unit_attack::pre_show(), gui2::dialogs::unit_list::pre_show(), gui2::dialogs::unit_recall::pre_show(), help::print_behavior_description(), gui2::styled_widget::request_reduce_height(), gui2::styled_widget::request_reduce_width(), gui2::unit_preview_pane::set_displayed_type(), gui2::unit_preview_pane::set_displayed_unit(), gui2::styled_widget::set_tooltip(), team::side_name(), gui2::styled_widget::signal_handler_show_helptip(), gui2::styled_widget::signal_handler_show_tooltip(), attack_type::special_tooltips(), gui2::styled_widget::styled_widget(), gui2::styled_widget_definition::styled_widget_definition(), terrain_type::terrain_type(), unit_type::unit_description(), unit_race::unit_race(), and game_events::WML_HANDLER_FUNCTION().

static t_string t_string::from_serialized ( const std::string &  string)
inlinestatic
const t_string_base& t_string::get ( ) const
inline
template<typename T >
void t_string::increase_impl ( const T &  other)
inlineprivate

Definition at line 160 of file tstring.hpp.

References nw, and val_.

Referenced by operator+=().

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

Definition at line 185 of file tstring.hpp.

t_string::operator const t_string_base & ( ) const
inline

Definition at line 152 of file tstring.hpp.

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

Definition at line 176 of file tstring.hpp.

References operator==().

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

Definition at line 177 of file tstring.hpp.

References operator==().

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

Definition at line 178 of file tstring.hpp.

References operator==().

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

Definition at line 154 of file tstring.hpp.

References get().

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

Definition at line 155 of file tstring.hpp.

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

Definition at line 156 of file tstring.hpp.

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

Definition at line 168 of file tstring.hpp.

References get(), and increase_impl().

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

Definition at line 169 of file tstring.hpp.

References increase_impl().

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

Definition at line 170 of file tstring.hpp.

References increase_impl().

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

Definition at line 180 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 633 of file tstring.cpp.

References val_.

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

Definition at line 639 of file tstring.cpp.

References swap().

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

Definition at line 172 of file tstring.hpp.

References get().

Referenced by operator!=().

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

Definition at line 173 of file tstring.hpp.

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

Definition at line 174 of file tstring.hpp.

void t_string::reset_translations ( )
static

Definition at line 654 of file tstring.cpp.

References language_counter.

Referenced by gui2::dialogs::title_screen::pre_show().

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

Definition at line 183 of file tstring.hpp.

References size().

Referenced by hotkey::add_wml_hotkey(), lua_common::impl_tstring_len(), and size().

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

Definition at line 196 of file tstring.hpp.

References val_.

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

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

Definition at line 150 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 188 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 189 of file tstring.hpp.

References value().

Referenced by value().

Member Data Documentation

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

Definition at line 200 of file tstring.hpp.

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


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