aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/a03443.html
diff options
context:
space:
mode:
authorneodarz <neodarz@neodarz.net>2018-08-11 20:21:34 +0200
committerneodarz <neodarz@neodarz.net>2018-08-11 20:21:34 +0200
commit0ea5fc66924303d1bf73ba283a383e2aadee02f2 (patch)
tree2568e71a7ccc44ec23b8bb3f0ff97fb6bf2ed709 /docs/doxygen/nel/a03443.html
downloadnevrax-website-self-hostable-0ea5fc66924303d1bf73ba283a383e2aadee02f2.tar.xz
nevrax-website-self-hostable-0ea5fc66924303d1bf73ba283a383e2aadee02f2.zip
Initial commit
Diffstat (limited to '')
-rw-r--r--docs/doxygen/nel/a03443.html636
1 files changed, 636 insertions, 0 deletions
diff --git a/docs/doxygen/nel/a03443.html b/docs/doxygen/nel/a03443.html
new file mode 100644
index 00000000..d7b54540
--- /dev/null
+++ b/docs/doxygen/nel/a03443.html
@@ -0,0 +1,636 @@
+<!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::CStdDisplayer 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&nbsp;Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="namespacemembers.html">Namespace&nbsp;Members</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a> | <span class="search"><u>S</u>earch&nbsp;for&nbsp;<input class="search" type="text" name="query" value="" size="20" accesskey="s"/></span></form></div>
+<h1>NLMISC::CStdDisplayer Class Reference</h1><code>#include &lt;<a class="el" href="a05638.html">displayer.h</a>&gt;</code>
+<p>
+<p>Inheritance diagram for NLMISC::CStdDisplayer:
+<p><center><img src="a03443.png" usemap="#NLMISC::CStdDisplayer_map" border="0" alt=""></center>
+<map name="NLMISC::CStdDisplayer_map">
+<area href="a02526.html" alt="NLMISC::IDisplayer" shape="rect" coords="0,0,146,24">
+</map>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+Std displayer. Put string to stdout. log_howto <dl compact><dt><b>Author:</b></dt><dd>Vianney Lecroart <p>
+Nevrax France </dd></dl>
+<dl compact><dt><b>Date:</b></dt><dd>2000 </dd></dl>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a05638.html#l00102">102</a> of file <a class="el" href="a05638.html">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>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03443.html#NLMISC_1_1CStdDisplayera0">CStdDisplayer</a> (const char *displayerName="")</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</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> &amp;args, const char *message)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Display the string where it does. <a href="#NLMISC_1_1IDisplayera0"></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 *&nbsp;</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">&nbsp;</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 *&nbsp;</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">&nbsp;</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 *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02526.html#NLMISC_1_1IDisplayere2">dateToHumanString</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</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 *&nbsp;</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">&nbsp;</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&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02526.html#NLMISC_1_1IDisplayero0">DisplayerName</a></td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</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&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03443.html#NLMISC_1_1CStdDisplayerb0">doDisplay</a> (const <a class="el" href="a02814.html">CLog::TDisplayInfo</a> &amp;args, const char *message)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Display the string to stdout and OutputDebugString on Windows. <a href="#NLMISC_1_1CStdDisplayerb0"></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 *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02526.html#NLMISC_1_1IDisplayerf0">HeaderString</a> ()</td></tr>
+
+</table>
+<hr><h2>Constructor &amp; Destructor Documentation</h2>
+<a class="anchor" name="NLMISC_1_1CStdDisplayera0" doxytag="NLMISC::CStdDisplayer::CStdDisplayer" ></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::CStdDisplayer::CStdDisplayer </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const char *&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>displayerName</em> = "" </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a05638.html#l00105">105</a> of file <a class="el" href="a05638.html">displayer.h</a>.
+<p>
+<div class="fragment"><pre>00105 : <a class="code" href="a02526.html#NLMISC_1_1IDisplayera1">IDisplayer</a> (displayerName) {}
+</pre></div> </td>
+ </tr>
+</table>
+<hr><h2>Member Function Documentation</h2>
+<a class="anchor" name="NLMISC_1_1IDisplayere0" doxytag="NLMISC::CStdDisplayer::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">(&nbsp;</td>
+ <td class="md" nowrap valign="top">time_t&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>date</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [static, inherited]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </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>, &amp;date);
+00107 <span class="keywordflow">return</span> cstime;
+00108 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1IDisplayere1" doxytag="NLMISC::CStdDisplayer::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">(&nbsp;</td>
+ <td class="md" nowrap valign="top">time_t&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>date</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [static, inherited]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </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(&amp;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::CStdDisplayer::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">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [static, inherited]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </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">NLMISC::CMemDisplayer::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 (&amp;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::CStdDisplayer::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">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a02814.html">CLog::TDisplayInfo</a> &amp;&nbsp;</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 *&nbsp;</td>
+ <td class="mdname" nowrap> <em>message</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [inherited]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </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-&gt;enter();
+00135 <span class="keywordflow">try</span>
+00136 {
+00137 <a class="code" href="a03443.html#NLMISC_1_1CStdDisplayerb0">doDisplay</a>( args, message );
+00138 }
+00139 <span class="keywordflow">catch</span> (<a class="code" href="a02482.html">Exception</a> &amp;)
+00140 {
+00141 <span class="comment">// silence</span>
+00142 }
+00143 _Mutex-&gt;leave();
+00144 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CStdDisplayerb0" doxytag="NLMISC::CStdDisplayer::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::CStdDisplayer::doDisplay </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a02814.html">CLog::TDisplayInfo</a> &amp;&nbsp;</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 *&nbsp;</td>
+ <td class="mdname" nowrap> <em>message</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</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>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Display the string to stdout and OutputDebugString on Windows.
+<p>
+
+<p>
+Implements <a class="el" href="a02526.html#NLMISC_1_1IDisplayerb0">NLMISC::IDisplayer</a>.
+<p>
+Definition at line <a class="el" href="a05637.html#l00148">148</a> of file <a class="el" href="a05637.html">displayer.cpp</a>.
+<p>
+References <a class="el" href="a05944.html#l00071">NLMISC::CLog::TDisplayInfo::CallstackAndLog</a>, <a class="el" href="a05646.html#l00240">count</a>, <a class="el" href="a05944.html#l00068">NLMISC::CLog::TDisplayInfo::Filename</a>, <a class="el" href="a05637.html#l00061">IsDebuggerPresent</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="a05646.html#l00977">s</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05944.html#l00067">NLMISC::CLog::TDisplayInfo::ThreadId</a>, <a class="el" href="a06229.html#l02652">NLMISC::toString()</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a05981.html#l00100">uint32</a>.
+<p>
+<div class="fragment"><pre>00149 {
+00150 <span class="keywordtype">bool</span> needSpace = <span class="keyword">false</span>;
+00151 <span class="comment">//stringstream ss;</span>
+00152 string str;
+00153
+00154 <span class="keywordflow">if</span> (args.LogType != CLog::LOG_NO)
+00155 {
+00156 <span class="comment">//ss &lt;&lt; logTypeToString(args.LogType);</span>
+00157 str += <a class="code" href="a02526.html#NLMISC_1_1IDisplayere3">logTypeToString</a>(args.LogType);
+00158 needSpace = <span class="keyword">true</span>;
+00159 }
+00160
+00161 <span class="comment">// Write thread identifier</span>
+00162 <span class="keywordflow">if</span> ( args.ThreadId != 0 )
+00163 {
+00164 <span class="comment">//ss &lt;&lt; setw(5) &lt;&lt; args.ThreadId;</span>
+00165 str += <a class="code" href="a05378.html#a244">NLMISC::toString</a>(<span class="stringliteral">"%5u"</span>, args.ThreadId);
+00166 needSpace = <span class="keyword">true</span>;
+00167 }
+00168
+00169 <span class="keywordflow">if</span> (args.Filename != NULL)
+00170 {
+00171 <span class="comment">//if (needSpace) { ss &lt;&lt; " "; needSpace = false; }</span>
+00172 <span class="keywordflow">if</span> (needSpace) { str += <span class="stringliteral">" "</span>; needSpace = <span class="keyword">false</span>; }
+00173 <span class="comment">//ss &lt;&lt; CFile::getFilename(args.Filename);</span>
+00174 str += CFile::getFilename(args.Filename);
+00175 needSpace = <span class="keyword">true</span>;
+00176 }
+00177
+00178 <span class="keywordflow">if</span> (args.Line != -1)
+00179 {
+00180 <span class="comment">//if (needSpace) { ss &lt;&lt; " "; needSpace = false; }</span>
+00181 <span class="keywordflow">if</span> (needSpace) { str += <span class="stringliteral">" "</span>; needSpace = <span class="keyword">false</span>; }
+00182 <span class="comment">//ss &lt;&lt; args.Line;</span>
+00183 str += <a class="code" href="a05378.html#a244">NLMISC::toString</a>(args.Line);
+00184 needSpace = <span class="keyword">true</span>;
+00185 }
+00186
+00187 <span class="keywordflow">if</span> (!args.ProcessName.empty())
+00188 {
+00189 <span class="comment">//if (needSpace) { ss &lt;&lt; " "; needSpace = false; }</span>
+00190 <span class="keywordflow">if</span> (needSpace) { str += <span class="stringliteral">" "</span>; needSpace = <span class="keyword">false</span>; }
+00191 <span class="comment">//ss &lt;&lt; args.ProcessName;</span>
+00192 str + args.ProcessName;
+00193 needSpace = <span class="keyword">true</span>;
+00194 }
+00195
+00196 <span class="comment">//if (needSpace) { ss &lt;&lt; " : "; needSpace = false; }</span>
+00197 <span class="keywordflow">if</span> (needSpace) { str += <span class="stringliteral">" : "</span>; needSpace = <span class="keyword">false</span>; }
+00198
+00199 <span class="comment">//ss &lt;&lt; message;</span>
+00200 str += message;
+00201
+00202 <span class="comment">// string s = ss.str();</span>
+00203
+00204 <span class="keyword">static</span> <span class="keywordtype">bool</span> consoleMode = <span class="keyword">true</span>;
+00205
+00206 <span class="preprocessor">#if defined(NL_OS_WINDOWS)</span>
+00207 <span class="preprocessor"></span> <span class="keyword">static</span> <span class="keywordtype">bool</span> consoleModeTest = <span class="keyword">false</span>;
+00208 <span class="keywordflow">if</span> (!consoleModeTest)
+00209 {
+00210 HANDLE handle = CreateFile (<span class="stringliteral">"CONOUT$"</span>, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, 0);
+00211 consoleMode = handle != INVALID_HANDLE_VALUE;
+00212 <span class="keywordflow">if</span> (consoleMode)
+00213 CloseHandle (handle);
+00214 consoleModeTest = <span class="keyword">true</span>;
+00215 }
+00216 <span class="preprocessor">#endif // NL_OS_WINDOWS</span>
+00217 <span class="preprocessor"></span>
+00218 <span class="comment">// Printf ?</span>
+00219 <span class="keywordflow">if</span> (consoleMode)
+00220 {
+00221 <span class="comment">// we don't use cout because sometimes, it crashs because cout isn't already init, printf doesn t crash.</span>
+00222 <span class="keywordflow">if</span> (!str.empty())
+00223 printf (<span class="stringliteral">"%s"</span>, str.c_str());
+00224
+00225 <span class="keywordflow">if</span> (!args.CallstackAndLog.empty())
+00226 printf (args.CallstackAndLog.c_str());
+00227
+00228 fflush(stdout);
+00229 }
+00230
+00231 <span class="preprocessor">#ifdef NL_OS_WINDOWS</span>
+00232 <span class="preprocessor"></span> <span class="comment">// display the string in the debugger is the application is started with the debugger</span>
+00233 <span class="keywordflow">if</span> (<a class="code" href="a04214.html#a0">IsDebuggerPresent</a> ())
+00234 {
+00235 <span class="comment">//stringstream ss2;</span>
+00236 string str2;
+00237 needSpace = <span class="keyword">false</span>;
+00238
+00239 <span class="keywordflow">if</span> (args.Filename != NULL) str2 += args.Filename;
+00240
+00241 <span class="keywordflow">if</span> (args.Line != -1)
+00242 {
+00243 str2 += <span class="stringliteral">"("</span> + <a class="code" href="a05378.html#a244">NLMISC::toString</a>(args.Line) + <span class="stringliteral">")"</span>;
+00244 needSpace = <span class="keyword">true</span>;
+00245 }
+00246
+00247 <span class="keywordflow">if</span> (needSpace) { str2 += <span class="stringliteral">" : "</span>; needSpace = <span class="keyword">false</span>; }
+00248
+00249 <span class="keywordflow">if</span> (args.LogType != CLog::LOG_NO)
+00250 {
+00251 str2 += <a class="code" href="a02526.html#NLMISC_1_1IDisplayere3">logTypeToString</a>(args.LogType);
+00252 needSpace = <span class="keyword">true</span>;
+00253 }
+00254
+00255 <span class="comment">// Write thread identifier</span>
+00256 <span class="keywordflow">if</span> ( args.ThreadId != 0 )
+00257 {
+00258 str2 += <a class="code" href="a05378.html#a244">NLMISC::toString</a>(<span class="stringliteral">"%5u: "</span>, args.ThreadId);
+00259 }
+00260
+00261 str2 += message;
+00262
+00263 <span class="keyword">const</span> <a class="code" href="a04558.html#a14">sint</a> maxOutString = 2*1024;
+00264
+00265 <span class="keywordflow">if</span>(str2.size() &lt; maxOutString)
+00266 {
+00268 <span class="comment">// WARNING: READ THIS !!!!!!!!!!!!!!!! ///////////////////////////</span>
+00269 <span class="comment">// If at the release time, it freezes here, it's a microsoft bug:</span>
+00270 <span class="comment">// http://support.microsoft.com/support/kb/articles/q173/2/60.asp</span>
+00271 OutputDebugString(str2.c_str());
+00272 }
+00273 <span class="keywordflow">else</span>
+00274 {
+00275 <span class="comment">/*OutputDebugString(ss2.str().c_str());</span>
+00276 <span class="comment"> OutputDebugString("\n\t\t\t");</span>
+00277 <span class="comment"> OutputDebugString("message end: ");</span>
+00278 <span class="comment"> OutputDebugString(&amp;message[strlen(message) - 1024]);</span>
+00279 <span class="comment"> OutputDebugString("\n");*/</span>
+00280
+00281 <a class="code" href="a04558.html#a14">sint</a> <a class="code" href="a04223.html#a577">count</a> = 0;
+00282 <a class="code" href="a04558.html#a15">uint</a> n = strlen(message);
+00283 std::string <a class="code" href="a04223.html#a626">s</a>(&amp;str2.c_str()[0], (str2.size() - n));
+00284 OutputDebugString(<a class="code" href="a04223.html#a626">s</a>.c_str());
+00285
+00286 <span class="keywordflow">while</span>(<span class="keyword">true</span>)
+00287 {
+00288
+00289 <span class="keywordflow">if</span>((n - <a class="code" href="a04223.html#a577">count</a>) &lt; maxOutString )
+00290 {
+00291 <a class="code" href="a04223.html#a626">s</a> = std::string(&amp;message[count], (n - count));
+00292 OutputDebugString(<a class="code" href="a04223.html#a626">s</a>.c_str());
+00293 OutputDebugString(<span class="stringliteral">"\n"</span>);
+00294 <span class="keywordflow">break</span>;
+00295 }
+00296 <span class="keywordflow">else</span>
+00297 {
+00298 <a class="code" href="a04223.html#a626">s</a> = std::string(&amp;message[count] , count + maxOutString);
+00299 OutputDebugString(<a class="code" href="a04223.html#a626">s</a>.c_str());
+00300 OutputDebugString(<span class="stringliteral">"\n\t\t\t"</span>);
+00301 <a class="code" href="a04223.html#a577">count</a> += maxOutString;
+00302 }
+00303 }
+00304 }
+00305
+00306 <span class="comment">// OutputDebugString is a big shit, we can't display big string in one time, we need to split</span>
+00307 <a class="code" href="a04558.html#a11">uint32</a> pos = 0;
+00308 string splited;
+00309 <span class="keywordflow">while</span>(<span class="keyword">true</span>)
+00310 {
+00311 <span class="keywordflow">if</span> (pos+1000 &lt; args.CallstackAndLog.size ())
+00312 {
+00313 splited = args.CallstackAndLog.substr (pos, 1000);
+00314 OutputDebugString(splited.c_str());
+00315 pos += 1000;
+00316 }
+00317 <span class="keywordflow">else</span>
+00318 {
+00319 splited = args.CallstackAndLog.substr (pos);
+00320 OutputDebugString(splited.c_str());
+00321 <span class="keywordflow">break</span>;
+00322 }
+00323 }
+00324 }
+00325 <span class="preprocessor">#endif</span>
+00326 <span class="preprocessor"></span>}
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1IDisplayerf0" doxytag="NLMISC::CStdDisplayer::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">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</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>
+ &nbsp;
+ </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">NLMISC::CMemDisplayer::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_1IDisplayere3" doxytag="NLMISC::CStdDisplayer::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">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02813.html#NLNET_1_1CNetLogw8">CLog::TLogType</a>&nbsp;</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&nbsp;</td>
+ <td class="mdname" nowrap> <em>longFormat</em> = false</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</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>
+ &nbsp;
+ </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">NLMISC::CMemDisplayer::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">doDisplay()</a>.
+<p>
+<div class="fragment"><pre>00078 {
+00079 <span class="keywordflow">if</span> (logType &lt; CLog::LOG_NO || logType &gt; CLog::LOG_UNKNOWN)
+00080 <span class="keywordflow">return</span> <span class="stringliteral">"&lt;NotDefined&gt;"</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>
+<hr><h2>Field Documentation</h2>
+<a class="anchor" name="NLMISC_1_1IDisplayero0" doxytag="NLMISC::CStdDisplayer::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>
+ &nbsp;
+ </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="a05638.html">displayer.h</a><li><a class="el" href="a05637.html">displayer.cpp</a></ul>
+<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 13:34:56 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>