diff options
Diffstat (limited to '')
-rw-r--r-- | docs/doxygen/nel/a02985.html | 881 |
1 files changed, 881 insertions, 0 deletions
diff --git a/docs/doxygen/nel/a02985.html b/docs/doxygen/nel/a02985.html new file mode 100644 index 00000000..fd52b580 --- /dev/null +++ b/docs/doxygen/nel/a02985.html @@ -0,0 +1,881 @@ +<!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: NLNET::CNetDisplayer 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>NLNET::CNetDisplayer Class Reference</h1><code>#include <<a class="el" href="a06095.html">net_displayer.h</a>></code> +<p> +<p>Inheritance diagram for NLNET::CNetDisplayer: +<p><center><img src="a02985.png" usemap="#NLNET::CNetDisplayer_map" border="0" alt=""></center> +<map name="NLNET::CNetDisplayer_map"> +<area href="a02526.html" alt="NLMISC::IDisplayer" shape="rect" coords="0,0,140,24"> +</map> +<hr><a name="_details"></a><h2>Detailed Description</h2> +Net Displayer. Sends the strings to a logger server (LOGS). log_howto <p> +<dl compact><dt><b><a class="el" href="bug.html#_bug000002">Bug:</a></b></dt><dd>When nlerror is called in a catch block, a connected NetDisplayer becomes an IDisplayer => pure virtual call</dd></dl> +<dl compact><dt><b>Author:</b></dt><dd>Olivier Cado <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="a06095.html#l00045">45</a> of file <a class="el" href="a06095.html">net_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> </td><td class="memItemRight" valign=bottom><a class="el" href="a02985.html#NLNET_1_1CNetDisplayera0">CNetDisplayer</a> (bool autoConnect=true)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Constructor. <a href="#NLNET_1_1CNetDisplayera0"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a02985.html#NLNET_1_1CNetDisplayera1">connected</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns true if the displayer is connected to a Logging Service. <a href="#NLNET_1_1CNetDisplayera1"></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 CLog::TDisplayInfo &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>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02985.html#NLNET_1_1CNetDisplayera3">setLogServer</a> (<a class="el" href="a02305.html">CCallbackClient</a> *server)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02985.html#NLNET_1_1CNetDisplayera4">setLogServer</a> (const <a class="el" href="a02665.html">CInetAddress</a> &logServerAddr)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>virtual </td><td class="memItemRight" valign=bottom><a class="el" href="a02985.html#NLNET_1_1CNetDisplayera5">~CNetDisplayer</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <a href="#NLNET_1_1CNetDisplayera5"></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> (CLog::TLogType 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="a02526.html#NLMISC_1_1IDisplayerb0">doDisplay</a> (const CLog::TDisplayInfo &args, const char *message)=0</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Method to implement in the deriver. <a href="#NLMISC_1_1IDisplayerb0"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void </td><td class="memItemRight" valign=bottom><a class="el" href="a02985.html#NLNET_1_1CNetDisplayerb1">doDisplay</a> (const <a class="el" href="a02814.html">NLMISC::CLog::TDisplayInfo</a> &args, const char *message)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02985.html#NLNET_1_1CNetDisplayerb2">findAndConnect</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Find the server (using the NS) and connect. <a href="#NLNET_1_1CNetDisplayerb2"></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>Private Attributes</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02305.html">CCallbackClient</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="a02985.html#NLNET_1_1CNetDisplayerr0">_Server</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02665.html">CInetAddress</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02985.html#NLNET_1_1CNetDisplayerr1">_ServerAddr</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a02985.html#NLNET_1_1CNetDisplayerr2">_ServerAllocated</a></td></tr> + +</table> +<hr><h2>Constructor & Destructor Documentation</h2> +<a class="anchor" name="NLNET_1_1CNetDisplayera0" doxytag="NLNET::CNetDisplayer::CNetDisplayer" ></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"> NLNET::CNetDisplayer::CNetDisplayer </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">bool </td> + <td class="mdname1" valign="top" nowrap> <em>autoConnect</em> = true </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="a06094.html#l00048">48</a> of file <a class="el" href="a06094.html">net_displayer.cpp</a>. +<p> +References <a class="el" href="a06094.html#l00058">findAndConnect()</a>. +<p> +<div class="fragment"><pre>00048 : +00049 <a class="code" href="a02985.html#NLNET_1_1CNetDisplayerr0">_Server</a>(NULL), <a class="code" href="a02985.html#NLNET_1_1CNetDisplayerr2">_ServerAllocated</a> (<span class="keyword">false</span>) <span class="comment">// disable logging otherwise an infinite recursion may occur</span> +00050 { +00051 <span class="keywordflow">if</span> (autoConnect) <a class="code" href="a02985.html#NLNET_1_1CNetDisplayerb2">findAndConnect</a>(); +00052 } + +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLNET_1_1CNetDisplayera5" doxytag="NLNET::CNetDisplayer::~CNetDisplayer" ></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"> NLNET::CNetDisplayer::~<a class="el" href="a02985.html">CNetDisplayer</a> </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> [virtual]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Destructor. +<p> + +<p> +Definition at line <a class="el" href="a06094.html#l00108">108</a> of file <a class="el" href="a06094.html">net_displayer.cpp</a>. +<p> +References <a class="el" href="a06095.html#l00082">_ServerAllocated</a>, and <a class="el" href="a05524.html#l00354">NLNET::CCallbackClient::disconnect()</a>. +<p> +<div class="fragment"><pre>00109 { +00110 <span class="keywordflow">if</span> (<a class="code" href="a02985.html#NLNET_1_1CNetDisplayerr2">_ServerAllocated</a>) +00111 { +00112 <a class="code" href="a02985.html#NLNET_1_1CNetDisplayerr0">_Server</a>->disconnect (); +00113 <span class="keyword">delete</span> <a class="code" href="a02985.html#NLNET_1_1CNetDisplayerr0">_Server</a>; +00114 } +00115 } +</pre></div> </td> + </tr> +</table> +<hr><h2>Member Function Documentation</h2> +<a class="anchor" name="NLNET_1_1CNetDisplayera1" doxytag="NLNET::CNetDisplayer::connected" ></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 NLNET::CNetDisplayer::connected </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> +Returns true if the displayer is connected to a Logging Service. +<p> + +<p> +Definition at line <a class="el" href="a06095.html#l00062">62</a> of file <a class="el" href="a06095.html">net_displayer.h</a>. +<p> +References <a class="el" href="a05525.html#l00069">NLNET::CCallbackClient::connected()</a>. +<p> +<div class="fragment"><pre>00062 { <span class="keywordflow">return</span> <a class="code" href="a02985.html#NLNET_1_1CNetDisplayerr0">_Server</a>->connected(); } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLMISC_1_1IDisplayere0" doxytag="NLNET::CNetDisplayer::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="NLNET::CNetDisplayer::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="NLNET::CNetDisplayer::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">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 (&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="NLNET::CNetDisplayer::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="a02985.html#NLNET_1_1CNetDisplayerb1">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_1IDisplayerb0" doxytag="NLNET::CNetDisplayer::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"> virtual void NLMISC::IDisplayer::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, pure virtual, inherited]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Method to implement in the deriver. +<p> + +<p> +Implemented in <a class="el" href="a03443.html#NLMISC_1_1CStdDisplayerb0">NLMISC::CStdDisplayer</a>, <a class="el" href="a02525.html#NLMISC_1_1CFileDisplayerb0">NLMISC::CFileDisplayer</a>, <a class="el" href="a02972.html#NLMISC_1_1CMsgBoxDisplayerb0">NLMISC::CMsgBoxDisplayer</a>, <a class="el" href="a02751.html#NLMISC_1_1CMemDisplayerb0">NLMISC::CMemDisplayer</a>, and <a class="el" href="a02750.html#NLMISC_1_1CLightMemDisplayerb0">NLMISC::CLightMemDisplayer</a>. +<p> +Referenced by <a class="el" href="a05637.html#l00132">NLMISC::IDisplayer::display()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLNET_1_1CNetDisplayerb1" doxytag="NLNET::CNetDisplayer::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 NLNET::CNetDisplayer::doDisplay </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const <a class="el" href="a02814.html">NLMISC::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> +Sends the string to the logging server <dl compact><dt><b>Warning:</b></dt><dd>If not connected, tries to connect to the logging server each call. It can slow down your program a lot.</dd></dl> + +<p> +Definition at line <a class="el" href="a06094.html#l00123">123</a> of file <a class="el" href="a06094.html">net_displayer.cpp</a>. +<p> +References <a class="el" href="a05525.html#l00069">NLNET::CCallbackClient::connected()</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="a05527.html#l00129">NLNET::CCallbackNetBase::getSIDA()</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="a05524.html#l00079">NLNET::CCallbackClient::send()</a>, and <a class="el" href="a05979.html#l00420">NLMISC::CMemStream::serial()</a>. +<p> +<div class="fragment"><pre>00124 { +00125 <span class="keywordflow">try</span> +00126 { +00127 <span class="keywordflow">if</span> (<a class="code" href="a02985.html#NLNET_1_1CNetDisplayerr0">_Server</a> == NULL || !<a class="code" href="a02985.html#NLNET_1_1CNetDisplayerr0">_Server</a>->connected()) +00128 { +00129 <span class="keywordflow">return</span>; +00130 } +00131 +00132 <span class="keywordtype">bool</span> needSpace = <span class="keyword">false</span>; +00133 <span class="comment">//stringstream ss;</span> +00134 string str; +00135 +00136 <span class="keywordflow">if</span> (args.<a class="code" href="a02814.html#NLMISC_1_1CLog_1_1TDisplayInfoo1">Date</a> != 0) +00137 { +00138 str += <a class="code" href="a02526.html#NLMISC_1_1IDisplayere2">dateToHumanString</a>(args.<a class="code" href="a02814.html#NLMISC_1_1CLog_1_1TDisplayInfoo1">Date</a>); +00139 needSpace = <span class="keyword">true</span>; +00140 } +00141 +00142 <span class="keywordflow">if</span> (args.<a class="code" href="a02814.html#NLMISC_1_1CLog_1_1TDisplayInfoo4">LogType</a> != CLog::LOG_NO) +00143 { +00144 <span class="keywordflow">if</span> (needSpace) { str += <span class="stringliteral">" "</span>; needSpace = <span class="keyword">false</span>; } +00145 str += <a class="code" href="a02526.html#NLMISC_1_1IDisplayere3">logTypeToString</a>(args.<a class="code" href="a02814.html#NLMISC_1_1CLog_1_1TDisplayInfoo4">LogType</a>); +00146 needSpace = <span class="keyword">true</span>; +00147 } +00148 +00149 <span class="keywordflow">if</span> (!args.<a class="code" href="a02814.html#NLMISC_1_1CLog_1_1TDisplayInfoo5">ProcessName</a>.empty()) +00150 { +00151 <span class="keywordflow">if</span> (needSpace) { str += <span class="stringliteral">" "</span>; needSpace = <span class="keyword">false</span>; } +00152 str += args.<a class="code" href="a02814.html#NLMISC_1_1CLog_1_1TDisplayInfoo5">ProcessName</a>; +00153 needSpace = <span class="keyword">true</span>; +00154 } +00155 +00156 <span class="keywordflow">if</span> (needSpace) { str += <span class="stringliteral">": "</span>; needSpace = <span class="keyword">false</span>; } +00157 +00158 str += message; +00159 +00160 <a class="code" href="a02918.html">CMessage</a> msg(<a class="code" href="a02985.html#NLNET_1_1CNetDisplayerr0">_Server</a>->getSIDA(), <span class="stringliteral">"LOG"</span> ); +00161 string <a class="code" href="a04223.html#a626">s</a> = str; +00162 msg.<a class="code" href="a02271.html#NLNET_1_1CMessagea41">serial</a>( s ); +00163 <a class="code" href="a02985.html#NLNET_1_1CNetDisplayerr0">_Server</a>->send (msg, 0, <span class="keyword">false</span>); +00164 } +00165 <span class="keywordflow">catch</span>( <a class="code" href="a02482.html">NLMISC::Exception</a>& ) +00166 { +00167 <span class="comment">// Silence</span> +00168 } +00169 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLNET_1_1CNetDisplayerb2" doxytag="NLNET::CNetDisplayer::findAndConnect" ></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 NLNET::CNetDisplayer::findAndConnect </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> [protected]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Find the server (using the NS) and connect. +<p> + +<p> +Definition at line <a class="el" href="a06094.html#l00058">58</a> of file <a class="el" href="a06094.html">net_displayer.cpp</a>. +<p> +References <a class="el" href="a06095.html#l00082">_ServerAllocated</a>, and <a class="el" href="a05622.html#l00101">nldebug</a>. +<p> +Referenced by <a class="el" href="a06094.html#l00048">CNetDisplayer()</a>. +<p> +<div class="fragment"><pre>00059 { +00060 <span class="keywordflow">if</span> (<a class="code" href="a02985.html#NLNET_1_1CNetDisplayerr0">_Server</a> == NULL) +00061 { +00062 <a class="code" href="a02985.html#NLNET_1_1CNetDisplayerr0">_Server</a> = <span class="keyword">new</span> CCallbackClient(); +00063 <a class="code" href="a02985.html#NLNET_1_1CNetDisplayerr2">_ServerAllocated</a> = <span class="keyword">true</span>; +00064 } +00065 +00066 <span class="keywordflow">if</span> ( CNamingClient::lookupAndConnect( <span class="stringliteral">"LOGS"</span>, *_Server ) ) +00067 { +00068 <a class="code" href="a04199.html#a0">nldebug</a>( <span class="stringliteral">"Connected to logging service"</span> ); +00069 } +00070 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLMISC_1_1IDisplayerf0" doxytag="NLNET::CNetDisplayer::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">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="NLNET::CNetDisplayer::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">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">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="NLNET_1_1CNetDisplayera3" doxytag="NLNET::CNetDisplayer::setLogServer" ></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 NLNET::CNetDisplayer::setLogServer </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a02305.html">CCallbackClient</a> * </td> + <td class="mdname1" valign="top" nowrap> <em>server</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> +Sets logging server with an already connected server. +<p> +Definition at line <a class="el" href="a06094.html#l00097">97</a> of file <a class="el" href="a06094.html">net_displayer.cpp</a>. +<p> +References <a class="el" href="a05525.html#l00069">NLNET::CCallbackClient::connected()</a>. +<p> +<div class="fragment"><pre>00098 { +00099 <span class="keywordflow">if</span> (<a class="code" href="a02985.html#NLNET_1_1CNetDisplayerr0">_Server</a> != NULL && <a class="code" href="a02985.html#NLNET_1_1CNetDisplayerr0">_Server</a>->connected()) <span class="keywordflow">return</span>; +00100 +00101 <a class="code" href="a02985.html#NLNET_1_1CNetDisplayerr0">_Server</a> = server; +00102 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLNET_1_1CNetDisplayera4" doxytag="NLNET::CNetDisplayer::setLogServer" ></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 NLNET::CNetDisplayer::setLogServer </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const <a class="el" href="a02665.html">CInetAddress</a> & </td> + <td class="mdname1" valign="top" nowrap> <em>logServerAddr</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> +Sets logging server address. Call this method from outside only if you want to use a LOGS not registered within the NS. It does nothing if the displayer is already connected to a server. +<p> +Definition at line <a class="el" href="a06094.html#l00075">75</a> of file <a class="el" href="a06094.html">net_displayer.cpp</a>. +<p> +References <a class="el" href="a06095.html#l00079">_ServerAddr</a>, <a class="el" href="a06095.html#l00082">_ServerAllocated</a>, <a class="el" href="a05524.html#l00286">NLNET::CCallbackClient::connect()</a>, and <a class="el" href="a05525.html#l00069">NLNET::CCallbackClient::connected()</a>. +<p> +<div class="fragment"><pre>00076 { +00077 <span class="keywordflow">if</span> (<a class="code" href="a02985.html#NLNET_1_1CNetDisplayerr0">_Server</a> != NULL && <a class="code" href="a02985.html#NLNET_1_1CNetDisplayerr0">_Server</a>->connected()) <span class="keywordflow">return</span>; +00078 +00079 <a class="code" href="a02985.html#NLNET_1_1CNetDisplayerr1">_ServerAddr</a> = logServerAddr; +00080 +00081 <span class="keywordflow">if</span> (<a class="code" href="a02985.html#NLNET_1_1CNetDisplayerr0">_Server</a> == NULL) +00082 { +00083 <a class="code" href="a02985.html#NLNET_1_1CNetDisplayerr0">_Server</a> = <span class="keyword">new</span> CCallbackClient(); +00084 <a class="code" href="a02985.html#NLNET_1_1CNetDisplayerr2">_ServerAllocated</a> = <span class="keyword">true</span>; +00085 } +00086 +00087 <span class="keywordflow">try</span> +00088 { +00089 <a class="code" href="a02985.html#NLNET_1_1CNetDisplayerr0">_Server</a>->connect (_ServerAddr); +00090 } +00091 <span class="keywordflow">catch</span>( ESocket& ) +00092 { +00093 <span class="comment">// Silence</span> +00094 } +00095 } +</pre></div> </td> + </tr> +</table> +<hr><h2>Field Documentation</h2> +<a class="anchor" name="NLNET_1_1CNetDisplayerr0" doxytag="NLNET::CNetDisplayer::_Server" ></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="a02305.html">CCallbackClient</a>* <a class="el" href="a02985.html#NLNET_1_1CNetDisplayerr0">NLNET::CNetDisplayer::_Server</a><code> [private]</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="a06095.html#l00081">81</a> of file <a class="el" href="a06095.html">net_displayer.h</a>. </td> + </tr> +</table> +<a class="anchor" name="NLNET_1_1CNetDisplayerr1" doxytag="NLNET::CNetDisplayer::_ServerAddr" ></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="a02665.html">CInetAddress</a> <a class="el" href="a02985.html#NLNET_1_1CNetDisplayerr1">NLNET::CNetDisplayer::_ServerAddr</a><code> [private]</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="a06095.html#l00079">79</a> of file <a class="el" href="a06095.html">net_displayer.h</a>. +<p> +Referenced by <a class="el" href="a06094.html#l00075">setLogServer()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLNET_1_1CNetDisplayerr2" doxytag="NLNET::CNetDisplayer::_ServerAllocated" ></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="a02985.html#NLNET_1_1CNetDisplayerr2">NLNET::CNetDisplayer::_ServerAllocated</a><code> [private]</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="a06095.html#l00082">82</a> of file <a class="el" href="a06095.html">net_displayer.h</a>. +<p> +Referenced by <a class="el" href="a06094.html#l00058">findAndConnect()</a>, <a class="el" href="a06094.html#l00075">setLogServer()</a>, and <a class="el" href="a06094.html#l00108">~CNetDisplayer()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLMISC_1_1IDisplayero0" doxytag="NLNET::CNetDisplayer::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="a06095.html">net_displayer.h</a><li><a class="el" href="a06094.html">net_displayer.cpp</a></ul> +<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 14:00:51 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> |