tOutput Class Reference

#include <tLocale.h>

Collaboration diagram for tOutput:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 tOutput ()
 ~tOutput ()
 operator const char * () const
void AddLiteral (const char *)
void AddLocale (const char *)
void AddSpace ()
tOutputSetTemplateParameter (int num, const char *parameter)
tOutputSetTemplateParameter (int num, int parameter)
tOutputSetTemplateParameter (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)
tOutputoperator= (const tOutput &o)
void Append (const tOutput &o)
bool IsEmpty () const

Private Member Functions

tOutputoperator<< (const tOutput &o)

Private Attributes

tOutputItemBaseanchor

Friends

class tOutputItemBase


Detailed Description

Definition at line 79 of file tLocale.h.


Constructor & Destructor Documentation

tOutput::tOutput (  ) 

Definition at line 500 of file tLocale.cpp.

00500 : anchor(0){}

tOutput::~tOutput (  ) 

Definition at line 501 of file tLocale.cpp.

References anchor.

00502 {
00503     while (anchor)
00504         delete anchor;
00505 }

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  ) 

Definition at line 636 of file tLocale.cpp.

00637         :anchor(NULL)
00638 {
00639     *this << x;
00640 }

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 }

template<class T1>
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     }

Here is the call graph for this function:

template<class T1, class T2>
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     }

Here is the call graph for this function:

template<class T1, class T2, class T3>
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     }

Here is the call graph for this function:

template<class T1, class T2, class T3, class T4>
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     }

Here is the call graph for this function:

tOutput::tOutput ( const tOutput o  ) 

Definition at line 659 of file tLocale.cpp.

References anchor, and copyrec().

00660         :anchor(NULL)
00661 {
00662     copyrec(*this, o.anchor);
00663 }

Here is the call graph for this function:


Member Function Documentation

tOutput& tOutput::operator<< ( const tOutput o  )  [private]

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 }

Here is the call graph for this function:

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 }

Here is the caller graph for this function:

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 }

Here is the call graph for this function:

Here is the caller graph for this function:

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 }

Here is the caller graph for this function:

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 }

Here is the caller graph for this function:

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().

00508 {
00509     while (anchor)
00510         delete anchor;
00511 }

Here is the caller graph for this function:

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

Definition at line 665 of file tLocale.cpp.

References anchor, Clear(), and copyrec().

00666 {
00667     Clear();
00668 
00669     copyrec(*this, o.anchor);
00670 
00671     return *this;
00672 }

Here is the call graph for this function:

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().

00675 {
00676     copyrec(*this, o.anchor);
00677 }

Here is the call graph for this function:

Here is the caller graph for this function:

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     }

Here is the caller graph for this function:


Friends And Related Function Documentation

friend class tOutputItemBase [friend]

Definition at line 80 of file tLocale.h.


Member Data Documentation

tOutputItemBase* tOutput::anchor [private]

Definition at line 82 of file tLocale.h.

Referenced by Append(), Clear(), IsEmpty(), operator const char *(), operator=(), tOutput(), and ~tOutput().


The documentation for this class was generated from the following files:
Generated on Sat Mar 15 23:57:48 2008 for Armagetron Advanced by  doxygen 1.5.4