#include <tLocale.h>
Public Member Functions | |
tOutput () | |
~tOutput () | |
operator const char * () const | |
void | AddLiteral (const char *) |
void | AddLocale (const char *) |
void | AddSpace () |
tOutput & | SetTemplateParameter (int num, const char *parameter) |
tOutput & | SetTemplateParameter (int num, int parameter) |
tOutput & | SetTemplateParameter (int num, float parameter) |
void | Clear () |
tOutput (const std::string &identifier) | |
tOutput (const tString &identifier) | |
tOutput (const char *identifier) | |
tOutput (const tLocaleItem &locale) | |
template<class T1> | |
tOutput (char const *identifier, T1 const &template1) | |
template<class T1, class T2> | |
tOutput (char const *identifier, T1 const &template1, T2 const &template2) | |
template<class T1, class T2, class T3> | |
tOutput (char const *identifier, T1 const &template1, T2 const &template2, T3 const &template3) | |
template<class T1, class T2, class T3, class T4> | |
tOutput (char const *identifier, T1 const &template1, T2 const &template2, T3 const &template3, T4 const &template4) | |
tOutput (const tOutput &o) | |
tOutput & | operator= (const tOutput &o) |
void | Append (const tOutput &o) |
bool | IsEmpty () const |
Private Member Functions | |
tOutput & | operator<< (const tOutput &o) |
Private Attributes | |
tOutputItemBase * | anchor |
Friends | |
class | tOutputItemBase |
Definition at line 79 of file tLocale.h.
tOutput::tOutput | ( | ) |
tOutput::~tOutput | ( | ) |
tOutput::tOutput | ( | const std::string & | identifier | ) |
Definition at line 624 of file tLocale.cpp.
References tNEW.
00625 :anchor(NULL) 00626 { 00627 tNEW(tOutputItem<tString>)(*this, x); 00628 }
tOutput::tOutput | ( | const tString & | identifier | ) |
Definition at line 630 of file tLocale.cpp.
References tNEW.
00631 :anchor(NULL) 00632 { 00633 tNEW(tOutputItem<tString>)(*this, x); 00634 }
tOutput::tOutput | ( | const char * | identifier | ) |
tOutput::tOutput | ( | const tLocaleItem & | locale | ) |
Definition at line 643 of file tLocale.cpp.
References tNEW.
00644 :anchor(NULL) 00645 { 00646 tNEW(tOutputItemLocale)(*this, locale); 00647 }
tOutput::tOutput | ( | char const * | identifier, | |
T1 const & | template1 | |||
) | [inline] |
Definition at line 110 of file tLocale.h.
References SetTemplateParameter(), and tASSERT.
00111 :anchor(NULL) 00112 { 00113 tASSERT( identifier && identifier[0] == '$' ); 00114 00115 SetTemplateParameter(1, template1); 00116 00117 *this << identifier; 00118 }
tOutput::tOutput | ( | char const * | identifier, | |
T1 const & | template1, | |||
T2 const & | template2 | |||
) | [inline] |
Definition at line 121 of file tLocale.h.
References SetTemplateParameter(), and tASSERT.
00122 :anchor(NULL) 00123 { 00124 tASSERT( identifier && identifier[0] == '$' ); 00125 00126 SetTemplateParameter(1, template1); 00127 SetTemplateParameter(2, template2); 00128 00129 *this << identifier; 00130 }
tOutput::tOutput | ( | char const * | identifier, | |
T1 const & | template1, | |||
T2 const & | template2, | |||
T3 const & | template3 | |||
) | [inline] |
Definition at line 133 of file tLocale.h.
References SetTemplateParameter(), and tASSERT.
00134 :anchor(NULL) 00135 { 00136 tASSERT( identifier && identifier[0] == '$' ); 00137 00138 SetTemplateParameter(1, template1); 00139 SetTemplateParameter(2, template2); 00140 SetTemplateParameter(3, template3); 00141 00142 *this << identifier; 00143 }
tOutput::tOutput | ( | char const * | identifier, | |
T1 const & | template1, | |||
T2 const & | template2, | |||
T3 const & | template3, | |||
T4 const & | template4 | |||
) | [inline] |
Definition at line 146 of file tLocale.h.
References SetTemplateParameter(), and tASSERT.
00147 :anchor(NULL) 00148 { 00149 tASSERT( identifier && identifier[0] == '$' ); 00150 00151 SetTemplateParameter(1, template1); 00152 SetTemplateParameter(2, template2); 00153 SetTemplateParameter(3, template3); 00154 SetTemplateParameter(4, template4); 00155 00156 *this << identifier; 00157 }
tOutput::tOutput | ( | const tOutput & | o | ) |
tOutput::operator const char * | ( | ) | const |
Definition at line 550 of file tLocale.cpp.
References anchor, tString::Clear(), getstring(), tERR_ERROR_INT, and x.
00551 { 00552 #ifdef DEBUG 00553 #ifndef WIN32 00554 static bool recursion = false; 00555 if (recursion) 00556 { 00557 tERR_ERROR_INT("Locale Recursion!"); 00558 } 00559 recursion = true; 00560 #endif 00561 #endif 00562 00563 // get a relatively safe buffer to write to 00564 static const int maxstrings = 5; 00565 static int current = 0; 00566 static tString buffers[maxstrings]; 00567 tString & x = buffers[current]; 00568 current = ( current + 1 ) % maxstrings; 00569 00570 x.Clear(); 00571 getstring(x, anchor); 00572 00573 #ifdef DEBUG 00574 #ifndef WIN32 00575 recursion = false; 00576 #endif 00577 #endif 00578 00579 return x; 00580 }
void tOutput::AddLiteral | ( | const char * | x | ) |
Definition at line 583 of file tLocale.cpp.
References tNEW.
Referenced by sg_NetworkError().
00584 { 00585 tNEW(tOutputItem<tString>)(*this, tString(x)); 00586 }
void tOutput::AddLocale | ( | const char * | x | ) |
Definition at line 593 of file tLocale.cpp.
References tLocale::Find(), and tNEW.
Referenced by sg_NetworkError().
00594 { 00595 tNEW(tOutputItemLocale)(*this, tLocale::Find(x)); 00596 }
void tOutput::AddSpace | ( | ) |
Definition at line 588 of file tLocale.cpp.
References tNEW.
Referenced by ArmageTron_viewport_menuitem::Render().
00589 { 00590 tNEW(tOutputItemSpace)(*this); 00591 }
tOutput & tOutput::SetTemplateParameter | ( | int | num, | |
const char * | parameter | |||
) |
Definition at line 599 of file tLocale.cpp.
References tNEW.
Referenced by eTeam::AddScore(), ePlayerNetID::AddScore(), gGame::Analysis(), eVoteItem::BroadcastMessage(), nSpamProtection::CheckSpam(), ConnectToServerCore(), ePlayerNetID::CreateNewTeam(), gTopologyPoliceConsoleFiler::DoFilterLine(), gMenuItemPlayer::Enter(), eVoteItem::Evaluate(), nConfItemVersionWatcher::FillTemplateParameters(), nServerInfo::GetBigServerInfoCommon(), eVoteItem::GetControlMessage(), nServerInfo::GetFromLAN(), nServerInfo::GetFromMaster(), gServerFavoriteMenuEntries::gServerFavoriteMenuEntries(), nDescriptor::HandleMessage(), ePlayer::Init(), gCycle::KillAt(), eWavData::Load(), eMusicTrack::LoadFile(), tConfItemBase::LoadLine(), logout_handler(), MainMenu(), nConfItem< tString >::NetReadVal(), gBaseZoneHack::OnConquest(), PrepareTeamText(), nMessage::Read(), tConfItem< nConfigItemBehavior >::ReadVal(), tConfItemLine::ReadVal(), nConfItemLine::ReadVal(), eVoteItem::ReBroadcast(), ePlayerNetID::ReceiveControlNet(), ArmageTronPlayer_to_viewport_menuitem::Render(), se_SoundInit(), ePlayerNetID::SetTeam(), sg_GenerateConnectionItems(), sg_PlayerMenu(), sg_TopologyPoliceKill(), sn_Statistics(), gGame::StateUpdate(), su_InputConfig(), su_InputConfigCamera(), gTeam::TeamMenu(), gCamera::Timestep(), tOutput(), ePlayerNetID::Update(), eTeam::UpdateAppearance(), and ePlayerNetID::UpdateTeam().
00600 { 00601 tNEW(tOutputItemTemplate)(*this, num, parameter); 00602 return *this; 00603 }
tOutput & tOutput::SetTemplateParameter | ( | int | num, | |
int | parameter | |||
) |
Definition at line 605 of file tLocale.cpp.
References tNEW.
00606 { 00607 tString p; 00608 p << parameter; 00609 tNEW(tOutputItemTemplate)(*this, num, p); 00610 00611 return *this; 00612 }
tOutput & tOutput::SetTemplateParameter | ( | int | num, | |
float | parameter | |||
) |
Definition at line 614 of file tLocale.cpp.
References tNEW.
00615 { 00616 tString p; 00617 p << parameter; 00618 tNEW(tOutputItemTemplate)(*this, num, p); 00619 00620 return *this; 00621 }
void tOutput::Clear | ( | void | ) |
Definition at line 507 of file tLocale.cpp.
References anchor.
Referenced by operator=(), eVoteItem::UpdateMenuItem(), and eVoteItem::~eVoteItem().
void tOutput::Append | ( | const tOutput & | o | ) |
Definition at line 674 of file tLocale.cpp.
References anchor, and copyrec().
Referenced by eTeam::AddScore(), ePlayerNetID::AddScore(), eVoteItem::BroadcastMessage(), nSpamProtection::CheckSpam(), and sg_NetworkError().
bool tOutput::IsEmpty | ( | ) | const [inline] |
Definition at line 164 of file tLocale.h.
References anchor.
Referenced by eTeam::AddScore(), and ePlayerNetID::AddScore().
00164 { 00165 return !anchor; 00166 }
friend class tOutputItemBase [friend] |
tOutputItemBase* tOutput::anchor [private] |
Definition at line 82 of file tLocale.h.
Referenced by Append(), Clear(), IsEmpty(), operator const char *(), operator=(), tOutput(), and ~tOutput().