aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/a03441.html
diff options
context:
space:
mode:
authorneodarz <neodarz@neodarz.net>2018-08-11 20:21:34 +0200
committerneodarz <neodarz@neodarz.net>2018-08-11 20:21:34 +0200
commit0ea5fc66924303d1bf73ba283a383e2aadee02f2 (patch)
tree2568e71a7ccc44ec23b8bb3f0ff97fb6bf2ed709 /docs/doxygen/nel/a03441.html
downloadnevrax-website-self-hostable-0ea5fc66924303d1bf73ba283a383e2aadee02f2.tar.xz
nevrax-website-self-hostable-0ea5fc66924303d1bf73ba283a383e2aadee02f2.zip
Initial commit
Diffstat (limited to '')
-rw-r--r--docs/doxygen/nel/a03441.html760
1 files changed, 760 insertions, 0 deletions
diff --git a/docs/doxygen/nel/a03441.html b/docs/doxygen/nel/a03441.html
new file mode 100644
index 00000000..86ec63bc
--- /dev/null
+++ b/docs/doxygen/nel/a03441.html
@@ -0,0 +1,760 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>NeL: NLMISC::CStaticStringMapper 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::CStaticStringMapper Class Reference</h1><code>#include &lt;<a class="el" href="a06470.html">string_mapper.h</a>&gt;</code>
+<p>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+After endAdd you cannot add strings anymore or it will assert <dl compact><dt><b>Author:</b></dt><dd>Matthieu Besson <p>
+Nevrax France </dd></dl>
+<dl compact><dt><b>Date:</b></dt><dd>November 2003 </dd></dl>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06470.html#l00112">112</a> of file <a class="el" href="a06470.html">string_mapper.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><a class="el" href="a05378.html#a237">TSStringId</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03441.html#NLMISC_1_1CStaticStringMappera0">add</a> (const std::string &amp;str)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Globaly map a string into a unique Id. <a href="#NLMISC_1_1CStaticStringMappera0"></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="a03441.html#NLMISC_1_1CStaticStringMappera1">clear</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03441.html#NLMISC_1_1CStaticStringMappera2">CStaticStringMapper</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a05378.html#a237">TSStringId</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03441.html#NLMISC_1_1CStaticStringMappera3">emptyId</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the global id for the empty string (helper function). <a href="#NLMISC_1_1CStaticStringMappera3"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>const char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03441.html#NLMISC_1_1CStaticStringMappera4">get</a> (<a class="el" href="a05378.html#a237">TSStringId</a> stringId)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Globaly unmap a string. <a href="#NLMISC_1_1CStaticStringMappera4"></a><br><br></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a11">uint32</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03441.html#NLMISC_1_1CStaticStringMappera5">getCount</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03441.html#NLMISC_1_1CStaticStringMappera6">memoryCompress</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03441.html#NLMISC_1_1CStaticStringMappera7">memoryUncompress</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03441.html#NLMISC_1_1CStaticStringMappera8">serial</a> (<a class="el" href="a02270.html">NLMISC::IStream</a> &amp;f, std::vector&lt; <a class="el" href="a05378.html#a237">TSStringId</a> &gt; &amp;strIdVect) throw (EStream)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03441.html#NLMISC_1_1CStaticStringMappera9">serial</a> (<a class="el" href="a02270.html">NLMISC::IStream</a> &amp;f, <a class="el" href="a05378.html#a237">TSStringId</a> &amp;strId) throw (EStream)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03441.html#NLMISC_1_1CStaticStringMappera10">~CStaticStringMapper</a> ()</td></tr>
+
+<tr><td colspan=2><br><h2>Private Attributes</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03441.html#NLMISC_1_1CStaticStringMapperr0">_AllStrings</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a11">uint32</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03441.html#NLMISC_1_1CStaticStringMapperr1">_IdCounter</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; char * &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03441.html#NLMISC_1_1CStaticStringMapperr2">_IdToStr</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03441.html#NLMISC_1_1CStaticStringMapperr3">_MemoryCompressed</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>std::map&lt; <a class="el" href="a05378.html#a237">TSStringId</a>, std::string &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03441.html#NLMISC_1_1CStaticStringMapperr4">_TempIdTable</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>std::map&lt; std::string, <a class="el" href="a05378.html#a237">TSStringId</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03441.html#NLMISC_1_1CStaticStringMapperr5">_TempStringTable</a></td></tr>
+
+</table>
+<hr><h2>Constructor &amp; Destructor Documentation</h2>
+<a class="anchor" name="NLMISC_1_1CStaticStringMappera2" doxytag="NLMISC::CStaticStringMapper::CStaticStringMapper" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> NLMISC::CStaticStringMapper::CStaticStringMapper </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [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="a06470.html#l00125">125</a> of file <a class="el" href="a06470.html">string_mapper.h</a>.
+<p>
+References <a class="el" href="a06470.html#l00118">_IdCounter</a>, and <a class="el" href="a06469.html#l00099">add()</a>.
+<p>
+<div class="fragment"><pre>00126 {
+00127 <a class="code" href="a03441.html#NLMISC_1_1CStaticStringMapperr1">_IdCounter</a> = 0;
+00128 <a class="code" href="a03441.html#NLMISC_1_1CStaticStringMapperr0">_AllStrings</a> = NULL;
+00129 <a class="code" href="a03441.html#NLMISC_1_1CStaticStringMapperr3">_MemoryCompressed</a> = <span class="keyword">false</span>;
+00130 <a class="code" href="a03441.html#NLMISC_1_1CStaticStringMappera0">add</a>(<span class="stringliteral">""</span>);
+00131 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CStaticStringMappera10" doxytag="NLMISC::CStaticStringMapper::~CStaticStringMapper" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> NLMISC::CStaticStringMapper::~<a class="el" href="a03441.html">CStaticStringMapper</a> </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [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="a06470.html#l00133">133</a> of file <a class="el" href="a06470.html">string_mapper.h</a>.
+<p>
+References <a class="el" href="a06469.html#l00185">clear()</a>.
+<p>
+<div class="fragment"><pre>00134 {
+00135 <a class="code" href="a03441.html#NLMISC_1_1CStaticStringMappera1">clear</a>();
+00136 }
+</pre></div> </td>
+ </tr>
+</table>
+<hr><h2>Member Function Documentation</h2>
+<a class="anchor" name="NLMISC_1_1CStaticStringMappera0" doxytag="NLMISC::CStaticStringMapper::add" ></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="a05378.html#a237">TSStringId</a> NLMISC::CStaticStringMapper::add </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></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Globaly map a string into a unique Id.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06469.html#l00099">99</a> of file <a class="el" href="a06469.html">string_mapper.cpp</a>.
+<p>
+References <a class="el" href="a06470.html#l00118">_IdCounter</a>, <a class="el" href="a06470.html#l00116">_TempIdTable</a>, <a class="el" href="a06470.html#l00115">_TempStringTable</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, and <a class="el" href="a06470.html#l00104">NLMISC::TSStringId</a>.
+<p>
+Referenced by <a class="el" href="a06469.html#l00185">clear()</a>, and <a class="el" href="a06470.html#l00125">CStaticStringMapper()</a>.
+<p>
+<div class="fragment"><pre>00100 {
+00101 <a class="code" href="a04199.html#a6">nlassert</a>(!_MemoryCompressed);
+00102 std::map&lt;std::string, TSStringId&gt;::iterator it = <a class="code" href="a03441.html#NLMISC_1_1CStaticStringMapperr5">_TempStringTable</a>.find(str);
+00103 <span class="keywordflow">if</span> (it == <a class="code" href="a03441.html#NLMISC_1_1CStaticStringMapperr5">_TempStringTable</a>.end())
+00104 {
+00105 <a class="code" href="a03441.html#NLMISC_1_1CStaticStringMapperr5">_TempStringTable</a>.insert(pair&lt;string,TSStringId&gt;::pair(str,_IdCounter));
+00106 <a class="code" href="a03441.html#NLMISC_1_1CStaticStringMapperr4">_TempIdTable</a>.insert(pair&lt;TSStringId,string&gt;::pair(_IdCounter,str));
+00107 <a class="code" href="a03441.html#NLMISC_1_1CStaticStringMapperr1">_IdCounter</a>++;
+00108 <span class="keywordflow">return</span> <a class="code" href="a03441.html#NLMISC_1_1CStaticStringMapperr1">_IdCounter</a>-1;
+00109 }
+00110 <span class="keywordflow">else</span>
+00111 {
+00112 <span class="keywordflow">return</span> it-&gt;second;
+00113 }
+00114 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CStaticStringMappera1" doxytag="NLMISC::CStaticStringMapper::clear" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> void NLMISC::CStaticStringMapper::clear </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></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="a06469.html#l00185">185</a> of file <a class="el" href="a06469.html">string_mapper.cpp</a>.
+<p>
+References <a class="el" href="a06470.html#l00118">_IdCounter</a>, <a class="el" href="a06470.html#l00120">_IdToStr</a>, <a class="el" href="a06470.html#l00116">_TempIdTable</a>, <a class="el" href="a06470.html#l00115">_TempStringTable</a>, <a class="el" href="a06469.html#l00099">add()</a>, and <a class="el" href="a05587.html#l00141">NLMISC::contReset()</a>.
+<p>
+Referenced by <a class="el" href="a06470.html#l00133">~CStaticStringMapper()</a>.
+<p>
+<div class="fragment"><pre>00186 {
+00187 <a class="code" href="a05378.html#a381">contReset</a>(_TempStringTable);
+00188 <a class="code" href="a05378.html#a381">contReset</a>(_TempIdTable);
+00189 <span class="keyword">delete</span> [] <a class="code" href="a03441.html#NLMISC_1_1CStaticStringMapperr0">_AllStrings</a>;
+00190 <a class="code" href="a05378.html#a381">contReset</a>(_IdToStr);
+00191
+00192 <a class="code" href="a03441.html#NLMISC_1_1CStaticStringMapperr1">_IdCounter</a> = 0;
+00193 <a class="code" href="a03441.html#NLMISC_1_1CStaticStringMapperr0">_AllStrings</a> = NULL;
+00194 <a class="code" href="a03441.html#NLMISC_1_1CStaticStringMapperr3">_MemoryCompressed</a> = <span class="keyword">false</span>;
+00195 <a class="code" href="a03441.html#NLMISC_1_1CStaticStringMappera0">add</a>(<span class="stringliteral">""</span>);
+00196 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CStaticStringMappera3" doxytag="NLMISC::CStaticStringMapper::emptyId" ></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="a05378.html#a237">TSStringId</a> NLMISC::CStaticStringMapper::emptyId </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Return the global id for the empty string (helper function).
+<p>
+
+<p>
+Definition at line <a class="el" href="a06470.html#l00147">147</a> of file <a class="el" href="a06470.html">string_mapper.h</a>.
+<p>
+References <a class="el" href="a06470.html#l00104">NLMISC::TSStringId</a>.
+<p>
+<div class="fragment"><pre>00147 { <span class="keywordflow">return</span> 0; }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CStaticStringMappera4" doxytag="NLMISC::CStaticStringMapper::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" nowrap valign="top"> const char * NLMISC::CStaticStringMapper::get </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a05378.html#a237">TSStringId</a>&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>stringId</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Globaly unmap a string.
+<p>
+
+<p>
+Definition at line <a class="el" href="a06469.html#l00167">167</a> of file <a class="el" href="a06469.html">string_mapper.cpp</a>.
+<p>
+References <a class="el" href="a06470.html#l00120">_IdToStr</a>, <a class="el" href="a06470.html#l00116">_TempIdTable</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, and <a class="el" href="a06470.html#l00104">NLMISC::TSStringId</a>.
+<p>
+Referenced by <a class="el" href="a06167.html#l00087">NLMISC::CPath::getFileList()</a>, <a class="el" href="a06167.html#l01235">NLMISC::CPath::memoryCompress()</a>, and <a class="el" href="a06167.html#l00190">NLMISC::CPath::remapExtension()</a>.
+<p>
+<div class="fragment"><pre>00168 {
+00169 <span class="keywordflow">if</span> (<a class="code" href="a03441.html#NLMISC_1_1CStaticStringMapperr3">_MemoryCompressed</a>)
+00170 {
+00171 <a class="code" href="a04199.html#a6">nlassert</a>(stringId &lt; <a class="code" href="a03441.html#NLMISC_1_1CStaticStringMapperr2">_IdToStr</a>.size());
+00172 <span class="keywordflow">return</span> <a class="code" href="a03441.html#NLMISC_1_1CStaticStringMapperr2">_IdToStr</a>[stringId];
+00173 }
+00174 <span class="keywordflow">else</span>
+00175 {
+00176 std::map&lt;TSStringId, std::string&gt;::iterator it = <a class="code" href="a03441.html#NLMISC_1_1CStaticStringMapperr4">_TempIdTable</a>.find(stringId);
+00177 <span class="keywordflow">if</span> (it != <a class="code" href="a03441.html#NLMISC_1_1CStaticStringMapperr4">_TempIdTable</a>.end())
+00178 <span class="keywordflow">return</span> it-&gt;second.c_str();
+00179 <span class="keywordflow">else</span>
+00180 <span class="keywordflow">return</span> NULL;
+00181 }
+00182 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CStaticStringMappera5" doxytag="NLMISC::CStaticStringMapper::getCount" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a11">uint32</a> NLMISC::CStaticStringMapper::getCount </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [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="a06470.html#l00151">151</a> of file <a class="el" href="a06470.html">string_mapper.h</a>.
+<p>
+References <a class="el" href="a06470.html#l00118">_IdCounter</a>, and <a class="el" href="a05981.html#l00100">uint32</a>.
+<p>
+<div class="fragment"><pre>00151 { <span class="keywordflow">return</span> <a class="code" href="a03441.html#NLMISC_1_1CStaticStringMapperr1">_IdCounter</a>; }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CStaticStringMappera6" doxytag="NLMISC::CStaticStringMapper::memoryCompress" ></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::CStaticStringMapper::memoryCompress </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></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="a06469.html#l00135">135</a> of file <a class="el" href="a06469.html">string_mapper.cpp</a>.
+<p>
+References <a class="el" href="a06470.html#l00120">_IdToStr</a>, <a class="el" href="a06470.html#l00116">_TempIdTable</a>, <a class="el" href="a06470.html#l00115">_TempStringTable</a>, <a class="el" href="a05587.html#l00141">NLMISC::contReset()</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>00136 {
+00137 <a class="code" href="a03441.html#NLMISC_1_1CStaticStringMapperr3">_MemoryCompressed</a> = <span class="keyword">true</span>;
+00138 std::map&lt;TSStringId, std::string&gt;::iterator it = <a class="code" href="a03441.html#NLMISC_1_1CStaticStringMapperr4">_TempIdTable</a>.begin();
+00139
+00140 <a class="code" href="a04558.html#a15">uint</a> nTotalSize = 0;
+00141 <a class="code" href="a04558.html#a11">uint32</a> nNbStrings = 0;
+00142 <span class="keywordflow">while</span> (it != <a class="code" href="a03441.html#NLMISC_1_1CStaticStringMapperr4">_TempIdTable</a>.end())
+00143 {
+00144 nTotalSize += it-&gt;second.size() + 1;
+00145 nNbStrings++;
+00146 it++;
+00147 }
+00148
+00149 <a class="code" href="a03441.html#NLMISC_1_1CStaticStringMapperr0">_AllStrings</a> = <span class="keyword">new</span> <span class="keywordtype">char</span>[nTotalSize];
+00150 <a class="code" href="a03441.html#NLMISC_1_1CStaticStringMapperr2">_IdToStr</a>.resize(nNbStrings);
+00151 nNbStrings = 0;
+00152 nTotalSize = 0;
+00153 it = <a class="code" href="a03441.html#NLMISC_1_1CStaticStringMapperr4">_TempIdTable</a>.begin();
+00154 <span class="keywordflow">while</span> (it != <a class="code" href="a03441.html#NLMISC_1_1CStaticStringMapperr4">_TempIdTable</a>.end())
+00155 {
+00156 strcpy(_AllStrings + nTotalSize, it-&gt;second.c_str());
+00157 <a class="code" href="a03441.html#NLMISC_1_1CStaticStringMapperr2">_IdToStr</a>[nNbStrings] = <a class="code" href="a03441.html#NLMISC_1_1CStaticStringMapperr0">_AllStrings</a> + nTotalSize;
+00158 nTotalSize += it-&gt;second.size() + 1;
+00159 nNbStrings++;
+00160 it++;
+00161 }
+00162 <a class="code" href="a05378.html#a381">contReset</a>(_TempStringTable);
+00163 <a class="code" href="a05378.html#a381">contReset</a>(_TempIdTable);
+00164 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CStaticStringMappera7" doxytag="NLMISC::CStaticStringMapper::memoryUncompress" ></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::CStaticStringMapper::memoryUncompress </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></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="a06469.html#l00117">117</a> of file <a class="el" href="a06469.html">string_mapper.cpp</a>.
+<p>
+References <a class="el" href="a06470.html#l00120">_IdToStr</a>, <a class="el" href="a06470.html#l00116">_TempIdTable</a>, <a class="el" href="a06470.html#l00115">_TempStringTable</a>, <a class="el" href="a05587.html#l00141">NLMISC::contReset()</a>, <a class="el" href="a06470.html#l00104">NLMISC::TSStringId</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+<div class="fragment"><pre>00118 {
+00119 std::map&lt;std::string, TSStringId&gt; tempStringTable;
+00120 std::map&lt;TSStringId, std::string&gt; tempIdTable;
+00121 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> k = 0; k &lt; <a class="code" href="a03441.html#NLMISC_1_1CStaticStringMapperr2">_IdToStr</a>.size(); ++k)
+00122 {
+00123 tempStringTable[<a class="code" href="a03441.html#NLMISC_1_1CStaticStringMapperr2">_IdToStr</a>[k]] = (<a class="code" href="a05378.html#a237">TSStringId</a>) k;
+00124 tempIdTable[(<a class="code" href="a05378.html#a237">TSStringId</a>) k] = _IdToStr[k];
+00125 }
+00126 <span class="keyword">delete</span> [] <a class="code" href="a03441.html#NLMISC_1_1CStaticStringMapperr0">_AllStrings</a>;
+00127 <a class="code" href="a03441.html#NLMISC_1_1CStaticStringMapperr0">_AllStrings</a> = NULL;
+00128 <a class="code" href="a05378.html#a381">contReset</a>(_IdToStr);
+00129 <a class="code" href="a03441.html#NLMISC_1_1CStaticStringMapperr5">_TempStringTable</a>.swap(tempStringTable);
+00130 <a class="code" href="a03441.html#NLMISC_1_1CStaticStringMapperr4">_TempIdTable</a>.swap(tempIdTable);
+00131 <a class="code" href="a03441.html#NLMISC_1_1CStaticStringMapperr3">_MemoryCompressed</a> = <span class="keyword">false</span>;
+00132 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CStaticStringMappera8" doxytag="NLMISC::CStaticStringMapper::serial" ></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::CStaticStringMapper::serial </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02270.html">NLMISC::IStream</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>f</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>std::vector&lt; <a class="el" href="a05378.html#a237">TSStringId</a> &gt; &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>strIdVect</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"> throw (<a class="el" href="a03781.html">EStream</a>)</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="a06469.html#l00215">215</a> of file <a class="el" href="a06469.html">string_mapper.cpp</a>.
+<p>
+References <a class="el" href="a05981.html#l00105">uint</a>.
+<p>
+<div class="fragment"><pre>00216 {
+00217 std::vector&lt;std::string&gt; vsTmp;
+00218 std::string sTmp;
+00219 <span class="comment">// Serialize class components.</span>
+00220 <span class="keywordflow">if</span> (f.<a class="code" href="a02270.html#NLMISC_1_1IStreama0">isReading</a>())
+00221 {
+00222 f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2033_9">serialCont</a>(vsTmp); <span class="comment">// FXs played only when attacking and according to the power.</span>
+00223 strIdVect.resize(vsTmp.size());
+00224 <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i = 0; i &lt; vsTmp.size(); ++i)
+00225 strIdVect[i] = <a class="code" href="a03441.html#NLMISC_1_1CStaticStringMappera0">add</a>(vsTmp[i]);
+00226 }
+00227 <span class="keywordflow">else</span>
+00228 {
+00229 vsTmp.resize(strIdVect.size());
+00230 <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> i = 0; i &lt; vsTmp.size(); ++i)
+00231 vsTmp[i] = <a class="code" href="a03441.html#NLMISC_1_1CStaticStringMappera4">get</a>(strIdVect[i]);
+00232 f.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2033_9">serialCont</a>(vsTmp); <span class="comment">// FXs played only when attacking and according to the power.</span>
+00233
+00234 }
+00235 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CStaticStringMappera9" doxytag="NLMISC::CStaticStringMapper::serial" ></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::CStaticStringMapper::serial </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02270.html">NLMISC::IStream</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>f</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a05378.html#a237">TSStringId</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>strId</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"> throw (<a class="el" href="a03781.html">EStream</a>)</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="a06469.html#l00199">199</a> of file <a class="el" href="a06469.html">string_mapper.cpp</a>.
+<p>
+References <a class="el" href="a06470.html#l00104">NLMISC::TSStringId</a>.
+<p>
+<div class="fragment"><pre>00200 {
+00201 std::string tmp;
+00202 <span class="keywordflow">if</span> (f.<a class="code" href="a02270.html#NLMISC_1_1IStreama0">isReading</a>())
+00203 {
+00204 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>(tmp);
+00205 strId = <a class="code" href="a03441.html#NLMISC_1_1CStaticStringMappera0">add</a>(tmp);
+00206 }
+00207 <span class="keywordflow">else</span>
+00208 {
+00209 tmp = <a class="code" href="a03441.html#NLMISC_1_1CStaticStringMappera4">get</a>(strId);
+00210 f.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>(tmp);
+00211 }
+00212 }
+</pre></div> </td>
+ </tr>
+</table>
+<hr><h2>Field Documentation</h2>
+<a class="anchor" name="NLMISC_1_1CStaticStringMapperr0" doxytag="NLMISC::CStaticStringMapper::_AllStrings" ></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"> char* <a class="el" href="a03441.html#NLMISC_1_1CStaticStringMapperr0">NLMISC::CStaticStringMapper::_AllStrings</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="a06470.html#l00119">119</a> of file <a class="el" href="a06470.html">string_mapper.h</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CStaticStringMapperr1" doxytag="NLMISC::CStaticStringMapper::_IdCounter" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a11">uint32</a> <a class="el" href="a03441.html#NLMISC_1_1CStaticStringMapperr1">NLMISC::CStaticStringMapper::_IdCounter</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="a06470.html#l00118">118</a> of file <a class="el" href="a06470.html">string_mapper.h</a>.
+<p>
+Referenced by <a class="el" href="a06469.html#l00099">add()</a>, <a class="el" href="a06469.html#l00185">clear()</a>, <a class="el" href="a06470.html#l00125">CStaticStringMapper()</a>, and <a class="el" href="a06470.html#l00151">getCount()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CStaticStringMapperr2" doxytag="NLMISC::CStaticStringMapper::_IdToStr" ></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::vector&lt;char*&gt; <a class="el" href="a03441.html#NLMISC_1_1CStaticStringMapperr2">NLMISC::CStaticStringMapper::_IdToStr</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="a06470.html#l00120">120</a> of file <a class="el" href="a06470.html">string_mapper.h</a>.
+<p>
+Referenced by <a class="el" href="a06469.html#l00185">clear()</a>, <a class="el" href="a06469.html#l00167">get()</a>, <a class="el" href="a06469.html#l00135">memoryCompress()</a>, and <a class="el" href="a06469.html#l00117">memoryUncompress()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CStaticStringMapperr3" doxytag="NLMISC::CStaticStringMapper::_MemoryCompressed" ></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="a03441.html#NLMISC_1_1CStaticStringMapperr3">NLMISC::CStaticStringMapper::_MemoryCompressed</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="a06470.html#l00121">121</a> of file <a class="el" href="a06470.html">string_mapper.h</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CStaticStringMapperr4" doxytag="NLMISC::CStaticStringMapper::_TempIdTable" ></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::map&lt;<a class="el" href="a05378.html#a237">TSStringId</a>, std::string&gt; <a class="el" href="a03441.html#NLMISC_1_1CStaticStringMapperr4">NLMISC::CStaticStringMapper::_TempIdTable</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="a06470.html#l00116">116</a> of file <a class="el" href="a06470.html">string_mapper.h</a>.
+<p>
+Referenced by <a class="el" href="a06469.html#l00099">add()</a>, <a class="el" href="a06469.html#l00185">clear()</a>, <a class="el" href="a06469.html#l00167">get()</a>, <a class="el" href="a06469.html#l00135">memoryCompress()</a>, and <a class="el" href="a06469.html#l00117">memoryUncompress()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CStaticStringMapperr5" doxytag="NLMISC::CStaticStringMapper::_TempStringTable" ></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::map&lt;std::string, <a class="el" href="a05378.html#a237">TSStringId</a>&gt; <a class="el" href="a03441.html#NLMISC_1_1CStaticStringMapperr5">NLMISC::CStaticStringMapper::_TempStringTable</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="a06470.html#l00115">115</a> of file <a class="el" href="a06470.html">string_mapper.h</a>.
+<p>
+Referenced by <a class="el" href="a06469.html#l00099">add()</a>, <a class="el" href="a06469.html#l00185">clear()</a>, <a class="el" href="a06469.html#l00135">memoryCompress()</a>, and <a class="el" href="a06469.html#l00117">memoryUncompress()</a>. </td>
+ </tr>
+</table>
+<hr>The documentation for this class was generated from the following files:<ul>
+<li><a class="el" href="a06470.html">string_mapper.h</a><li><a class="el" href="a06469.html">string_mapper.cpp</a></ul>
+<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 13:34:43 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>