#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_string (t_string &&) noexcept=default | |
t_string & | operator= (const t_string &) |
Default implementation, but defined out-of-line for efficiency reasons. More... | |
t_string & | operator= (t_string &&) noexcept=default |
t_string (const base &) | |
t_string (const char *) | |
t_string (const std::string &) | |
t_string (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_string & | operator= (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_string & | operator+= (const t_string &o) |
t_string & | operator+= (const std::string &o) |
t_string & | operator+= (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_base & | get () 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_ |
Definition at line 130 of file tstring.hpp.
typedef t_string_base t_string::base |
Definition at line 133 of file tstring.hpp.
Definition at line 134 of file tstring.hpp.
t_string::t_string | ( | ) |
Default implementation, but defined out-of-line for efficiency reasons.
Definition at line 600 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 605 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 609 of file tstring.cpp.
|
defaultnoexcept |
t_string::t_string | ( | const base & | o | ) |
Definition at line 614 of file tstring.cpp.
t_string::t_string | ( | const char * | o | ) |
Definition at line 619 of file tstring.cpp.
t_string::t_string | ( | const std::string & | o | ) |
Definition at line 624 of file tstring.cpp.
t_string::t_string | ( | std::string && | o | ) |
Definition at line 629 of file tstring.cpp.
t_string::t_string | ( | const std::string & | str, |
const std::string & | textdomain | ||
) |
Definition at line 634 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 639 of file tstring.cpp.
|
static |
Definition at line 657 of file tstring.cpp.
References translation::bind_textdomain(), LOG_CF, and game_config::path.
Referenced by init_textdomains().
|
inline |
Definition at line 202 of file tstring.hpp.
References t_string_base::base_str(), and get().
Referenced by attack_info(), terrain_type::operator==(), and gui2::addon_list::select_addon().
|
inline |
Definition at line 199 of file tstring.hpp.
References t_string_base::c_str(), and get().
Referenced by append_special_note().
|
inline |
Definition at line 194 of file tstring.hpp.
References t_string_base::empty(), and get().
Referenced by achievement::achievement(), unit::add_modification(), add_name(), unit::add_trait_description(), append_special_note(), 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(), gui2::rich_label::can_mouse_focus(), team::change_team(), terrain_type::description(), gui2::text_shape::draw(), terrain_type::editor_name(), events::menu_handler::end_turn(), unit::generate_name(), gui2::styled_widget::get_best_text_size(), gui2::rich_label::get_label(), gui2::slider::get_value_label(), gui2::gui_definition::gui_definition(), gui2::dialogs::unit_create::list_item_clicked(), team_builder::objectives(), help::terrain_topic_generator::operator()(), gui2::styled_widget::place(), gui2::dialogs::game_stats::pre_show(), gui2::dialogs::unit_attack::pre_show(), gui2::dialogs::unit_list::pre_show(), gui2::dialogs::unit_recall::pre_show(), gui2::dialogs::unit_recruit::pre_show(), help::print_behavior_description(), terrain_label::recalculate(), 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(), team::side_name_tstr(), 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(), attack_type::weapon_specials(), and config_attribute_value::write_if_not_empty().
|
inlinestatic |
Definition at line 161 of file tstring.hpp.
References t_string_base::from_serialized(), and t_string().
Referenced by gui2::dialogs::mp_staging::add_side_node(), gui2::dialogs::mp_join_game::generate_side_list(), team::team_info::read(), and ng::side_engine::user_team_name().
|
inline |
Definition at line 207 of file tstring.hpp.
References val_.
Referenced by base_str(), c_str(), empty(), lua_common::impl_tstring_eq(), lua_common::impl_tstring_le(), lua_common::impl_tstring_lt(), increase_impl(), operator const std::string &(), operator const t_string_base &(), operator+(), operator+=(), operator<(), operator<<(), operator==(), size(), str(), to_serialized(), translatable(), and value().
|
inlineprivate |
Definition at line 172 of file tstring.hpp.
References get(), nw, and val_.
Referenced by operator+=().
|
inline |
Definition at line 197 of file tstring.hpp.
References get().
|
inline |
Definition at line 164 of file tstring.hpp.
References get().
|
inline |
Definition at line 190 of file tstring.hpp.
References operator==().
|
inline |
Definition at line 189 of file tstring.hpp.
References operator==().
|
inline |
Definition at line 188 of file tstring.hpp.
References operator==().
|
inline |
Definition at line 168 of file tstring.hpp.
References get().
|
inline |
Definition at line 167 of file tstring.hpp.
References get().
Definition at line 166 of file tstring.hpp.
References get().
|
inline |
Definition at line 182 of file tstring.hpp.
References increase_impl().
|
inline |
Definition at line 181 of file tstring.hpp.
References increase_impl().
Definition at line 180 of file tstring.hpp.
References get(), and increase_impl().
|
inline |
Definition at line 192 of file tstring.hpp.
References get().
t_string & t_string::operator= | ( | const char * | o | ) |
Definition at line 650 of file tstring.cpp.
References swap().
Default implementation, but defined out-of-line for efficiency reasons.
Definition at line 644 of file tstring.cpp.
References val_.
|
inline |
Definition at line 186 of file tstring.hpp.
References get().
|
inline |
Definition at line 185 of file tstring.hpp.
References get().
|
inline |
|
static |
Definition at line 665 of file tstring.cpp.
References language_counter.
Referenced by game_launcher::change_language().
|
inline |
Definition at line 195 of file tstring.hpp.
References get(), and t_string_base::size().
Referenced by gui2::text_shape::draw().
|
inline |
Definition at line 198 of file tstring.hpp.
References get(), and t_string_base::str().
Referenced by gui2::styled_widget::calculate_best_size(), terrain_label::calculate_shroud(), gui2::dialogs::unit_create::filter_text_changed(), gui2::styled_widget::get_best_text_size(), gui2::styled_widget::impl_draw_background(), utils::interpolate_variables_into_tstring(), intf_name_generator(), luaW_tofaivariant(), game_events::wml_menu_item::menu_text(), help::terrain_topic_generator::operator()(), about::credits_group::about_group::operator<(), config_attribute_value::operator=(), gui2::dialogs::game_stats::pre_show(), gui2::dialogs::unit_list::pre_show(), gui2::dialogs::unit_recall::pre_show(), terrain_label::recalculate(), gui2::styled_widget::request_reduce_width(), map_labels::set_label(), and team::side_name().
|
inline |
|
inline |
Definition at line 162 of file tstring.hpp.
References get(), and t_string_base::to_serialized().
Referenced by ng::connect_engine::connect_engine().
|
inline |
Definition at line 200 of file tstring.hpp.
References get(), and t_string_base::translatable().
Referenced by config_attribute_value::operator=(), and team::team_info::read().
|
inline |
Definition at line 201 of file tstring.hpp.
References get(), and t_string_base::value().
|
private |
Definition at line 212 of file tstring.hpp.
Referenced by get(), increase_impl(), operator=(), and swap().