aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/a03646.html
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--docs/doxygen/nel/a03646.html1653
1 files changed, 1653 insertions, 0 deletions
diff --git a/docs/doxygen/nel/a03646.html b/docs/doxygen/nel/a03646.html
new file mode 100644
index 00000000..f5b317b2
--- /dev/null
+++ b/docs/doxygen/nel/a03646.html
@@ -0,0 +1,1653 @@
+<!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: TemplateNLMISC::CVariable&lt; T &gt; 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::CVariable&lt; T &gt; Class Template Reference</h1><code>#include &lt;<a class="el" href="a06666.html">variable.h</a>&gt;</code>
+<p>
+<p>Inheritance diagram for NLMISC::CVariable&lt; T &gt;:
+<p><center><img src="a03646.png" usemap="#NLMISC::CVariable< T >_map" border="0" alt=""></center>
+<map name="NLMISC::CVariable< T >_map">
+<area href="a03648.html" alt="NLMISC::IVariable" shape="rect" coords="0,56,153,80">
+<area href="a03647.html" alt="NLMISC::ICommand" shape="rect" coords="0,0,153,24">
+</map>
+<h3>template&lt;class T&gt;<br>
+ class NLMISC::CVariable&lt; T &gt;</h3>
+
+<table border=0 cellpadding=0 cellspacing=0>
+<tr><td></td></tr>
+<tr><td colspan=2><br><h2>Public Types</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>typedef std::map&lt; std::string,<br>
+ <a class="el" href="a03647.html">ICommand</a> * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03647.html#NLMISC_1_1IVariablew1">TCommand</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>enum &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03647.html#NLMISC_1_1IVariablew2">TType</a> { <a class="el" href="a03647.html#NLMISC_1_1IVariablew2NLMISC_1_1IVariablew3">Unknown</a>,
+<a class="el" href="a03647.html#NLMISC_1_1IVariablew2NLMISC_1_1IVariablew0">Command</a>,
+<a class="el" href="a03647.html#NLMISC_1_1IVariablew2NLMISC_1_1IVariablew4">Variable</a>
+ }</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="a03646.html#NLMISC_1_1CVariablea0">CVariable</a> (const char *commandName, const char *commandHelp, const T &amp;defaultValue, <a class="el" href="a04558.html#a15">uint</a> nbMeanValue=0, bool useConfigFile=false, void(*cc)(<a class="el" href="a03648.html">IVariable</a> &amp;var)=NULL)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03646.html#NLMISC_1_1CVariablea1">execute</a> (const std::vector&lt; std::string &gt; &amp;args, <a class="el" href="a02813.html">NLMISC::CLog</a> &amp;log, bool quiet, bool human)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03646.html#NLMISC_1_1CVariablea2">fromString</a> (const std::string &amp;val, bool human=false)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>const T &amp;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03646.html#NLMISC_1_1CVariablea3">get</a> () const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>const std::string &amp;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03647.html#NLMISC_1_1IVariablea2">getName</a> () const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>std::string&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03646.html#NLMISC_1_1CVariablea5">getStat</a> () const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03646.html#NLMISC_1_1CVariablea6">operator T</a> () const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03646.html">CVariable</a>&lt; T &gt; &amp;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03646.html#NLMISC_1_1CVariablea7">operator=</a> (const T &amp;val)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03646.html#NLMISC_1_1CVariablea8">set</a> (const T &amp;val)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>virtual std::string&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03646.html#NLMISC_1_1CVariablea9">toString</a> (bool human) const </td></tr>
+
+<tr><td colspan=2><br><h2>Static Public Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03647.html#NLMISC_1_1IVariablee0">execute</a> (const std::string &amp;commandWithArgs, <a class="el" href="a02813.html">NLMISC::CLog</a> &amp;log, bool quiet=false, bool human=true)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03647.html#NLMISC_1_1IVariablee1">exists</a> (std::string &amp;commandName)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">returns true if the command exists <a href="#NLMISC_1_1IVariablee1"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03647.html#NLMISC_1_1IVariablee2">expand</a> (std::string &amp;commandName, <a class="el" href="a02813.html">NLMISC::CLog</a> &amp;log=*<a class="el" href="a05378.html#a12">InfoLog</a>)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03648.html#NLMISC_1_1IVariablee3">init</a> (<a class="el" href="a02401.html">CConfigFile</a> &amp;configFile)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03647.html#NLMISC_1_1IVariablee4">isCommand</a> (const std::string &amp;str)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">if the string begin with an upper case, it s a variable, otherwise, it s a command <a href="#NLMISC_1_1IVariablee4"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03647.html#NLMISC_1_1IVariablee5">serialCommands</a> (<a class="el" href="a02270.html">IStream</a> &amp;f)</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="a03647.html#NLMISC_1_1IVariableo0">CommandArgs</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>std::string&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03647.html#NLMISC_1_1IVariableo1">HelpString</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03647.html#NLMISC_1_1IVariablew2">TType</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03647.html#NLMISC_1_1IVariableo2">Type</a></td></tr>
+
+<tr><td colspan=2><br><h2>Static Public Attributes</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03647.html#NLMISC_1_1IVariablew1">TCommand</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03647.html#NLMISC_1_1IVariables0">Commands</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03647.html#NLMISC_1_1IVariables1">CommandsInit</a></td></tr>
+
+<tr><td colspan=2><br><h2>Protected Attributes</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="a03647.html#NLMISC_1_1IVariablep0">_CommandName</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void(*&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03648.html#NLMISC_1_1IVariablep1">ChangeCallback</a> )(<a class="el" href="a03648.html">IVariable</a> &amp;var)</td></tr>
+
+<tr><td colspan=2><br><h2>Private Attributes</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03646.html#NLMISC_1_1CVariabler0">_First</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>T&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03646.html#NLMISC_1_1CVariabler1">_Max</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03643.html">CValueSmootherTemplate</a>&lt; T &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03646.html#NLMISC_1_1CVariabler2">_Mean</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>T&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03646.html#NLMISC_1_1CVariabler3">_Min</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>T&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03646.html#NLMISC_1_1CVariabler4">_Value</a></td></tr>
+
+<tr><td colspan=2><br><h2>Friends</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03647.html#NLMISC_1_1IVariablen0">cbVarChanged</a> (<a class="el" href="a02402.html">CConfigFile::CVar</a> &amp;var)</td></tr>
+
+</table>
+<hr><h2>Member Typedef Documentation</h2>
+<a class="anchor" name="NLMISC_1_1IVariablew1" doxytag="NLMISC::CVariable::TCommand" ></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"> typedef std::map&lt;std::string, <a class="el" href="a03647.html">ICommand</a> *&gt; <a class="el" href="a03647.html#NLMISC_1_1IVariablew1">NLMISC::ICommand::TCommand</a><code> [inherited]</code>
+ </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="a05585.html#l00116">116</a> of file <a class="el" href="a05585.html">command.h</a>.
+<p>
+Referenced by <a class="el" href="a05584.html#l00038">NLMISC::ICommand::ICommand()</a>. </td>
+ </tr>
+</table>
+<hr><h2>Member Enumeration Documentation</h2>
+<a class="anchor" name="NLMISC_1_1IVariablew2" doxytag="NLMISC::CVariable::TType" ></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"> enum <a class="el" href="a03647.html#NLMISC_1_1IVariablew2">NLMISC::ICommand::TType</a><code> [inherited]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+<dl compact><dt><b>Enumeration values: </b></dt><dd>
+<table border=0 cellspacing=2 cellpadding=0>
+<tr><td valign=top><em><a class="anchor" name="NLMISC_1_1IVariablew2NLMISC_1_1IVariablew3" doxytag="Unknown" ></a>Unknown</em>&nbsp;</td><td>
+</td></tr>
+<tr><td valign=top><em><a class="anchor" name="NLMISC_1_1IVariablew2NLMISC_1_1IVariablew0" doxytag="Command" ></a>Command</em>&nbsp;</td><td>
+</td></tr>
+<tr><td valign=top><em><a class="anchor" name="NLMISC_1_1IVariablew2NLMISC_1_1IVariablew4" doxytag="Variable" ></a>Variable</em>&nbsp;</td><td>
+</td></tr>
+</table>
+</dl>
+
+<p>
+Definition at line <a class="el" href="a05585.html#l00111">111</a> of file <a class="el" href="a05585.html">command.h</a>.
+<p>
+<div class="fragment"><pre>00111 { <a class="code" href="a03647.html#NLMISC_1_1IVariablew2NLMISC_1_1IVariablew3">Unknown</a>, <a class="code" href="a03647.html#NLMISC_1_1IVariablew2NLMISC_1_1IVariablew0">Command</a>, <a class="code" href="a03647.html#NLMISC_1_1IVariablew2NLMISC_1_1IVariablew4">Variable</a> };
+</pre></div> </td>
+ </tr>
+</table>
+<hr><h2>Constructor &amp; Destructor Documentation</h2>
+<a class="anchor" name="NLMISC_1_1CVariablea0" doxytag="NLMISC::CVariable::CVariable" ></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" colspan="4">
+template&lt;class T&gt; </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a03646.html">NLMISC::CVariable</a>&lt; T &gt;::<a class="el" href="a03646.html">CVariable</a> </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const char *&nbsp;</td>
+ <td class="mdname" nowrap> <em>commandName</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>commandHelp</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>const T &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>defaultValue</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>nbMeanValue</em> = 0, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>bool&nbsp;</td>
+ <td class="mdname" nowrap> <em>useConfigFile</em> = false, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>void(*&nbsp;</td>
+ <td class="mdname" nowrap> <em>cc</em>)(<a class="el" href="a03648.html">IVariable</a> &amp;var) = NULL</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><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="a06666.html#l00223">223</a> of file <a class="el" href="a06666.html">variable.h</a>.
+<p>
+<div class="fragment"><pre>00223 :
+00224 <a class="code" href="a03648.html#NLMISC_1_1IVariablea3">IVariable</a> (commandName, commandHelp, <span class="stringliteral">"[&lt;value&gt;|stat|mean|min|max]"</span>, useConfigFile, cc), <a class="code" href="a03646.html#NLMISC_1_1CVariabler2">_Mean</a>(nbMeanValue), <a class="code" href="a03646.html#NLMISC_1_1CVariabler0">_First</a>(<span class="keyword">true</span>)
+00225 {
+00226 <a class="code" href="a03646.html#NLMISC_1_1CVariablea8">set</a> (defaultValue);
+00227 }
+
+</pre></div> </td>
+ </tr>
+</table>
+<hr><h2>Member Function Documentation</h2>
+<a class="anchor" name="NLMISC_1_1IVariablee0" doxytag="NLMISC::CVariable::execute" ></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::ICommand::execute </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const std::string &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>commandWithArgs</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a02813.html">NLMISC::CLog</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>log</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>quiet</em> = false, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>bool&nbsp;</td>
+ <td class="mdname" nowrap> <em>human</em> = true</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>
+Executes the command and display output to the log <dl compact><dt><b>Parameters:</b></dt><dd>
+ <table border="0" cellspacing="2" cellpadding="0">
+ <tr><td valign=top><em>quiet</em>&nbsp;</td><td>true if you don't want to display the "executing the command ..." </td></tr>
+ </table>
+</dl>
+
+<p>
+Definition at line <a class="el" href="a05584.html#l00103">103</a> of file <a class="el" href="a05584.html">command.cpp</a>.
+<p>
+References <a class="el" href="a05943.html#l00323">NLMISC::CLog::displayNL()</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+<div class="fragment"><pre>00104 {
+00105 <span class="keywordflow">if</span> (!quiet) log.<a class="code" href="a02813.html#NLNET_1_1CNetLoga7">displayNL</a> (<span class="stringliteral">"Executing command : '%s'"</span>, commandWithArgs.c_str());
+00106
+00107 <span class="comment">// convert the buffer into string vector</span>
+00108 vector&lt;pair&lt;string, vector&lt;string&gt; &gt; &gt; commands;
+00109
+00110 <span class="keywordtype">bool</span> firstArg = <span class="keyword">true</span>;
+00111 <a class="code" href="a04558.html#a15">uint</a> i = 0;
+00112 <span class="keywordflow">while</span> (<span class="keyword">true</span>)
+00113 {
+00114 <span class="comment">// skip whitespace</span>
+00115 <span class="keywordflow">while</span> (<span class="keyword">true</span>)
+00116 {
+00117 <span class="keywordflow">if</span> (i == commandWithArgs.size())
+00118 {
+00119 <span class="keywordflow">goto</span> end;
+00120 }
+00121 <span class="keywordflow">if</span> (commandWithArgs[i] != <span class="charliteral">' '</span> &amp;&amp; commandWithArgs[i] != <span class="charliteral">'\t'</span> &amp;&amp; commandWithArgs[i] != <span class="charliteral">'\n'</span> &amp;&amp; commandWithArgs[i] != <span class="charliteral">'\r'</span>)
+00122 {
+00123 <span class="keywordflow">break</span>;
+00124 }
+00125 i++;
+00126 }
+00127
+00128 <span class="comment">// get param</span>
+00129 string arg;
+00130 <span class="keywordflow">if</span> (commandWithArgs[i] == <span class="charliteral">'\"'</span>)
+00131 {
+00132 <span class="comment">// starting with a quote "</span>
+00133 i++;
+00134 <span class="keywordflow">while</span> (<span class="keyword">true</span>)
+00135 {
+00136 <span class="keywordflow">if</span> (i == commandWithArgs.size())
+00137 {
+00138 <span class="keywordflow">if</span> (!quiet) log.<a class="code" href="a02813.html#NLNET_1_1CNetLoga7">displayNL</a> (<span class="stringliteral">"Missing end quote character \""</span>);
+00139 <span class="keywordflow">return</span>;
+00140 }
+00141 <span class="keywordflow">if</span> (commandWithArgs[i] == <span class="charliteral">'"'</span>)
+00142 {
+00143 i++;
+00144 <span class="keywordflow">break</span>;
+00145 }
+00146 <span class="keywordflow">if</span> (commandWithArgs[i] == <span class="charliteral">'\\'</span>)
+00147 {
+00148 <span class="comment">// manage escape char backslash</span>
+00149 i++;
+00150 <span class="keywordflow">if</span> (i == commandWithArgs.size())
+00151 {
+00152 <span class="keywordflow">if</span> (!quiet) log.<a class="code" href="a02813.html#NLNET_1_1CNetLoga7">displayNL</a> (<span class="stringliteral">"Missing character after the backslash \\ character"</span>);
+00153 <span class="keywordflow">return</span>;
+00154 }
+00155 <span class="keywordflow">switch</span> (commandWithArgs[i])
+00156 {
+00157 <span class="keywordflow">case</span> <span class="charliteral">'\\'</span>: arg += <span class="charliteral">'\\'</span>; <span class="keywordflow">break</span>; <span class="comment">// double backslash</span>
+00158 <span class="keywordflow">case</span> <span class="charliteral">'n'</span>: arg += <span class="charliteral">'\n'</span>; <span class="keywordflow">break</span>; <span class="comment">// new line</span>
+00159 <span class="keywordflow">case</span> <span class="charliteral">'"'</span>: arg += <span class="charliteral">'"'</span>; <span class="keywordflow">break</span>; <span class="comment">// "</span>
+00160 <span class="keywordflow">default</span>:
+00161 <span class="keywordflow">if</span> (!quiet) log.<a class="code" href="a02813.html#NLNET_1_1CNetLoga7">displayNL</a> (<span class="stringliteral">"Unknown escape code '\\%c'"</span>, commandWithArgs[i]);
+00162 <span class="keywordflow">return</span>;
+00163 }
+00164 i++;
+00165 }
+00166 <span class="keywordflow">else</span>
+00167 {
+00168 arg += commandWithArgs[i++];
+00169 }
+00170 }
+00171 }
+00172 <span class="keywordflow">else</span>
+00173 {
+00174 <span class="comment">// normal word</span>
+00175 <span class="keywordflow">while</span> (<span class="keyword">true</span>)
+00176 {
+00177 <span class="keywordflow">if</span> (commandWithArgs[i] == <span class="charliteral">'\\'</span>)
+00178 {
+00179 <span class="comment">// manage escape char backslash</span>
+00180 i++;
+00181 <span class="keywordflow">if</span> (i == commandWithArgs.size())
+00182 {
+00183 <span class="keywordflow">if</span> (!quiet) log.<a class="code" href="a02813.html#NLNET_1_1CNetLoga7">displayNL</a> (<span class="stringliteral">"Missing character after the backslash \\ character"</span>);
+00184 <span class="keywordflow">return</span>;
+00185 }
+00186 <span class="keywordflow">switch</span> (commandWithArgs[i])
+00187 {
+00188 <span class="keywordflow">case</span> <span class="charliteral">'\\'</span>: arg += <span class="charliteral">'\\'</span>; <span class="keywordflow">break</span>; <span class="comment">// double backslash</span>
+00189 <span class="keywordflow">case</span> <span class="charliteral">'n'</span>: arg += <span class="charliteral">'\n'</span>; <span class="keywordflow">break</span>; <span class="comment">// new line</span>
+00190 <span class="keywordflow">case</span> <span class="charliteral">'"'</span>: arg += <span class="charliteral">'"'</span>; <span class="keywordflow">break</span>; <span class="comment">// "</span>
+00191 <span class="keywordflow">case</span> <span class="charliteral">';'</span>: arg += <span class="charliteral">';'</span>; <span class="keywordflow">break</span>; <span class="comment">// ;</span>
+00192 <span class="keywordflow">default</span>:
+00193 <span class="keywordflow">if</span> (!quiet) log.<a class="code" href="a02813.html#NLNET_1_1CNetLoga7">displayNL</a> (<span class="stringliteral">"Unknown escape code '\\%c'"</span>, commandWithArgs[i]);
+00194 <span class="keywordflow">return</span>;
+00195 }
+00196 }
+00197 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (commandWithArgs[i] == <span class="charliteral">';'</span>)
+00198 {
+00199 <span class="comment">// command separator</span>
+00200 <span class="keywordflow">break</span>;
+00201 }
+00202 <span class="keywordflow">else</span>
+00203 {
+00204 arg += commandWithArgs[i];
+00205 }
+00206
+00207 i++;
+00208
+00209 <span class="keywordflow">if</span> (i == commandWithArgs.size() || commandWithArgs[i] == <span class="charliteral">' '</span> || commandWithArgs[i] == <span class="charliteral">'\t'</span> || commandWithArgs[i] == <span class="charliteral">'\n'</span> || commandWithArgs[i] == <span class="charliteral">'\r'</span>)
+00210 {
+00211 <span class="keywordflow">break</span>;
+00212 }
+00213 }
+00214 }
+00215
+00216 <span class="keywordflow">if</span> (!arg.empty())
+00217 {
+00218 <span class="keywordflow">if</span> (firstArg)
+00219 {
+00220 commands.push_back (make_pair(arg, vector&lt;string&gt; () ));
+00221 firstArg = <span class="keyword">false</span>;
+00222 }
+00223 <span class="keywordflow">else</span>
+00224 {
+00225 commands[commands.size()-1].second.push_back (arg);
+00226 }
+00227 }
+00228
+00229 <span class="comment">// separator</span>
+00230 <span class="keywordflow">if</span> (i &lt; commandWithArgs.size() &amp;&amp; commandWithArgs[i] == <span class="charliteral">';'</span>)
+00231 {
+00232 firstArg = <span class="keyword">true</span>;
+00233 i++;
+00234 }
+00235 }
+00236 end:
+00237
+00238 <span class="comment">// displays args for debug purpose</span>
+00239 <span class="comment">/* for (uint u = 0; u &lt; commands.size (); u++)</span>
+00240 <span class="comment"> {</span>
+00241 <span class="comment"> nlinfo ("c '%s'", commands[u].first.c_str());</span>
+00242 <span class="comment"> for (uint t = 0; t &lt; commands[u].second.size (); t++)</span>
+00243 <span class="comment"> {</span>
+00244 <span class="comment"> nlinfo ("p%d '%s'", t, commands[u].second[t].c_str());</span>
+00245 <span class="comment"> }</span>
+00246 <span class="comment"> }</span>
+00247 <span class="comment">*/</span>
+00248
+00249 <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> u = 0; u &lt; commands.size (); u++)
+00250 {
+00251 <span class="comment">// find the command </span>
+00252 TCommand::iterator comm = (*Commands).find(commands[u].first);
+00253 <span class="keywordflow">if</span> (comm == (*Commands).end ())
+00254 {
+00255 <span class="comment">// the command doesn't exist</span>
+00256 <span class="keywordflow">if</span> (!quiet) log.<a class="code" href="a02813.html#NLNET_1_1CNetLoga7">displayNL</a>(<span class="stringliteral">"Command '%s' not found, try 'help'"</span>, commands[u].first.c_str());
+00257 }
+00258 <span class="keywordflow">else</span>
+00259 {
+00260 <span class="comment">//nlinfo("execute command '%s'", commands[u].first.c_str());</span>
+00261 <span class="keywordflow">if</span> (!(*comm).second-&gt;execute (commands[u].second, log, quiet, human))
+00262 {
+00263 <span class="keywordflow">if</span> (!quiet) log.<a class="code" href="a02813.html#NLNET_1_1CNetLoga7">displayNL</a>(<span class="stringliteral">"Bad command usage, try 'help %s'"</span>, commands[u].first.c_str());
+00264 }
+00265 }
+00266 }
+00267 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CVariablea1" doxytag="NLMISC::CVariable::execute" ></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" colspan="4">
+template&lt;class T&gt; </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap valign="top"> virtual bool <a class="el" href="a03646.html">NLMISC::CVariable</a>&lt; T &gt;::execute </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const std::vector&lt; std::string &gt; &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><a class="el" href="a02813.html">NLMISC::CLog</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>log</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>quiet</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>human</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [inline, virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Reimplemented from <a class="el" href="a03648.html#NLMISC_1_1IVariablea0">NLMISC::IVariable</a>.
+<p>
+Definition at line <a class="el" href="a06666.html#l00304">304</a> of file <a class="el" href="a06666.html">variable.h</a>.
+<p>
+<div class="fragment"><pre>00305 {
+00306 <span class="keywordflow">if</span> (args.size() &gt; 1)
+00307 <span class="keywordflow">return</span> <span class="keyword">false</span>;
+00308
+00309 <span class="keywordtype">bool</span> haveVal=<span class="keyword">false</span>;
+00310 std::string val;
+00311
+00312 <span class="keywordflow">if</span> (args.size() == 1)
+00313 {
+00314 <span class="keywordflow">if</span> (args[0] == <span class="stringliteral">"stat"</span>)
+00315 {
+00316 <span class="comment">// display the stat value</span>
+00317 log.<a class="code" href="a02813.html#NLNET_1_1CNetLoga7">displayNL</a>(<a class="code" href="a03646.html#NLMISC_1_1CVariablea5">getStat</a>().c_str());
+00318 <span class="keywordflow">return</span> <span class="keyword">true</span>;
+00319 }
+00320 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (args[0] == <span class="stringliteral">"mean"</span>)
+00321 {
+00322 haveVal = <span class="keyword">true</span>;
+00323 val = <a class="code" href="a05378.html#a244">NLMISC::toString</a>(<a class="code" href="a03646.html#NLMISC_1_1CVariabler2">_Mean</a>.getSmoothValue());
+00324 }
+00325 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (args[0] == <span class="stringliteral">"min"</span>)
+00326 {
+00327 haveVal = <span class="keyword">true</span>;
+00328 val = <a class="code" href="a05378.html#a244">NLMISC::toString</a>(_Min);
+00329 }
+00330 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (args[0] == <span class="stringliteral">"max"</span>)
+00331 {
+00332 haveVal = <span class="keyword">true</span>;
+00333 val = <a class="code" href="a05378.html#a244">NLMISC::toString</a>(_Max);
+00334 }
+00335 <span class="keywordflow">else</span>
+00336 {
+00337 <span class="comment">// set the value</span>
+00338 <a class="code" href="a03646.html#NLMISC_1_1CVariablea2">fromString</a> (args[0], human);
+00339 }
+00340 }
+00341
+00342 <span class="comment">// display the value</span>
+00343 <span class="keywordflow">if</span> (!haveVal)
+00344 {
+00345 val = <a class="code" href="a03646.html#NLMISC_1_1CVariablea9">toString</a>(human);
+00346 }
+00347
+00348 <span class="keywordflow">if</span> (quiet)
+00349 {
+00350 log.<a class="code" href="a02813.html#NLNET_1_1CNetLoga7">displayNL</a>(val.c_str());
+00351 }
+00352 <span class="keywordflow">else</span>
+00353 {
+00354 log.<a class="code" href="a02813.html#NLNET_1_1CNetLoga7">displayNL</a>(<span class="stringliteral">"Variable %s = %s"</span>, <a class="code" href="a03647.html#NLMISC_1_1IVariablep0">_CommandName</a>.c_str(), val.c_str());
+00355 }
+00356 <span class="keywordflow">return</span> <span class="keyword">true</span>;
+00357 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1IVariablee1" doxytag="NLMISC::CVariable::exists" ></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 NLMISC::ICommand::exists </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">std::string &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>commandName</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>
+returns true if the command exists
+<p>
+
+<p>
+Definition at line <a class="el" href="a05584.html#l00384">384</a> of file <a class="el" href="a05584.html">command.cpp</a>.
+<p>
+<div class="fragment"><pre>00385 {
+00386 <span class="keywordflow">return</span> ((*Commands).find(commandName) != (*Commands).end ());
+00387 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1IVariablee2" doxytag="NLMISC::CVariable::expand" ></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::ICommand::expand </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">std::string &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>commandName</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a02813.html">NLMISC::CLog</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>log</em> = *<a class="el" href="a05378.html#a12">InfoLog</a></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>
+Command name completion. Case-sensitive. Displays the list after two calls with the same non-unique completion. Completes commands used with prefixes (such as "help " for example) as well.
+<p>
+Definition at line <a class="el" href="a05584.html#l00275">275</a> of file <a class="el" href="a05584.html">command.cpp</a>.
+<p>
+References <a class="el" href="a05943.html#l00323">NLMISC::CLog::displayNL()</a>, <a class="el" href="a05586.html#l00536">NLMISC::strlwr()</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>00276 {
+00277 <span class="comment">// Take out the string before the last separator and remember it as a prefix</span>
+00278 <a class="code" href="a04558.html#a11">uint32</a> lastseppos = commandName.find_last_of( <span class="stringliteral">" "</span> );
+00279 string prefix;
+00280 <span class="keywordtype">bool</span> useprefix;
+00281 <span class="keywordflow">if</span> ( lastseppos != string::npos )
+00282 {
+00283 prefix = commandName.substr( 0, lastseppos+1 );
+00284 commandName.erase( 0, lastseppos+1 );
+00285 useprefix = <span class="keyword">true</span>;
+00286 }
+00287 <span class="keywordflow">else</span>
+00288 {
+00289 useprefix = <span class="keyword">false</span>;
+00290 }
+00291
+00292 string lowerCommandName = <a class="code" href="a05378.html#a273">strlwr</a>(const_cast&lt;const string &amp;&gt;(commandName));
+00293 <span class="comment">// Build the list of matching command names</span>
+00294 vector&lt;string&gt; matchingnames;
+00295 <span class="keywordflow">for</span> (TCommand::iterator comm = (*Commands).begin(); comm != (*Commands).end(); comm++)
+00296 {
+00297 string first = <a class="code" href="a05378.html#a273">strlwr</a>(const_cast&lt;const string &amp;&gt;((*comm).first));
+00298 <span class="keywordflow">if</span> (first.find( lowerCommandName ) == 0)
+00299 {
+00300 matchingnames.push_back( (*comm).first );
+00301 }
+00302 }
+00303
+00304 <span class="comment">// Do not complete if there is no result</span>
+00305 <span class="keywordflow">if</span> ( matchingnames.empty() )
+00306 {
+00307 log.<a class="code" href="a02813.html#NLNET_1_1CNetLoga7">displayNL</a>( <span class="stringliteral">"No matching command"</span> );
+00308 <span class="keywordflow">goto</span> returnFromExpand;
+00309 }
+00310
+00311 <span class="comment">// Complete if there is a single result</span>
+00312 <span class="keywordflow">if</span> ( matchingnames.size() == 1 )
+00313 {
+00314 commandName = matchingnames.front() + <span class="stringliteral">" "</span>;
+00315 <span class="keywordflow">goto</span> returnFromExpand;
+00316 }
+00317
+00318 <span class="comment">// Try to complete to the common part if there are several results</span>
+00319 {
+00320 <span class="comment">// Stop loop when a name size is i or names[i] are different</span>
+00321 string commonstr = commandName;
+00322 <a class="code" href="a04558.html#a15">uint</a> i = commandName.size();
+00323 <span class="keywordflow">while</span> ( <span class="keyword">true</span> )
+00324 {
+00325 <span class="keywordtype">char</span> letter = 0;
+00326 vector&lt;string&gt;::iterator imn;
+00327 <span class="keywordflow">for</span> ( imn=matchingnames.begin(); imn!=matchingnames.end(); ++imn )
+00328 {
+00329 <span class="comment">// Return common string if the next letter is not the same in all matching names</span>
+00330 <span class="keywordflow">if</span> ( ((*imn).size() == i) || ( (letter!=0) &amp;&amp; ((*imn)[i] != letter) ) )
+00331 {
+00332 log.<a class="code" href="a02813.html#NLNET_1_1CNetLoga7">displayNL</a>( <span class="stringliteral">"(Matching command not unique)"</span> );
+00333 <span class="keyword">static</span> string lastCommandName;
+00334 commandName = commonstr;
+00335 <span class="keywordflow">if</span> ( lastCommandName == commandName )
+00336 {
+00337 <span class="comment">// Display all the matching names </span>
+00338 vector&lt;string&gt;::iterator imn2;
+00339 <span class="comment">//stringstream ss;</span>
+00340 string str;
+00341 <span class="comment">//ss &lt;&lt; "Matching commands:" &lt;&lt; endl;</span>
+00342 str += <span class="stringliteral">"Matching commands:\n"</span>;
+00343 <span class="keywordflow">for</span> ( imn2=matchingnames.begin(); imn2!=matchingnames.end(); ++imn2 )
+00344 {
+00345 <span class="comment">//ss &lt;&lt; " " &lt;&lt; (*imn2);</span>
+00346 str += <span class="stringliteral">" "</span> + (*imn2);
+00347 }
+00348 log.<a class="code" href="a02813.html#NLNET_1_1CNetLoga7">displayNL</a>( <span class="stringliteral">"%s"</span>, str.c_str() );
+00349 }
+00350 lastCommandName = commandName;
+00351 <span class="keywordflow">goto</span> returnFromExpand;
+00352 }
+00353 <span class="comment">// Add the next letter to the common string if it is the same in all matching names</span>
+00354 <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( letter == 0 )
+00355 {
+00356 letter = (*imn)[i];
+00357 }
+00358 }
+00359 commonstr += letter;
+00360 ++i;
+00361 }
+00362 }
+00363
+00364 returnFromExpand:
+00365
+00366 <span class="comment">// Put back the prefix</span>
+00367 <span class="keywordflow">if</span> ( useprefix )
+00368 {
+00369 commandName = prefix + commandName;
+00370 }
+00371 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CVariablea2" doxytag="NLMISC::CVariable::fromString" ></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" colspan="4">
+template&lt;class T&gt; </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap valign="top"> virtual void <a class="el" href="a03646.html">NLMISC::CVariable</a>&lt; T &gt;::fromString </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const std::string &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>val</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>human</em> = false</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [inline, virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Implements <a class="el" href="a03648.html#NLMISC_1_1IVariablea1">NLMISC::IVariable</a>.
+<p>
+Definition at line <a class="el" href="a06666.html#l00229">229</a> of file <a class="el" href="a06666.html">variable.h</a>.
+<p>
+Referenced by <a class="el" href="a06666.html#l00304">NLMISC::CVariable&lt; std::string &gt;::execute()</a>.
+<p>
+<div class="fragment"><pre>00230 {
+00231 T <a class="code" href="a04223.html#a576">v</a>;
+00232 <a class="code" href="a05378.html#a423">NLMISC::fromString</a>(val, v);
+00233 <span class="comment">// std::stringstream ss (val);</span>
+00234 <span class="comment">// ss &gt;&gt; v;</span>
+00235 <a class="code" href="a03646.html#NLMISC_1_1CVariablea8">set</a> (v);
+00236 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CVariablea3" doxytag="NLMISC::CVariable::get" ></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" colspan="4">
+template&lt;class T&gt; </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap valign="top"> const T&amp; <a class="el" href="a03646.html">NLMISC::CVariable</a>&lt; T &gt;::get </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> const<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="a06666.html#l00275">275</a> of file <a class="el" href="a06666.html">variable.h</a>.
+<p>
+Referenced by <a class="el" href="a06666.html#l00393">NLMISC::CVariable&lt; std::string &gt;::operator std::string()</a>, and <a class="el" href="a06666.html#l00252">NLMISC::CVariable&lt; std::string &gt;::operator T()</a>.
+<p>
+<div class="fragment"><pre>00276 {
+00277 <span class="keywordflow">return</span> <a class="code" href="a03646.html#NLMISC_1_1CVariabler4">_Value</a>;
+00278 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1IVariablea2" doxytag="NLMISC::CVariable::getName" ></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::string&amp; NLMISC::ICommand::getName </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">void&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> const<code> [inline, 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="a05585.html#l00145">145</a> of file <a class="el" href="a05585.html">command.h</a>.
+<p>
+References <a class="el" href="a05585.html#l00149">NLMISC::ICommand::_CommandName</a>.
+<p>
+Referenced by <a class="el" href="a06364.html#l00230">NLNET::cbDirectoryChanged()</a>.
+<p>
+<div class="fragment"><pre>00145 { <span class="keywordflow">return</span> <a class="code" href="a03647.html#NLMISC_1_1IVariablep0">_CommandName</a>; }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CVariablea5" doxytag="NLMISC::CVariable::getStat" ></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" colspan="4">
+template&lt;class T&gt; </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap valign="top"> std::string <a class="el" href="a03646.html">NLMISC::CVariable</a>&lt; T &gt;::getStat </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> const<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="a06666.html#l00280">280</a> of file <a class="el" href="a06666.html">variable.h</a>.
+<p>
+Referenced by <a class="el" href="a06666.html#l00304">NLMISC::CVariable&lt; std::string &gt;::execute()</a>.
+<p>
+<div class="fragment"><pre>00281 {
+00282 <span class="comment">// std::stringstream s;</span>
+00283 <span class="comment">// s &lt;&lt; _CommandName &lt;&lt; "=" &lt;&lt; _Value;</span>
+00284 <span class="comment">// s &lt;&lt; " Min=" &lt;&lt; _Min;</span>
+00285 <span class="comment">// s &lt;&lt; " Max=" &lt;&lt; _Max;</span>
+00286 std::string str;
+00287 str = <a class="code" href="a03647.html#NLMISC_1_1IVariablep0">_CommandName</a> + <span class="stringliteral">"="</span> + <a class="code" href="a05378.html#a244">NLMISC::toString</a>(_Value) + <span class="stringliteral">" Min="</span> + <a class="code" href="a05378.html#a244">NLMISC::toString</a>(_Min) + <span class="stringliteral">" Max="</span> + <a class="code" href="a05378.html#a244">NLMISC::toString</a>(_Max);
+00288 <span class="keywordflow">if</span> (<a class="code" href="a03646.html#NLMISC_1_1CVariabler2">_Mean</a>.getNumFrame()&gt;0)
+00289 {
+00290 str += <span class="stringliteral">" Mean="</span> + <a class="code" href="a05378.html#a244">NLMISC::toString</a>(<a class="code" href="a03646.html#NLMISC_1_1CVariabler2">_Mean</a>.getSmoothValue()) + <span class="stringliteral">" LastValues="</span>;
+00291 <span class="comment">// s &lt;&lt; " Mean=" &lt;&lt; _Mean.getSmoothValue();</span>
+00292 <span class="comment">// s &lt;&lt; " LastValues=";</span>
+00293 <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> i = 0; i &lt; <a class="code" href="a03646.html#NLMISC_1_1CVariabler2">_Mean</a>.getNumFrame(); i++)
+00294 {
+00295 str += <a class="code" href="a05378.html#a244">NLMISC::toString</a>(<a class="code" href="a03646.html#NLMISC_1_1CVariabler2">_Mean</a>.getLastFrames()[i]);
+00296 <span class="comment">//s &lt;&lt; _Mean.getLastFrames()[i];</span>
+00297 <span class="keywordflow">if</span> (i &lt; <a class="code" href="a03646.html#NLMISC_1_1CVariabler2">_Mean</a>.getNumFrame()-1)
+00298 str += <span class="stringliteral">","</span>; <span class="comment">//s &lt;&lt; ",";</span>
+00299 }
+00300 }
+00301 <span class="keywordflow">return</span> str;
+00302 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1IVariablee3" doxytag="NLMISC::CVariable::init" ></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::IVariable::init </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02401.html">CConfigFile</a> &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>configFile</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>
+
+<p>
+Definition at line <a class="el" href="a06665.html#l00050">50</a> of file <a class="el" href="a06665.html">variable.cpp</a>.
+<p>
+References <a class="el" href="a05585.html#l00149">NLMISC::ICommand::_CommandName</a>, <a class="el" href="a06666.html#l00175">NLMISC::IVariable::_UseConfigFile</a>, <a class="el" href="a05597.html#l00097">NLMISC::CConfigFile::CVar::asString()</a>, <a class="el" href="a06665.html#l00036">NLMISC::cbVarChanged()</a>, <a class="el" href="a03648.html#NLMISC_1_1IVariablea1">NLMISC::IVariable::fromString()</a>, <a class="el" href="a05598.html#l00258">NLMISC::CConfigFile::getFilename()</a>, <a class="el" href="a05597.html#l00441">NLMISC::CConfigFile::getVarPtr()</a>, <a class="el" href="a05622.html#l00111">nlinfo</a>, <a class="el" href="a05622.html#l00135">nlwarning</a>, and <a class="el" href="a05597.html#l00647">NLMISC::CConfigFile::setCallback()</a>.
+<p>
+Referenced by <a class="el" href="a06364.html#l00419">NLNET::IService::main()</a>.
+<p>
+<div class="fragment"><pre>00051 {
+00052 <span class="keywordflow">for</span> (TCommand::iterator comm = (*Commands).begin(); comm != (*Commands).end(); comm++)
+00053 {
+00054 <span class="keywordflow">if</span> ((*comm).second-&gt;Type == ICommand::Variable)
+00055 {
+00056 <a class="code" href="a03648.html">IVariable</a> *var = (<a class="code" href="a03648.html">IVariable</a> *)((*comm).second);
+00057 <span class="keywordflow">if</span> (var-&gt;<a class="code" href="a03648.html#NLMISC_1_1IVariabler0">_UseConfigFile</a>)
+00058 {
+00059 configFile.<a class="code" href="a02401.html#NLMISC_1_1CConfigFilea17">setCallback</a>(var-&gt;<a class="code" href="a03647.html#NLMISC_1_1IVariablep0">_CommandName</a>, cbVarChanged);
+00060 <a class="code" href="a02402.html">CConfigFile::CVar</a> *cvar = configFile.<a class="code" href="a02401.html#NLMISC_1_1CConfigFilea10">getVarPtr</a>(var-&gt;<a class="code" href="a03647.html#NLMISC_1_1IVariablep0">_CommandName</a>);
+00061 <span class="keywordflow">if</span> (cvar != 0)
+00062 {
+00063 string val = cvar-&gt;<a class="code" href="a02402.html#NLMISC_1_1CConfigFile_1_1CVarz1933_3">asString</a>();
+00064 <a class="code" href="a04199.html#a1">nlinfo</a> (<span class="stringliteral">"VAR: Setting variable '%s' with value '%s' from config file '%s'"</span>, var-&gt;<a class="code" href="a03647.html#NLMISC_1_1IVariablep0">_CommandName</a>.c_str(), val.c_str(), configFile.<a class="code" href="a02401.html#NLMISC_1_1CConfigFilea6">getFilename</a>().c_str());
+00065 var-&gt;<a class="code" href="a03648.html#NLMISC_1_1IVariablea1">fromString</a>(val, <span class="keyword">true</span>);
+00066 }
+00067 <span class="keywordflow">else</span>
+00068 {
+00069 <a class="code" href="a04199.html#a2">nlwarning</a> (<span class="stringliteral">"VAR: No variable '%s' in config file '%s'"</span>, var-&gt;<a class="code" href="a03647.html#NLMISC_1_1IVariablep0">_CommandName</a>.c_str(), configFile.<a class="code" href="a02401.html#NLMISC_1_1CConfigFilea6">getFilename</a>().c_str());
+00070 }
+00071 }
+00072 }
+00073 }
+00074 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1IVariablee4" doxytag="NLMISC::CVariable::isCommand" ></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 NLMISC::ICommand::isCommand </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const std::string &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>str</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline, static, inherited]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+if the string begin with an upper case, it s a variable, otherwise, it s a command
+<p>
+
+<p>
+Definition at line <a class="el" href="a05585.html#l00137">137</a> of file <a class="el" href="a05585.html">command.h</a>.
+<p>
+<div class="fragment"><pre>00138 {
+00139 <span class="keywordflow">if</span> (str.empty())
+00140 <span class="keywordflow">return</span> <span class="keyword">false</span>;
+00141
+00142 <span class="keywordflow">return</span> isupper(str[0]) == 0;
+00143 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CVariablea6" doxytag="NLMISC::CVariable::operator T" ></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" colspan="4">
+template&lt;class T&gt; </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a03646.html">NLMISC::CVariable</a>&lt; T &gt;::operator T </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> const<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="a06666.html#l00252">252</a> of file <a class="el" href="a06666.html">variable.h</a>.
+<p>
+<div class="fragment"><pre>00253 {
+00254 <span class="keywordflow">return</span> <a class="code" href="a03646.html#NLMISC_1_1CVariablea3">get</a> ();
+00255 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CVariablea7" doxytag="NLMISC::CVariable::operator=" ></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" colspan="4">
+template&lt;class T&gt; </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a03646.html">CVariable</a>&lt;T&gt;&amp; <a class="el" href="a03646.html">NLMISC::CVariable</a>&lt; T &gt;::operator= </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const T &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>val</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="a06666.html#l00246">246</a> of file <a class="el" href="a06666.html">variable.h</a>.
+<p>
+<div class="fragment"><pre>00247 {
+00248 <a class="code" href="a03646.html#NLMISC_1_1CVariablea8">set</a> (val);
+00249 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
+00250 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1IVariablee5" doxytag="NLMISC::CVariable::serialCommands" ></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::ICommand::serialCommands </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02270.html">IStream</a> &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>f</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>
+
+<p>
+Definition at line <a class="el" href="a05584.html#l00374">374</a> of file <a class="el" href="a05584.html">command.cpp</a>.
+<p>
+References <a class="el" href="a06462.html#l00324">NLMISC::IStream::serialCont()</a>.
+<p>
+<div class="fragment"><pre>00375 {
+00376 vector&lt;CSerialCommand&gt; cmd;
+00377 <span class="keywordflow">for</span> (TCommand::iterator comm = (*Commands).begin(); comm != (*Commands).end(); comm++)
+00378 {
+00379 cmd.push_back (<a class="code" href="a03364.html">CSerialCommand</a> ((*comm).first, (*comm).second-&gt;Type));
+00380 }
+00381 f.serialCont (cmd);
+00382 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CVariablea8" doxytag="NLMISC::CVariable::set" ></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" colspan="4">
+template&lt;class T&gt; </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap valign="top"> void <a class="el" href="a03646.html">NLMISC::CVariable</a>&lt; T &gt;::set </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const T &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>val</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="a06666.html#l00257">257</a> of file <a class="el" href="a06666.html">variable.h</a>.
+<p>
+Referenced by <a class="el" href="a06666.html#l00223">NLMISC::CVariable&lt; std::string &gt;::CVariable()</a>, <a class="el" href="a06666.html#l00229">NLMISC::CVariable&lt; std::string &gt;::fromString()</a>, and <a class="el" href="a06666.html#l00246">NLMISC::CVariable&lt; std::string &gt;::operator=()</a>.
+<p>
+<div class="fragment"><pre>00258 {
+00259 <a class="code" href="a03646.html#NLMISC_1_1CVariabler4">_Value</a> = val;
+00260 <a class="code" href="a03646.html#NLMISC_1_1CVariabler2">_Mean</a>.addValue (_Value);
+00261 <span class="keywordflow">if</span> (<a class="code" href="a03646.html#NLMISC_1_1CVariabler0">_First</a>)
+00262 {
+00263 <a class="code" href="a03646.html#NLMISC_1_1CVariabler0">_First</a> = <span class="keyword">false</span>;
+00264 <a class="code" href="a03646.html#NLMISC_1_1CVariabler3">_Min</a> = <a class="code" href="a03646.html#NLMISC_1_1CVariabler4">_Value</a>;
+00265 <a class="code" href="a03646.html#NLMISC_1_1CVariabler1">_Max</a> = _Value;
+00266 }
+00267 <span class="keywordflow">else</span>
+00268 {
+00269 <span class="keywordflow">if</span> (<a class="code" href="a03646.html#NLMISC_1_1CVariabler4">_Value</a> &gt; <a class="code" href="a03646.html#NLMISC_1_1CVariabler1">_Max</a>) <a class="code" href="a03646.html#NLMISC_1_1CVariabler1">_Max</a> = <a class="code" href="a03646.html#NLMISC_1_1CVariabler4">_Value</a>;
+00270 <span class="keywordflow">if</span> (_Value &lt; <a class="code" href="a03646.html#NLMISC_1_1CVariabler3">_Min</a>) <a class="code" href="a03646.html#NLMISC_1_1CVariabler3">_Min</a> = _Value;
+00271 }
+00272 <span class="keywordflow">if</span> (<a class="code" href="a03648.html#NLMISC_1_1IVariablep1">ChangeCallback</a>) <a class="code" href="a03648.html#NLMISC_1_1IVariablep1">ChangeCallback</a> (*<span class="keyword">this</span>);
+00273 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CVariablea9" doxytag="NLMISC::CVariable::toString" ></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" colspan="4">
+template&lt;class T&gt; </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap valign="top"> virtual std::string <a class="el" href="a03646.html">NLMISC::CVariable</a>&lt; T &gt;::toString </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">bool&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>human</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> const<code> [inline, virtual]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Implements <a class="el" href="a03648.html#NLMISC_1_1IVariablea4">NLMISC::IVariable</a>.
+<p>
+Definition at line <a class="el" href="a06666.html#l00238">238</a> of file <a class="el" href="a06666.html">variable.h</a>.
+<p>
+Referenced by <a class="el" href="a06666.html#l00304">NLMISC::CVariable&lt; std::string &gt;::execute()</a>.
+<p>
+<div class="fragment"><pre>00239 {
+00240 <span class="keywordflow">return</span> <a class="code" href="a05378.html#a244">NLMISC::toString</a>(_Value);
+00241 <span class="comment">// std::stringstream ss;</span>
+00242 <span class="comment">// ss &lt;&lt; _Value;</span>
+00243 <span class="comment">// return ss.str();</span>
+00244 }
+</pre></div> </td>
+ </tr>
+</table>
+<hr><h2>Friends And Related Function Documentation</h2>
+<a class="anchor" name="NLMISC_1_1IVariablen0" doxytag="NLMISC::CVariable::cbVarChanged" ></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 cbVarChanged </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02402.html">CConfigFile::CVar</a> &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>var</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [friend, 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="a06665.html#l00036">36</a> of file <a class="el" href="a06665.html">variable.cpp</a>.
+<p>
+<div class="fragment"><pre>00037 {
+00038 <span class="keywordflow">for</span> (ICommand::TCommand::iterator comm = (*ICommand::Commands).begin(); comm != (*ICommand::Commands).end(); comm++)
+00039 {
+00040 <span class="keywordflow">if</span> ((*comm).second-&gt;Type == ICommand::Variable &amp;&amp; (*comm).second-&gt;_CommandName == cvar.Name)
+00041 {
+00042 <a class="code" href="a03648.html">IVariable</a> *var = (<a class="code" href="a03648.html">IVariable</a> *)((*comm).second);
+00043 string val = cvar.<a class="code" href="a02402.html#NLMISC_1_1CConfigFile_1_1CVarz1933_3">asString</a>();
+00044 <a class="code" href="a04199.html#a1">nlinfo</a> (<span class="stringliteral">"VAR: Setting variable '%s' with value '%s' from config file"</span>, cvar.Name.c_str(), val.c_str());
+00045 var-&gt;<a class="code" href="a03648.html#NLMISC_1_1IVariablea1">fromString</a>(val, <span class="keyword">true</span>);
+00046 }
+00047 }
+00048 }
+</pre></div> </td>
+ </tr>
+</table>
+<hr><h2>Field Documentation</h2>
+<a class="anchor" name="NLMISC_1_1IVariablep0" doxytag="NLMISC::CVariable::_CommandName" ></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="a03647.html#NLMISC_1_1IVariablep0">NLMISC::ICommand::_CommandName</a><code> [protected, inherited]</code>
+ </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="a05585.html#l00149">149</a> of file <a class="el" href="a05585.html">command.h</a>.
+<p>
+Referenced by <a class="el" href="a05585.html#l00145">NLMISC::ICommand::getName()</a>, <a class="el" href="a05584.html#l00038">NLMISC::ICommand::ICommand()</a>, and <a class="el" href="a06665.html#l00050">NLMISC::IVariable::init()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CVariabler0" doxytag="NLMISC::CVariable::_First" ></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" colspan="4">
+template&lt;class T&gt; </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap valign="top"> bool <a class="el" href="a03646.html">NLMISC::CVariable</a>&lt; T &gt;::<a class="el" href="a03646.html#NLMISC_1_1CVariabler0">_First</a><code> [private]</code>
+ </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="a06666.html#l00364">364</a> of file <a class="el" href="a06666.html">variable.h</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CVariabler1" doxytag="NLMISC::CVariable::_Max" ></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" colspan="4">
+template&lt;class T&gt; </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap valign="top"> T <a class="el" href="a03646.html">NLMISC::CVariable</a>&lt; T &gt;::<a class="el" href="a03646.html#NLMISC_1_1CVariabler1">_Max</a><code> [private]</code>
+ </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="a06666.html#l00363">363</a> of file <a class="el" href="a06666.html">variable.h</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CVariabler2" doxytag="NLMISC::CVariable::_Mean" ></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" colspan="4">
+template&lt;class T&gt; </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a03643.html">CValueSmootherTemplate</a>&lt;T&gt; <a class="el" href="a03646.html">NLMISC::CVariable</a>&lt; T &gt;::<a class="el" href="a03646.html#NLMISC_1_1CVariabler2">_Mean</a><code> [private]</code>
+ </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="a06666.html#l00362">362</a> of file <a class="el" href="a06666.html">variable.h</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CVariabler3" doxytag="NLMISC::CVariable::_Min" ></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" colspan="4">
+template&lt;class T&gt; </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap valign="top"> T <a class="el" href="a03646.html">NLMISC::CVariable</a>&lt; T &gt;::<a class="el" href="a03646.html#NLMISC_1_1CVariabler3">_Min</a><code> [private]</code>
+ </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="a06666.html#l00363">363</a> of file <a class="el" href="a06666.html">variable.h</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CVariabler4" doxytag="NLMISC::CVariable::_Value" ></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" colspan="4">
+template&lt;class T&gt; </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap valign="top"> T <a class="el" href="a03646.html">NLMISC::CVariable</a>&lt; T &gt;::<a class="el" href="a03646.html#NLMISC_1_1CVariabler4">_Value</a><code> [private]</code>
+ </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="a06666.html#l00361">361</a> of file <a class="el" href="a06666.html">variable.h</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1IVariablep1" doxytag="NLMISC::CVariable::ChangeCallback" ></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(* <a class="el" href="a03648.html#NLMISC_1_1IVariablep1">NLMISC::IVariable::ChangeCallback</a>)(<a class="el" href="a03648.html">IVariable</a> &amp;var)<code> [protected, inherited]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Referenced by <a class="el" href="a06666.html#l00196">NLMISC::CVariablePtr&lt; T &gt;::fromString()</a>, <a class="el" href="a06666.html#l00138">NLMISC::IVariable::IVariable()</a>, and <a class="el" href="a06666.html#l00257">NLMISC::CVariable&lt; std::string &gt;::set()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1IVariableo0" doxytag="NLMISC::CVariable::CommandArgs" ></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="a03647.html#NLMISC_1_1IVariableo0">NLMISC::ICommand::CommandArgs</a><code> [inherited]</code>
+ </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="a05585.html#l00108">108</a> of file <a class="el" href="a05585.html">command.h</a>.
+<p>
+Referenced by <a class="el" href="a05584.html#l00038">NLMISC::ICommand::ICommand()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1IVariables0" doxytag="NLMISC::CVariable::Commands" ></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="a03647.html#NLMISC_1_1IVariablew1">ICommand::TCommand</a> * <a class="el" href="a03647.html#NLMISC_1_1IVariables0">NLMISC::ICommand::Commands</a><code> [static, inherited]</code>
+ </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="a05584.html#l00035">35</a> of file <a class="el" href="a05584.html">command.cpp</a>.
+<p>
+Referenced by <a class="el" href="a05584.html#l00038">NLMISC::ICommand::ICommand()</a>, and <a class="el" href="a05584.html#l00068">NLMISC::ICommand::~ICommand()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1IVariables1" doxytag="NLMISC::CVariable::CommandsInit" ></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="a03647.html#NLMISC_1_1IVariables1">NLMISC::ICommand::CommandsInit</a><code> [static, inherited]</code>
+ </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="a05584.html#l00036">36</a> of file <a class="el" href="a05584.html">command.cpp</a>.
+<p>
+Referenced by <a class="el" href="a05584.html#l00038">NLMISC::ICommand::ICommand()</a>, and <a class="el" href="a05584.html#l00068">NLMISC::ICommand::~ICommand()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1IVariableo1" doxytag="NLMISC::CVariable::HelpString" ></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="a03647.html#NLMISC_1_1IVariableo1">NLMISC::ICommand::HelpString</a><code> [inherited]</code>
+ </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="a05585.html#l00107">107</a> of file <a class="el" href="a05585.html">command.h</a>.
+<p>
+Referenced by <a class="el" href="a05584.html#l00038">NLMISC::ICommand::ICommand()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1IVariableo2" doxytag="NLMISC::CVariable::Type" ></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="a03647.html#NLMISC_1_1IVariablew2">TType</a> <a class="el" href="a03647.html#NLMISC_1_1IVariableo2">NLMISC::ICommand::Type</a><code> [inherited]</code>
+ </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="a05585.html#l00112">112</a> of file <a class="el" href="a05585.html">command.h</a>. </td>
+ </tr>
+</table>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="a06666.html">variable.h</a></ul>
+<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 13:40:39 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>