diff options
Diffstat (limited to '')
-rw-r--r-- | docs/doxygen/nel/a02751.html | 930 |
1 files changed, 930 insertions, 0 deletions
diff --git a/docs/doxygen/nel/a02751.html b/docs/doxygen/nel/a02751.html new file mode 100644 index 00000000..c9beaf8c --- /dev/null +++ b/docs/doxygen/nel/a02751.html @@ -0,0 +1,930 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> +<title>NeL: NLMISC::CMemDisplayer class Reference</title> +<link href="doxygen.css" rel="stylesheet" type="text/css"> +</head><body> +<!-- Generated by Doxygen 1.3.6 --> +<div class="qindex"> <form class="search" action="search.php" method="get"> +<a class="qindex" href="main.html">Main Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related Pages</a> | <span class="search"><u>S</u>earch for <input class="search" type="text" name="query" value="" size="20" accesskey="s"/></span></form></div> +<h1>NLMISC::CMemDisplayer Class Reference</h1><code>#include <<a class="el" href="a05977.html">mem_displayer.h</a>></code> +<p> +<p>Inheritance diagram for NLMISC::CMemDisplayer: +<p><center><img src="a02751.png" usemap="#NLMISC::CMemDisplayer_map" border="0" alt=""></center> +<map name="NLMISC::CMemDisplayer_map"> +<area href="a02526.html" alt="NLMISC::IDisplayer" shape="rect" coords="0,0,182,24"> +<area href="a02750.html" alt="NLMISC::CLightMemDisplayer" shape="rect" coords="0,112,182,136"> +</map> +<hr><a name="_details"></a><h2>Detailed Description</h2> +Display into a string vector <dl compact><dt><b>Author:</b></dt><dd>Benjamin Legros <p> +Nevrax France </dd></dl> +<dl compact><dt><b>Date:</b></dt><dd>2001 </dd></dl> + +<p> + +<p> +Definition at line <a class="el" href="a05977.html#l00045">45</a> of file <a class="el" href="a05977.html">mem_displayer.h</a>.<table border=0 cellpadding=0 cellspacing=0> +<tr><td></td></tr> +<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02751.html#NLMISC_1_1CMemDisplayera0">clear</a> ()</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top> </td><td class="memItemRight" valign=bottom><a class="el" href="a02751.html#NLMISC_1_1CMemDisplayera1">CMemDisplayer</a> (const char *displayerName="")</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Constructor. <a href="#NLMISC_1_1CMemDisplayera1"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02526.html#NLMISC_1_1IDisplayera0">display</a> (const <a class="el" href="a02814.html">CLog::TDisplayInfo</a> &args, const char *message)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Display the string where it does. <a href="#NLMISC_1_1IDisplayera0"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>const std::deque< std::string > & </td><td class="memItemRight" valign=bottom><a class="el" href="a02751.html#NLMISC_1_1CMemDisplayera3">lockStrings</a> ()</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02751.html#NLMISC_1_1CMemDisplayera4">setParam</a> (<a class="el" href="a04558.html#a11">uint32</a> maxStrings=50)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Set Parameter of the displayer if not set at the ctor time. <a href="#NLMISC_1_1CMemDisplayera4"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02751.html#NLMISC_1_1CMemDisplayera5">unlockStrings</a> ()</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02751.html#NLMISC_1_1CMemDisplayera6">write</a> (std::string &str)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02751.html#NLMISC_1_1CMemDisplayera7">write</a> (<a class="el" href="a02813.html">CLog</a> *log=NULL, bool quiet=true)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Write N last line into a displayer (InfoLog by default). <a href="#NLMISC_1_1CMemDisplayera7"></a><br><br></td></tr> +<tr><td colspan=2><br><h2>Static Public Member Functions</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>const char * </td><td class="memItemRight" valign=bottom><a class="el" href="a02526.html#NLMISC_1_1IDisplayere0">dateToComputerString</a> (time_t date)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Convert date to "784551148" string (time in second from 1975). <a href="#NLMISC_1_1IDisplayere0"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>const char * </td><td class="memItemRight" valign=bottom><a class="el" href="a02526.html#NLMISC_1_1IDisplayere1">dateToHumanString</a> (time_t date)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Convert date to "2000/01/14 10:05:17" string. <a href="#NLMISC_1_1IDisplayere1"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>const char * </td><td class="memItemRight" valign=bottom><a class="el" href="a02526.html#NLMISC_1_1IDisplayere2">dateToHumanString</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Convert the current date to human string. <a href="#NLMISC_1_1IDisplayere2"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>const char * </td><td class="memItemRight" valign=bottom><a class="el" href="a02526.html#NLMISC_1_1IDisplayere3">logTypeToString</a> (<a class="el" href="a02813.html#NLNET_1_1CNetLogw8">CLog::TLogType</a> logType, bool longFormat=false)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Convert log type to string. <a href="#NLMISC_1_1IDisplayere3"></a><br><br></td></tr> +<tr><td colspan=2><br><h2>Data Fields</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>std::string </td><td class="memItemRight" valign=bottom><a class="el" href="a02526.html#NLMISC_1_1IDisplayero0">DisplayerName</a></td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">This is the idenfiant for a displayer, it is used to fond or remove a displayer. <a href="#NLMISC_1_1IDisplayero0"></a><br><br></td></tr> +<tr><td colspan=2><br><h2>Protected Member Functions</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void </td><td class="memItemRight" valign=bottom><a class="el" href="a02751.html#NLMISC_1_1CMemDisplayerb0">doDisplay</a> (const <a class="el" href="a02814.html">CLog::TDisplayInfo</a> &args, const char *message)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Put the string into the file. <a href="#NLMISC_1_1CMemDisplayerb0"></a><br><br></td></tr> +<tr><td colspan=2><br><h2>Static Protected Member Functions</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>const char * </td><td class="memItemRight" valign=bottom><a class="el" href="a02526.html#NLMISC_1_1IDisplayerf0">HeaderString</a> ()</td></tr> + +<tr><td colspan=2><br><h2>Protected Attributes</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a02751.html#NLMISC_1_1CMemDisplayerp0">_CanUseStrings</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a11">uint32</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02751.html#NLMISC_1_1CMemDisplayerp1">_MaxStrings</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a02751.html#NLMISC_1_1CMemDisplayerp2">_NeedHeader</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>std::deque< std::string > </td><td class="memItemRight" valign=bottom><a class="el" href="a02751.html#NLMISC_1_1CMemDisplayerp3">_Strings</a></td></tr> + +</table> +<hr><h2>Constructor & Destructor Documentation</h2> +<a class="anchor" name="NLMISC_1_1CMemDisplayera1" doxytag="NLMISC::CMemDisplayer::CMemDisplayer" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> NLMISC::CMemDisplayer::CMemDisplayer </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const char * </td> + <td class="mdname1" valign="top" nowrap> <em>displayerName</em> = "" </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Constructor. +<p> + +<p> +Definition at line <a class="el" href="a05976.html#l00318">318</a> of file <a class="el" href="a05976.html">mem_displayer.cpp</a>. +<p> +References <a class="el" href="a05976.html#l00323">setParam()</a>. +<p> +<div class="fragment"><pre>00318 : <a class="code" href="a02526.html#NLMISC_1_1IDisplayera1">IDisplayer</a> (displayerName), <a class="code" href="a02751.html#NLMISC_1_1CMemDisplayerp2">_NeedHeader</a>(<span class="keyword">true</span>), <a class="code" href="a02751.html#NLMISC_1_1CMemDisplayerp1">_MaxStrings</a>(50), <a class="code" href="a02751.html#NLMISC_1_1CMemDisplayerp0">_CanUseStrings</a>(<span class="keyword">true</span>) +00319 { +00320 <a class="code" href="a02751.html#NLMISC_1_1CMemDisplayera4">setParam</a> (50); +00321 } +</pre></div> </td> + </tr> +</table> +<hr><h2>Member Function Documentation</h2> +<a class="anchor" name="NLMISC_1_1CMemDisplayera0" doxytag="NLMISC::CMemDisplayer::clear" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NLMISC::CMemDisplayer::clear </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">void </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05977.html#l00062">62</a> of file <a class="el" href="a05977.html">mem_displayer.h</a>. +<p> +References <a class="el" href="a05977.html#l00072">_CanUseStrings</a>, and <a class="el" href="a05977.html#l00074">_Strings</a>. +<p> +Referenced by <a class="el" href="a06364.html#l00419">NLNET::IService::main()</a>, <a class="el" href="a05391.html#l00386">NLNET::serviceGetView()</a>, and <a class="el" href="a05391.html#l00648">NLNET::updateAdmin()</a>. +<p> +<div class="fragment"><pre>00062 { <span class="keywordflow">if</span> (<a class="code" href="a02751.html#NLMISC_1_1CMemDisplayerp0">_CanUseStrings</a>) <a class="code" href="a02751.html#NLMISC_1_1CMemDisplayerp3">_Strings</a>.clear (); } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLMISC_1_1IDisplayere0" doxytag="NLMISC::CMemDisplayer::dateToComputerString" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> const char * NLMISC::IDisplayer::dateToComputerString </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">time_t </td> + <td class="mdname1" valign="top" nowrap> <em>date</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [static, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Convert date to "784551148" string (time in second from 1975). +<p> + +<p> +Definition at line <a class="el" href="a05637.html#l00103">103</a> of file <a class="el" href="a05637.html">displayer.cpp</a>. +<p> +References <a class="el" href="a05586.html#l00161">NLMISC::smprintf()</a>. +<p> +<div class="fragment"><pre>00104 { +00105 <span class="keyword">static</span> <span class="keywordtype">char</span> cstime[25]; +00106 <a class="code" href="a05378.html#a259">smprintf</a> (cstime, 25, <span class="stringliteral">"%ld"</span>, &date); +00107 <span class="keywordflow">return</span> cstime; +00108 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLMISC_1_1IDisplayere1" doxytag="NLMISC::CMemDisplayer::dateToHumanString" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> const char * NLMISC::IDisplayer::dateToHumanString </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">time_t </td> + <td class="mdname1" valign="top" nowrap> <em>date</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [static, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Convert date to "2000/01/14 10:05:17" string. +<p> + +<p> +Definition at line <a class="el" href="a05637.html#l00092">92</a> of file <a class="el" href="a05637.html">displayer.cpp</a>. +<p> +References <a class="el" href="a05981.html#l00100">uint32</a>. +<p> +<div class="fragment"><pre>00093 { +00094 <span class="keyword">static</span> <span class="keywordtype">char</span> cstime[25]; +00095 <span class="keyword">struct </span>tm *tms = localtime(&date); +00096 <span class="keywordflow">if</span> (tms) +00097 strftime (cstime, 25, <span class="stringliteral">"%Y/%m/%d %H:%M:%S"</span>, tms); +00098 <span class="keywordflow">else</span> +00099 sprintf(cstime, <span class="stringliteral">"bad date %d"</span>, (<a class="code" href="a04558.html#a11">uint32</a>)date); +00100 <span class="keywordflow">return</span> cstime; +00101 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLMISC_1_1IDisplayere2" doxytag="NLMISC::CMemDisplayer::dateToHumanString" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> const char * NLMISC::IDisplayer::dateToHumanString </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [static, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Convert the current date to human string. +<p> + +<p> +Definition at line <a class="el" href="a05637.html#l00085">85</a> of file <a class="el" href="a05637.html">displayer.cpp</a>. +<p> +Referenced by <a class="el" href="a06094.html#l00123">NLNET::CNetDisplayer::doDisplay()</a>, <a class="el" href="a05976.html#l00330">doDisplay()</a>, <a class="el" href="a05637.html#l00479">NLMISC::CMsgBoxDisplayer::doDisplay()</a>, <a class="el" href="a05637.html#l00379">NLMISC::CFileDisplayer::doDisplay()</a>, and <a class="el" href="a05637.html#l00110">NLMISC::IDisplayer::HeaderString()</a>. +<p> +<div class="fragment"><pre>00086 { +00087 time_t date; +00088 time (&date); +00089 <span class="keywordflow">return</span> <a class="code" href="a02526.html#NLMISC_1_1IDisplayere2">dateToHumanString</a> (date); +00090 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLMISC_1_1IDisplayera0" doxytag="NLMISC::CMemDisplayer::display" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NLMISC::IDisplayer::display </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const <a class="el" href="a02814.html">CLog::TDisplayInfo</a> & </td> + <td class="mdname" nowrap> <em>args</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>const char * </td> + <td class="mdname" nowrap> <em>message</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"><code> [inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Display the string where it does. +<p> + +<p> +Definition at line <a class="el" href="a05637.html#l00132">132</a> of file <a class="el" href="a05637.html">displayer.cpp</a>. +<p> +References <a class="el" href="a02526.html#NLMISC_1_1IDisplayerb0">NLMISC::IDisplayer::doDisplay()</a>. +<p> +<div class="fragment"><pre>00133 { +00134 _Mutex->enter(); +00135 <span class="keywordflow">try</span> +00136 { +00137 <a class="code" href="a02751.html#NLMISC_1_1CMemDisplayerb0">doDisplay</a>( args, message ); +00138 } +00139 <span class="keywordflow">catch</span> (<a class="code" href="a02482.html">Exception</a> &) +00140 { +00141 <span class="comment">// silence</span> +00142 } +00143 _Mutex->leave(); +00144 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLMISC_1_1CMemDisplayerb0" doxytag="NLMISC::CMemDisplayer::doDisplay" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NLMISC::CMemDisplayer::doDisplay </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const <a class="el" href="a02814.html">CLog::TDisplayInfo</a> & </td> + <td class="mdname" nowrap> <em>args</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>const char * </td> + <td class="mdname" nowrap> <em>message</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"><code> [protected, virtual]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Put the string into the file. +<p> + +<p> +Implements <a class="el" href="a02526.html#NLMISC_1_1IDisplayerb0">NLMISC::IDisplayer</a>. +<p> +Reimplemented in <a class="el" href="a02750.html#NLMISC_1_1CLightMemDisplayerb0">NLMISC::CLightMemDisplayer</a>. +<p> +Definition at line <a class="el" href="a05976.html#l00330">330</a> of file <a class="el" href="a05976.html">mem_displayer.cpp</a>. +<p> +References <a class="el" href="a05977.html#l00072">_CanUseStrings</a>, <a class="el" href="a05977.html#l00070">_MaxStrings</a>, <a class="el" href="a05977.html#l00074">_Strings</a>, <a class="el" href="a05944.html#l00064">NLMISC::CLog::TDisplayInfo::Date</a>, <a class="el" href="a05637.html#l00085">NLMISC::IDisplayer::dateToHumanString()</a>, <a class="el" href="a05944.html#l00068">NLMISC::CLog::TDisplayInfo::Filename</a>, <a class="el" href="a05637.html#l00110">NLMISC::IDisplayer::HeaderString()</a>, <a class="el" href="a05944.html#l00069">NLMISC::CLog::TDisplayInfo::Line</a>, <a class="el" href="a05944.html#l00065">NLMISC::CLog::TDisplayInfo::LogType</a>, <a class="el" href="a05637.html#l00077">NLMISC::IDisplayer::logTypeToString()</a>, <a class="el" href="a05944.html#l00066">NLMISC::CLog::TDisplayInfo::ProcessName</a>, <a class="el" href="a05944.html#l00067">NLMISC::CLog::TDisplayInfo::ThreadId</a>, and <a class="el" href="a06229.html#l02652">NLMISC::toString()</a>. +<p> +<div class="fragment"><pre>00331 { +00332 <span class="comment">// stringstream ss;</span> +00333 string str; +00334 <span class="keywordtype">bool</span> needSpace = <span class="keyword">false</span>; +00335 +00336 <span class="keywordflow">if</span> (!<a class="code" href="a02751.html#NLMISC_1_1CMemDisplayerp0">_CanUseStrings</a>) <span class="keywordflow">return</span>; +00337 +00338 <span class="keywordflow">if</span> (<a class="code" href="a02751.html#NLMISC_1_1CMemDisplayerp2">_NeedHeader</a>) +00339 { +00340 str += <a class="code" href="a02526.html#NLMISC_1_1IDisplayerf0">HeaderString</a>(); +00341 <a class="code" href="a02751.html#NLMISC_1_1CMemDisplayerp2">_NeedHeader</a> = <span class="keyword">false</span>; +00342 } +00343 +00344 <span class="keywordflow">if</span> (args.Date != 0) +00345 { +00346 str += <a class="code" href="a02526.html#NLMISC_1_1IDisplayere2">dateToHumanString</a>(args.Date); +00347 needSpace = <span class="keyword">true</span>; +00348 } +00349 +00350 <span class="keywordflow">if</span> (!args.ProcessName.empty()) +00351 { +00352 <span class="keywordflow">if</span> (needSpace) { str += <span class="stringliteral">" "</span>; needSpace = <span class="keyword">false</span>; } +00353 str += args.ProcessName; +00354 needSpace = <span class="keyword">true</span>; +00355 } +00356 +00357 <span class="keywordflow">if</span> (args.LogType != CLog::LOG_NO) +00358 { +00359 <span class="keywordflow">if</span> (needSpace) { str += <span class="stringliteral">" "</span>; needSpace = <span class="keyword">false</span>; } +00360 str += <a class="code" href="a02526.html#NLMISC_1_1IDisplayere3">logTypeToString</a>(args.LogType); +00361 needSpace = <span class="keyword">true</span>; +00362 } +00363 +00364 <span class="comment">// Write thread identifier</span> +00365 <span class="keywordflow">if</span> ( args.ThreadId != 0 ) +00366 { +00367 <span class="keywordflow">if</span> (needSpace) { str += <span class="stringliteral">" "</span>; needSpace = <span class="keyword">false</span>; } +00368 str += <a class="code" href="a05378.html#a244">NLMISC::toString</a>(<span class="stringliteral">"%5u"</span>, args.ThreadId); +00369 needSpace = <span class="keyword">true</span>; +00370 } +00371 +00372 <span class="keywordflow">if</span> (args.Filename != NULL) +00373 { +00374 <span class="keywordflow">if</span> (needSpace) { str += <span class="stringliteral">" "</span>; needSpace = <span class="keyword">false</span>; } +00375 str += CFile::getFilename(args.Filename); +00376 needSpace = <span class="keyword">true</span>; +00377 } +00378 +00379 <span class="keywordflow">if</span> (args.Line != -1) +00380 { +00381 <span class="keywordflow">if</span> (needSpace) { str += <span class="stringliteral">" "</span>; needSpace = <span class="keyword">false</span>; } +00382 str += <a class="code" href="a05378.html#a244">NLMISC::toString</a>(args.Line); +00383 needSpace = <span class="keyword">true</span>; +00384 } +00385 +00386 <span class="keywordflow">if</span> (needSpace) { str += <span class="stringliteral">" : "</span>; needSpace = <span class="keyword">false</span>; } +00387 +00388 str += message; +00389 +00390 <span class="comment">// clear old line</span> +00391 <span class="keywordflow">while</span> (<a class="code" href="a02751.html#NLMISC_1_1CMemDisplayerp3">_Strings</a>.size () > <a class="code" href="a02751.html#NLMISC_1_1CMemDisplayerp1">_MaxStrings</a>) +00392 { +00393 <a class="code" href="a02751.html#NLMISC_1_1CMemDisplayerp3">_Strings</a>.pop_front (); +00394 } +00395 +00396 <a class="code" href="a02751.html#NLMISC_1_1CMemDisplayerp3">_Strings</a>.push_back (str); +00397 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLMISC_1_1IDisplayerf0" doxytag="NLMISC::CMemDisplayer::HeaderString" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> const char * NLMISC::IDisplayer::HeaderString </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [static, protected, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05637.html#l00110">110</a> of file <a class="el" href="a05637.html">displayer.cpp</a>. +<p> +References <a class="el" href="a05637.html#l00085">NLMISC::IDisplayer::dateToHumanString()</a>, and <a class="el" href="a05586.html#l00161">NLMISC::smprintf()</a>. +<p> +Referenced by <a class="el" href="a05976.html#l00330">doDisplay()</a>, and <a class="el" href="a05637.html#l00379">NLMISC::CFileDisplayer::doDisplay()</a>. +<p> +<div class="fragment"><pre>00111 { +00112 <span class="keyword">static</span> <span class="keywordtype">char</span> header[1024]; +00113 <a class="code" href="a05378.html#a259">smprintf</a>(header, 1024, <span class="stringliteral">"\nLog Starting [%s]\n"</span>, <a class="code" href="a02526.html#NLMISC_1_1IDisplayere2">dateToHumanString</a>()); +00114 <span class="keywordflow">return</span> header; +00115 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLMISC_1_1CMemDisplayera3" doxytag="NLMISC::CMemDisplayer::lockStrings" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> const std::deque<std::string>& NLMISC::CMemDisplayer::lockStrings </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05977.html#l00058">58</a> of file <a class="el" href="a05977.html">mem_displayer.h</a>. +<p> +References <a class="el" href="a05977.html#l00072">_CanUseStrings</a>, and <a class="el" href="a05977.html#l00074">_Strings</a>. +<p> +Referenced by <a class="el" href="a06364.html#l00419">NLNET::IService::main()</a>, <a class="el" href="a05621.html#l00986">NLMISC::NLMISC_COMMAND()</a>, <a class="el" href="a05391.html#l00386">NLNET::serviceGetView()</a>, and <a class="el" href="a05391.html#l00648">NLNET::updateAdmin()</a>. +<p> +<div class="fragment"><pre>00058 { <a class="code" href="a02751.html#NLMISC_1_1CMemDisplayerp0">_CanUseStrings</a> = <span class="keyword">false</span>; <span class="keywordflow">return</span> <a class="code" href="a02751.html#NLMISC_1_1CMemDisplayerp3">_Strings</a>; } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLMISC_1_1IDisplayere3" doxytag="NLMISC::CMemDisplayer::logTypeToString" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> const char * NLMISC::IDisplayer::logTypeToString </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a02813.html#NLNET_1_1CNetLogw8">CLog::TLogType</a> </td> + <td class="mdname" nowrap> <em>logType</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>bool </td> + <td class="mdname" nowrap> <em>longFormat</em> = false</td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"><code> [static, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Convert log type to string. +<p> + +<p> +Definition at line <a class="el" href="a05637.html#l00077">77</a> of file <a class="el" href="a05637.html">displayer.cpp</a>. +<p> +References <a class="el" href="a05637.html#l00071">NLMISC::LogTypeToString</a>. +<p> +Referenced by <a class="el" href="a06751.html#l00130">NLMISC::CWindowDisplayer::doDisplay()</a>, <a class="el" href="a06094.html#l00123">NLNET::CNetDisplayer::doDisplay()</a>, <a class="el" href="a05976.html#l00330">doDisplay()</a>, <a class="el" href="a05637.html#l00479">NLMISC::CMsgBoxDisplayer::doDisplay()</a>, <a class="el" href="a05637.html#l00379">NLMISC::CFileDisplayer::doDisplay()</a>, and <a class="el" href="a05637.html#l00148">NLMISC::CStdDisplayer::doDisplay()</a>. +<p> +<div class="fragment"><pre>00078 { +00079 <span class="keywordflow">if</span> (logType < CLog::LOG_NO || logType > CLog::LOG_UNKNOWN) +00080 <span class="keywordflow">return</span> <span class="stringliteral">"<NotDefined>"</span>; +00081 +00082 <span class="keywordflow">return</span> <a class="code" href="a05378.html#a20">LogTypeToString</a>[longFormat?1:0][logType]; +00083 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLMISC_1_1CMemDisplayera4" doxytag="NLMISC::CMemDisplayer::setParam" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NLMISC::CMemDisplayer::setParam </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a11">uint32</a> </td> + <td class="mdname1" valign="top" nowrap> <em>maxStrings</em> = 50 </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Set Parameter of the displayer if not set at the ctor time. +<p> + +<p> +Definition at line <a class="el" href="a05976.html#l00323">323</a> of file <a class="el" href="a05976.html">mem_displayer.cpp</a>. +<p> +References <a class="el" href="a05977.html#l00070">_MaxStrings</a>, and <a class="el" href="a05981.html#l00100">uint32</a>. +<p> +Referenced by <a class="el" href="a05976.html#l00318">CMemDisplayer()</a>, and <a class="el" href="a05391.html#l00386">NLNET::serviceGetView()</a>. +<p> +<div class="fragment"><pre>00324 { +00325 <a class="code" href="a02751.html#NLMISC_1_1CMemDisplayerp1">_MaxStrings</a> = maxStrings; +00326 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLMISC_1_1CMemDisplayera5" doxytag="NLMISC::CMemDisplayer::unlockStrings" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NLMISC::CMemDisplayer::unlockStrings </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05977.html#l00060">60</a> of file <a class="el" href="a05977.html">mem_displayer.h</a>. +<p> +References <a class="el" href="a05977.html#l00072">_CanUseStrings</a>. +<p> +Referenced by <a class="el" href="a06364.html#l00419">NLNET::IService::main()</a>, <a class="el" href="a05621.html#l00986">NLMISC::NLMISC_COMMAND()</a>, <a class="el" href="a05391.html#l00386">NLNET::serviceGetView()</a>, and <a class="el" href="a05391.html#l00648">NLNET::updateAdmin()</a>. +<p> +<div class="fragment"><pre>00060 { <a class="code" href="a02751.html#NLMISC_1_1CMemDisplayerp0">_CanUseStrings</a> = <span class="keyword">true</span>; } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLMISC_1_1CMemDisplayera6" doxytag="NLMISC::CMemDisplayer::write" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NLMISC::CMemDisplayer::write </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">std::string & </td> + <td class="mdname1" valign="top" nowrap> <em>str</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05976.html#l00426">426</a> of file <a class="el" href="a05976.html">mem_displayer.cpp</a>. +<p> +References <a class="el" href="a05977.html#l00074">_Strings</a>. +<p> +<div class="fragment"><pre>00427 { +00428 <span class="keywordflow">for</span> (deque<string>::iterator it = <a class="code" href="a02751.html#NLMISC_1_1CMemDisplayerp3">_Strings</a>.begin(); it != <a class="code" href="a02751.html#NLMISC_1_1CMemDisplayerp3">_Strings</a>.end(); it++) +00429 { +00430 str += (*it); +00431 } +00432 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLMISC_1_1CMemDisplayera7" doxytag="NLMISC::CMemDisplayer::write" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NLMISC::CMemDisplayer::write </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a02813.html">CLog</a> * </td> + <td class="mdname" nowrap> <em>log</em> = NULL, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>bool </td> + <td class="mdname" nowrap> <em>quiet</em> = true</td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Write N last line into a displayer (InfoLog by default). +<p> + +<p> +Definition at line <a class="el" href="a05976.html#l00399">399</a> of file <a class="el" href="a05976.html">mem_displayer.cpp</a>. +<p> +References <a class="el" href="a05977.html#l00074">_Strings</a>, <a class="el" href="a05976.html#l00307">NLMISC::displayCallStack()</a>, <a class="el" href="a05943.html#l00485">NLMISC::CLog::forceDisplayRaw()</a>, and <a class="el" href="a05621.html#l00091">NLMISC::InfoLog</a>. +<p> +Referenced by <a class="el" href="a05621.html#l00836">NLMISC::getCallStackAndLog()</a>, and <a class="el" href="a05621.html#l00986">NLMISC::NLMISC_COMMAND()</a>. +<p> +<div class="fragment"><pre>00400 { +00401 <span class="keywordflow">if</span> (log == NULL) +00402 log = <a class="code" href="a05378.html#a12">InfoLog</a>; +00403 +00404 <span class="keywordflow">if</span> ( ! quiet ) +00405 { +00406 log->forceDisplayRaw (<span class="stringliteral">"------------------------------------------------------------------------------\n"</span>); +00407 log->forceDisplayRaw (<span class="stringliteral">"----------------------------------------- display MemDisplayer history -------\n"</span>); +00408 log->forceDisplayRaw (<span class="stringliteral">"------------------------------------------------------------------------------\n"</span>); +00409 } +00410 <span class="keywordflow">for</span> (deque<string>::iterator it = <a class="code" href="a02751.html#NLMISC_1_1CMemDisplayerp3">_Strings</a>.begin(); it != <a class="code" href="a02751.html#NLMISC_1_1CMemDisplayerp3">_Strings</a>.end(); it++) +00411 { +00412 log->forceDisplayRaw ((*it).c_str()); +00413 } +00414 <span class="keywordflow">if</span> ( ! quiet ) +00415 { +00416 log->forceDisplayRaw (<span class="stringliteral">"------------------------------------------------------------------------------\n"</span>); +00417 log->forceDisplayRaw (<span class="stringliteral">"----------------------------------------- display MemDisplayer callstack -----\n"</span>); +00418 log->forceDisplayRaw (<span class="stringliteral">"------------------------------------------------------------------------------\n"</span>); +00419 <a class="code" href="a05378.html#a335">displayCallStack</a>(log); +00420 log->forceDisplayRaw (<span class="stringliteral">"------------------------------------------------------------------------------\n"</span>); +00421 log->forceDisplayRaw (<span class="stringliteral">"----------------------------------------- end of MemDisplayer display --------\n"</span>); +00422 log->forceDisplayRaw (<span class="stringliteral">"------------------------------------------------------------------------------\n"</span>); +00423 } +00424 } +</pre></div> </td> + </tr> +</table> +<hr><h2>Field Documentation</h2> +<a class="anchor" name="NLMISC_1_1CMemDisplayerp0" doxytag="NLMISC::CMemDisplayer::_CanUseStrings" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> bool <a class="el" href="a02751.html#NLMISC_1_1CMemDisplayerp0">NLMISC::CMemDisplayer::_CanUseStrings</a><code> [protected]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05977.html#l00072">72</a> of file <a class="el" href="a05977.html">mem_displayer.h</a>. +<p> +Referenced by <a class="el" href="a05977.html#l00062">clear()</a>, <a class="el" href="a05976.html#l00330">doDisplay()</a>, <a class="el" href="a05977.html#l00058">lockStrings()</a>, and <a class="el" href="a05977.html#l00060">unlockStrings()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLMISC_1_1CMemDisplayerp1" doxytag="NLMISC::CMemDisplayer::_MaxStrings" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a11">uint32</a> <a class="el" href="a02751.html#NLMISC_1_1CMemDisplayerp1">NLMISC::CMemDisplayer::_MaxStrings</a><code> [protected]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05977.html#l00070">70</a> of file <a class="el" href="a05977.html">mem_displayer.h</a>. +<p> +Referenced by <a class="el" href="a05976.html#l00330">doDisplay()</a>, and <a class="el" href="a05976.html#l00323">setParam()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLMISC_1_1CMemDisplayerp2" doxytag="NLMISC::CMemDisplayer::_NeedHeader" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> bool <a class="el" href="a02751.html#NLMISC_1_1CMemDisplayerp2">NLMISC::CMemDisplayer::_NeedHeader</a><code> [protected]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05977.html#l00068">68</a> of file <a class="el" href="a05977.html">mem_displayer.h</a>. </td> + </tr> +</table> +<a class="anchor" name="NLMISC_1_1CMemDisplayerp3" doxytag="NLMISC::CMemDisplayer::_Strings" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> std::deque<std::string> <a class="el" href="a02751.html#NLMISC_1_1CMemDisplayerp3">NLMISC::CMemDisplayer::_Strings</a><code> [protected]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a05977.html#l00074">74</a> of file <a class="el" href="a05977.html">mem_displayer.h</a>. +<p> +Referenced by <a class="el" href="a05977.html#l00062">clear()</a>, <a class="el" href="a05976.html#l00330">doDisplay()</a>, <a class="el" href="a05977.html#l00058">lockStrings()</a>, and <a class="el" href="a05976.html#l00399">write()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLMISC_1_1IDisplayero0" doxytag="NLMISC::CMemDisplayer::DisplayerName" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> std::string <a class="el" href="a02526.html#NLMISC_1_1IDisplayero0">NLMISC::IDisplayer::DisplayerName</a><code> [inherited]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +This is the idenfiant for a displayer, it is used to fond or remove a displayer. +<p> + +<p> +Definition at line <a class="el" href="a05638.html#l00063">63</a> of file <a class="el" href="a05638.html">displayer.h</a>. +<p> +Referenced by <a class="el" href="a05637.html#l00118">NLMISC::IDisplayer::IDisplayer()</a>. </td> + </tr> +</table> +<hr>The documentation for this class was generated from the following files:<ul> +<li><a class="el" href="a05977.html">mem_displayer.h</a><li><a class="el" href="a05976.html">mem_displayer.cpp</a></ul> +<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 13:22:05 2004 for NeL by +<a href="http://www.doxygen.org/index.html"> +<img src="doxygen.png" alt="doxygen" align="middle" border=0 > +</a>1.3.6 </small></address> +</body> +</html> |