#include "tConsole.h"
#include "tLocale.h"
#include <iostream>
Go to the source code of this file.
Classes | |
class | tConsoleFilterComparator |
Functions | |
static void | FilterLine (tString &line) |
Variables | |
static tConsoleFilter * | st_filterAnchor = 0 |
static tString | line_ ("") |
static tConsole::MessageCallback * | s_messageCallback = NULL |
static tConsole::IdleCallback * | s_idleCallback = NULL |
tConsole | con |
static void FilterLine | ( | tString & | line | ) | [static] |
Definition at line 119 of file tConsole.cpp.
References filter(), tConsoleFilter::FilterLine(), tListItem< T >::Next(), tString::Size(), tListItem< T >::Sort(), and tString::SubStr().
Referenced by tConsole::CenterDisplay(), and tConsole::Print().
00120 { 00121 // no filtering to do 00122 if ( !st_filterAnchor ) 00123 return; 00124 00125 #ifndef WIN32 // MSVC++ does not eat this code, but that's not tragic right now. 00126 // sort static filters according to priority 00127 static bool sorted = false; 00128 if ( !sorted ) 00129 st_filterAnchor->Sort< tConsoleFilterComparator >(); 00130 #endif 00131 00132 // remove end of line 00133 bool hasEOL = false; 00134 int eol = line.Size()-1; 00135 while ( eol >= 0 && line[eol] == 0 ) 00136 eol--; 00137 if ( eol >= 0 && line[eol] == '\n' ) 00138 { 00139 hasEOL = true; 00140 line = line.SubStr( 0, eol ); 00141 } 00142 00143 // filter string 00144 tConsoleFilter* filter = st_filterAnchor; 00145 while ( filter ) 00146 { 00147 filter->FilterLine( line ); 00148 filter = filter->Next(); 00149 } 00150 00151 // add end of line 00152 if ( hasEOL ) 00153 line += '\n'; 00154 }
Definition at line 261 of file tConsole.cpp.
Referenced by nServerInfoBase::AccessAddress(), nConfItemVersionWatcher::AdaptVersion(), tPlayback::AdvanceSection(), ANET_Error(), ANET_GetHostList(), ANET_ListenOn(), nSocket::Bind(), nQueryMessageStats::Block(), Cheater(), gNetPlayerWall::ClearToTransmit(), eNetGameObject::ClearToTransmit(), client(), nSocket::Close(), ConnectToServerCore(), gCycleMovement::CopyFrom(), nSocket::Create(), eFace::Create(), deptest::debug_out(), floattest::debug_out(), deptest::deptest(), gCycleMovement::DoTurn(), gCycle::DoTurn(), nConfItemVersionWatcher::DoWritable(), gMenuItemPlayer::Enter(), eVoteItem::Evaluate(), gMemuItemConsole::Event(), eGameObject::FindCurrentFace(), FindDataPath(), eHalfEdge::FindPath(), ePlayerNetID::FindPlayerByName(), eGrid::FindSurroundingFace(), floattest::floattest(), nQueryMessageStats::FloodProtection(), gGame::GameLoop(), GeneratePrefix(), nServerInfo::GetBigServerInfoCommon(), eVoteItem::GetControlMessage(), nServerInfo::GetFromLAN(), nServerInfo::GetFromMaster(), nServerInfo::GetSmallServerInfo(), eVoteItem::GetStats(), nServerInfo::GiveSmallServerInfo(), nDescriptor::HandleMessage(), nNOInitialisator< T >::Init(), tPath::IsValidPath(), kill_id_hog(), nServerInfo::Load(), eWavData::Load(), tConfItemBase::LoadAll(), eMusicTrack::LoadFile(), tConfItemBase::LoadLine(), tConfItemBase::LoadPlayback(), tXmlParserNamespace::tXmlParser::LoadWithParsing(), tResourceManager::locateResource(), LoginLogout(), logout_handler(), main(), uMenu::Message(), tConsole::Message(), mkdir_recurse(), myHTTPFetch(), gCycleMovement::MyInitAfterCreation(), gCycle::MyInitAfterCreation(), nDescriptor::nDescriptor(), nServerInfo::NetReadThis(), nConfItem< tString >::NetReadVal(), next_free(), next_free_server(), nReadError(), ntest(), nNetObject::Object(), nQueryMessageStats::OnDestroy(), nConfItemVersionWatcher::OnVersionChange(), gParser::Parse(), gParser::parseAxes(), PasswordCallback(), PlayerLogIn(), gAILog::Print(), nServerInfo::QueryServer(), nSocket::Read(), nMessage::Read(), gGame::ReadSync(), gCycle::ReadSync(), floattest::ReadSync(), tConfItem< nConfigItemBehavior >::ReadVal(), tConfItemLine::ReadVal(), nConfItemLine::ReadVal(), eVoteItem::ReBroadcast(), rec_peer(), floattest::ReceiveControl(), eNetGameObject::ReceiveControlNet(), nNetObject::Register(), RenderAllViewports(), nClientLag::ReportLag(), req_id_handler(), nAuthentication::RequestLogin(), RInclude(), gNetPlayerWall::s_CopyIntoGrid(), nConfItemBase::s_GetConfigMessage(), s_Veto(), sample_message_handler(), nKrawall::nMethod::ScrambleWithSalt(), se_DisplayChatLocally(), se_DisplayChatLocallyClient(), se_NeedsServer(), se_SanifyDisplacement(), se_SendTo(), se_SoundExit(), se_SoundInit(), nMessage::Send(), nMessage::SendImmediately(), tPathToExecutable::Set(), eAccessLevelHolder::SetAccessLevel(), sg_Deprecated(), sg_HostGame(), sg_KillFutureWalls(), sg_ParseMap(), sg_PrintCurrentTime(), sg_Timestamp(), sn_ConsoleOut_handler(), sn_Listen(), sn_Statistics(), sn_UnBanConf(), sr_MotionBlur(), sr_MotionBlurCore(), st_DoHandleSigHup(), tXmlParserNamespace::st_ErrorFunc(), st_Include(), st_SaveConfig(), gGame::StateUpdate(), gAIPlayer::SwitchToState(), eCamera::SwitchView(), nNetObject::SyncAll(), gCycle::SyncIsNew(), eNetGameObject::SyncIsNew(), gGame::SyncState(), Sys_Error(), tAdvanceFrameSys(), nServerLag::TakeCredit(), nServerInfo::TellMasterAboutMe(), TestConfigurationPath(), TestDataPath(), TestPath(), gAIPlayer::ThinkCloseCombat(), gAIPlayer::ThinkPath(), gCycleMovement::Timestep(), gCamera::Timestep(), gCycleMovement::TimestepCore(), ePlayerNetID::Update(), ePlayerNetID::UpdateName(), tXmlParserNamespace::tXmlResource::ValidateXml(), nSocket::Write(), nNetObject::WriteCreate(), deptest::~deptest(), floattest::~floattest(), gSimpleAI::~gSimpleAI(), and nMessage::~nMessage().
Referenced by tConsole::Print().
tConsole::IdleCallback* s_idleCallback = NULL [static] |
Definition at line 244 of file tConsole.cpp.
Referenced by tConsole::Idle(), and tConsole::RegisterIdleCallback().
tConsole::MessageCallback* s_messageCallback = NULL [static] |
Definition at line 227 of file tConsole.cpp.
Referenced by tConsole::Message(), and tConsole::RegisterMessageCallback().
tConsoleFilter* st_filterAnchor = 0 [static] |
Definition at line 33 of file tConsole.cpp.