The Battle for Wesnoth  1.15.1+dev
Classes | Public Member Functions | Static Public Member Functions | Private Attributes | Friends | List of all members
t_string_base Class Reference

#include <tstring.hpp>

Classes

class  walker
 

Public Member Functions

 t_string_base ()
 
 ~t_string_base ()
 Default implementation, but defined out-of-line for efficiency reasons. More...
 
 t_string_base (const t_string_base &)
 Default implementation, but defined out-of-line for efficiency reasons. More...
 
 t_string_base (const std::string &string)
 
 t_string_base (const std::string &string, const std::string &textdomain)
 
 t_string_base (const std::string &sing, const std::string &pl, int count, const std::string &textdomain)
 
 t_string_base (const char *string)
 
std::string to_serialized () const
 
t_string_baseoperator= (const t_string_base &)
 Default implementation, but defined out-of-line for efficiency reasons. More...
 
t_string_baseoperator= (const std::string &)
 
t_string_baseoperator= (const char *)
 
t_string_base operator+ (const t_string_base &) const
 
t_string_base operator+ (const std::string &) const
 
t_string_base operator+ (const char *) const
 
t_string_baseoperator+= (const t_string_base &)
 
t_string_baseoperator+= (const std::string &)
 
t_string_baseoperator+= (const char *)
 
bool operator== (const t_string_base &) const
 
bool operator== (const std::string &) const
 
bool operator== (const char *string) const
 
bool operator!= (const t_string_base &that) const
 
bool operator!= (const std::string &that) const
 
bool operator!= (const char *that) const
 
bool operator< (const t_string_base &string) 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
 
std::size_t hash_value () const
 

Static Public Member Functions

static t_string_base from_serialized (const std::string &string)
 

Private Attributes

std::string value_
 
std::string translated_value_
 
unsigned translation_timestamp_
 
bool translatable_
 
bool last_untranslatable_
 

Friends

class walker
 

Detailed Description

Definition at line 24 of file tstring.hpp.

Constructor & Destructor Documentation

◆ t_string_base() [1/6]

t_string_base::t_string_base ( )

Definition at line 223 of file tstring.cpp.

Referenced by from_serialized().

◆ ~t_string_base()

t_string_base::~t_string_base ( )

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

Definition at line 232 of file tstring.cpp.

◆ t_string_base() [2/6]

t_string_base::t_string_base ( const t_string_base string)

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

Definition at line 236 of file tstring.cpp.

◆ t_string_base() [3/6]

t_string_base::t_string_base ( const std::string &  string)

Definition at line 245 of file tstring.cpp.

◆ t_string_base() [4/6]

t_string_base::t_string_base ( const std::string &  string,
const std::string &  textdomain 
)

Definition at line 254 of file tstring.cpp.

References empty(), translatable_, and value_.

◆ t_string_base() [5/6]

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

Definition at line 283 of file tstring.cpp.

References c, translatable_, and value_.

◆ t_string_base() [6/6]

t_string_base::t_string_base ( const char *  string)

Definition at line 325 of file tstring.cpp.

Member Function Documentation

◆ base_str()

std::string t_string_base::base_str ( ) const

Definition at line 359 of file tstring.cpp.

References w.

Referenced by value().

◆ c_str()

const char* t_string_base::c_str ( ) const
inline

Definition at line 103 of file tstring.hpp.

References str().

◆ empty()

bool t_string_base::empty ( ) const
inline

Definition at line 98 of file tstring.hpp.

References value_.

Referenced by from_serialized(), operator+=(), and t_string_base().

◆ from_serialized()

t_string_base t_string_base::from_serialized ( const std::string &  string)
static

Definition at line 334 of file tstring.cpp.

References empty(), t_string_base(), translatable_, and w.

◆ hash_value()

std::size_t t_string_base::hash_value ( ) const

Definition at line 50 of file tstring.cpp.

References last_untranslatable_, translatable_, and value_.

Referenced by hash_value(), and value().

◆ operator const std::string &()

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

Definition at line 101 of file tstring.hpp.

References str().

◆ operator!=() [1/3]

bool t_string_base::operator!= ( const t_string_base that) const
inline

Definition at line 89 of file tstring.hpp.

References operator==().

◆ operator!=() [2/3]

bool t_string_base::operator!= ( const std::string &  that) const
inline

Definition at line 91 of file tstring.hpp.

References operator==().

◆ operator!=() [3/3]

bool t_string_base::operator!= ( const char *  that) const
inline

Definition at line 93 of file tstring.hpp.

References operator<(), and operator==().

◆ operator+() [1/3]

t_string_base t_string_base::operator+ ( const t_string_base string) const

Definition at line 425 of file tstring.cpp.

◆ operator+() [2/3]

t_string_base t_string_base::operator+ ( const std::string &  string) const

Definition at line 432 of file tstring.cpp.

◆ operator+() [3/3]

t_string_base t_string_base::operator+ ( const char *  string) const

Definition at line 439 of file tstring.cpp.

◆ operator+=() [1/3]

t_string_base & t_string_base::operator+= ( const t_string_base string)

Definition at line 446 of file tstring.cpp.

References last_untranslatable_, translatable_, translated_value_, and value_.

◆ operator+=() [2/3]

t_string_base & t_string_base::operator+= ( const std::string &  string)

Definition at line 489 of file tstring.cpp.

References empty(), last_untranslatable_, translatable_, translated_value_, and value_.

◆ operator+=() [3/3]

t_string_base & t_string_base::operator+= ( const char *  string)

Definition at line 515 of file tstring.cpp.

References last_untranslatable_, translatable_, translated_value_, and value_.

◆ operator<()

bool t_string_base::operator< ( const t_string_base string) const

Definition at line 556 of file tstring.cpp.

References value_.

Referenced by operator!=().

◆ operator=() [1/3]

t_string_base & t_string_base::operator= ( const t_string_base string)

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

Definition at line 392 of file tstring.cpp.

References last_untranslatable_, translatable_, translated_value_, translation_timestamp_, and value_.

◆ operator=() [2/3]

t_string_base & t_string_base::operator= ( const std::string &  string)

◆ operator=() [3/3]

t_string_base & t_string_base::operator= ( const char *  string)

◆ operator==() [1/3]

bool t_string_base::operator== ( const t_string_base that) const

Definition at line 541 of file tstring.cpp.

References translatable_, and value_.

Referenced by operator!=(), and t_string::operator!=().

◆ operator==() [2/3]

bool t_string_base::operator== ( const std::string &  that) const

Definition at line 546 of file tstring.cpp.

References translatable_, and value_.

◆ operator==() [3/3]

bool t_string_base::operator== ( const char *  string) const

Definition at line 551 of file tstring.cpp.

References translatable_, and value_.

◆ size()

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

Definition at line 99 of file tstring.hpp.

References str().

◆ str()

const std::string & t_string_base::str ( ) const

◆ to_serialized()

std::string t_string_base::to_serialized ( ) const

Definition at line 369 of file tstring.cpp.

References last_untranslatable_, translatable_, value(), value_, and w.

◆ translatable()

bool t_string_base::translatable ( ) const
inline

Definition at line 104 of file tstring.hpp.

References t_string_base::walker::translatable_.

◆ value()

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

Definition at line 108 of file tstring.hpp.

References base_str(), hash_value(), and value_.

Referenced by to_serialized().

Friends And Related Function Documentation

◆ walker

friend class walker
friend

Definition at line 55 of file tstring.hpp.

Member Data Documentation

◆ last_untranslatable_

bool t_string_base::last_untranslatable_
private

Definition at line 117 of file tstring.hpp.

Referenced by hash_value(), operator+=(), operator=(), and to_serialized().

◆ translatable_

bool t_string_base::translatable_
private

◆ translated_value_

std::string t_string_base::translated_value_
mutableprivate

Definition at line 115 of file tstring.hpp.

Referenced by operator+=(), operator=(), and str().

◆ translation_timestamp_

unsigned t_string_base::translation_timestamp_
mutableprivate

Definition at line 116 of file tstring.hpp.

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

◆ value_

std::string t_string_base::value_
private

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