Display into a string vector. More...
#include <mem_displayer.h>
Inherits NLMISC::IDisplayer.
Inherited by NLMISC::CLightMemDisplayer.
Public Member Functions | |
| CMemDisplayer (const char *displayerName="") | |
| Constructor. | |
| void | setParam (uint32 maxStrings=50) |
| Set Parameter of the displayer if not set at the ctor time. | |
| void | write (CLog *log=NULL, bool quiet=true) |
| Write N last line into a displayer (InfoLog by default). | |
| void | write (std::string &str, bool crLf=false) |
| const std::deque< std::string > & | lockStrings () |
| void | unlockStrings () |
| void | clear () |
Protected Member Functions | |
| virtual void | doDisplay (const CLog::TDisplayInfo &args, const char *message) |
| Put the string into the file. | |
Protected Attributes | |
| bool | _NeedHeader |
| uint32 | _MaxStrings |
| bool | _CanUseStrings |
| std::deque< std::string > | _Strings |
Display into a string vector.
Definition at line 43 of file mem_displayer.h.
| NLMISC::CMemDisplayer::CMemDisplayer | ( | const char * | displayerName = "" |
) |
| void NLMISC::CMemDisplayer::clear | ( | void | ) | [inline] |
Definition at line 60 of file mem_displayer.h.
References _CanUseStrings, and _Strings.
Referenced by NLNET::IService::main(), NLNET::serviceGetView(), and NLNET::updateAdmin().
| void NLMISC::CMemDisplayer::doDisplay | ( | const CLog::TDisplayInfo & | args, | |
| const char * | message | |||
| ) | [protected, virtual] |
Put the string into the file.
Implements NLMISC::IDisplayer.
Reimplemented in NLMISC::CLightMemDisplayer.
Definition at line 350 of file mem_displayer.cpp.
References _CanUseStrings, _MaxStrings, _NeedHeader, _Strings, NLMISC::CLog::TDisplayInfo::Date, NLMISC::IDisplayer::dateToHumanString(), NLMISC::CLog::TDisplayInfo::FileName, NLMISC::CFile::getFilename(), NLMISC::IDisplayer::HeaderString(), NLMISC::CLog::TDisplayInfo::Line, NLMISC::CLog::LOG_NO, NLMISC::CLog::TDisplayInfo::LogType, NLMISC::IDisplayer::logTypeToString(), NLMISC::CLog::TDisplayInfo::ProcessName, NLMISC::CLog::TDisplayInfo::ThreadId, and NLMISC::toString().
| const std::deque<std::string>& NLMISC::CMemDisplayer::lockStrings | ( | ) | [inline] |
Definition at line 56 of file mem_displayer.h.
References _CanUseStrings, and _Strings.
Referenced by NLNET::IService::main(), NLMISC::NLMISC_CATEGORISED_COMMAND(), NLNET::serviceGetView(), and NLNET::updateAdmin().
| void NLMISC::CMemDisplayer::setParam | ( | uint32 | maxStrings = 50 |
) |
Set Parameter of the displayer if not set at the ctor time.
Definition at line 343 of file mem_displayer.cpp.
References _MaxStrings.
Referenced by CMemDisplayer(), and NLNET::serviceGetView().
| void NLMISC::CMemDisplayer::unlockStrings | ( | ) | [inline] |
Definition at line 58 of file mem_displayer.h.
References _CanUseStrings.
Referenced by NLNET::IService::main(), NLMISC::NLMISC_CATEGORISED_COMMAND(), NLNET::serviceGetView(), and NLNET::updateAdmin().
| void NLMISC::CMemDisplayer::write | ( | std::string & | str, | |
| bool | crLf = false | |||
| ) |
Definition at line 450 of file mem_displayer.cpp.
References _Strings.
Write N last line into a displayer (InfoLog by default).
Definition at line 423 of file mem_displayer.cpp.
References _Strings, NLMISC::displayCallStack(), NLMISC::CLog::forceDisplayRaw(), and NLMISC::InfoLog.
Referenced by NLMISC::getCallStackAndLog(), and NLMISC::NLMISC_CATEGORISED_COMMAND().
bool NLMISC::CMemDisplayer::_CanUseStrings [protected] |
Definition at line 70 of file mem_displayer.h.
Referenced by clear(), NLMISC::CLightMemDisplayer::doDisplay(), doDisplay(), lockStrings(), and unlockStrings().
uint32 NLMISC::CMemDisplayer::_MaxStrings [protected] |
Definition at line 68 of file mem_displayer.h.
Referenced by NLMISC::CLightMemDisplayer::doDisplay(), doDisplay(), and setParam().
bool NLMISC::CMemDisplayer::_NeedHeader [protected] |
Definition at line 66 of file mem_displayer.h.
Referenced by doDisplay().
std::deque<std::string> NLMISC::CMemDisplayer::_Strings [protected] |
Definition at line 72 of file mem_displayer.h.
Referenced by clear(), NLMISC::CLightMemDisplayer::doDisplay(), doDisplay(), lockStrings(), and write().
1.6.1