Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > bad97183153701b09df5fae1052b1c30 > files > 3818

crystalspace-doc-1.2.1-5mdv2010.0.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Crystal Space 1.2.1: iStringSet Struct Reference (Crystal Space 1.2.1 Public API Reference)</title>
<link href="tabs.css" rel="stylesheet" type="text/css">
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<table border="0" cellpadding="0" cellspacing="0" width="100%" class="head">
 <tr height="59">
  <td class="head" width="202" valign="bottom" style="padding-left:0;"><a href="http://www.crystalspace3d.org/"><img src="csblur.png" width="236" height="59" alt="CrystalSpace" border="0"></a></td>
  <td class="head"><h2>Public API Reference</h2></td>
 </tr>
 <tr height="11">
  <td colspan="2" class="headshadow" valign="top" style="padding-left:0;"><img src="csblurb.png" width="236" height="11" alt="" border="0"></td>
 </tr>
</table>
<div class="content">
<!-- Generated by Doxygen 1.5.3 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="modules.html"><span>Modules</span></a></li>
    <li><a href="namespaces.html"><span>Namespaces</span></a></li>
    <li class="current"><a href="classes.html"><span>Classes</span></a></li>
    <li><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
  </ul>
</div>
<div class="tabs">
  <ul>
    <li><a href="classes.html"><span>Alphabetical&nbsp;List</span></a></li>
    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
  </ul>
</div>
<h1>iStringSet Struct Reference<br>
<small>
[<a class="el" href="group__util.html">Utilities</a>]</small>
</h1><!-- doxytag: class="iStringSet" --><!-- doxytag: inherits="iBase" -->The string set is a collection of unique strings.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="iutil_2strset_8h-source.html">iutil/strset.h</a>&gt;</code>
<p>
<div class="dynheader">
Inheritance diagram for iStringSet:</div>
<div class="dynsection">
<p><center><img src="structiStringSet__inherit__graph.png" border="0" usemap="#iStringSet__inherit__map" alt="Inheritance graph"></center>
<map name="iStringSet__inherit__map">
<area shape="rect" href="classscfImplementation1.html" title="scfImplementation1\&lt; csScfStringSet, iStringSet \&gt;" alt="" coords="5,161,352,188"><area shape="rect" href="structiBase.html" title="This is the basic interface: all other interfaces should be derived from this one..." alt="" coords="151,7,207,33"><area shape="rect" href="classcsScfStringSet.html" title="The string set is a collection of unique strings." alt="" coords="120,239,237,265"></map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>

<p>
<a href="structiStringSet-members.html">List of all members.</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">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structiStringSet.html#b90a738afe4c5bbfb280c22e20ed7ca2">Clear</a> ()=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Remove all stored strings.  <a href="#b90a738afe4c5bbfb280c22e20ed7ca2"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structiStringSet.html#513b3c0d990d394f248a77719bbb6fc7">Contains</a> (<a class="el" href="group__util.html#gbe4f44c93bfeee85c507a999dccf21dd">csStringID</a>) const =0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Check if the set contains a string with a particular ID.  <a href="#513b3c0d990d394f248a77719bbb6fc7"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structiStringSet.html#19b0071e7b53a8027c43be59cdf48b2e">Contains</a> (char const *) const =0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Check if the set contains a particular string.  <a href="#19b0071e7b53a8027c43be59cdf48b2e"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structiStringSet.html#52e7a49fd14d75dfeed46c3a7ee5ea5d">Delete</a> (<a class="el" href="group__util.html#gbe4f44c93bfeee85c507a999dccf21dd">csStringID</a>)=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Remove a string with the specified ID.  <a href="#52e7a49fd14d75dfeed46c3a7ee5ea5d"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structiStringSet.html#db90162a2e4cae9ede542ddc2894ec64">Delete</a> (char const *)=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Remove specified string.  <a href="#db90162a2e4cae9ede542ddc2894ec64"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structiStringSet.html#1f9880315761dce30f8ef89d674a4a7e">Empty</a> ()=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Remove all stored strings.  <a href="#1f9880315761dce30f8ef89d674a4a7e"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structiStringSet.html#b8fdaa470a66e00516565aa44d9ba355">GetSize</a> () const =0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the number of elements in the hash.  <a href="#b8fdaa470a66e00516565aa44d9ba355"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structiStringSet.html#581f182dff1d5341c1425e777ee28edf">IsEmpty</a> () const =0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return true if the hash is empty.  <a href="#581f182dff1d5341c1425e777ee28edf"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual const char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structiStringSet.html#49cbbab4a65ec9c3b36dca6a17531abd">Request</a> (<a class="el" href="group__util.html#gbe4f44c93bfeee85c507a999dccf21dd">csStringID</a>) const =0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Request the string corresponding to the given ID.  <a href="#49cbbab4a65ec9c3b36dca6a17531abd"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="group__util.html#gbe4f44c93bfeee85c507a999dccf21dd">csStringID</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structiStringSet.html#d899101bd07fd4d4c018edc61794a85a">Request</a> (const char *)=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Request the numeric ID for the given string.  <a href="#d899101bd07fd4d4c018edc61794a85a"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
The string set is a collection of unique strings. 
<p>
Each string has an ID number. The most important operation is to request a string, which means to return the ID for the string, adding it to the collection if not already present. This is useful when you need to work with strings but want the performance characteristics of simple numeric comparisons. Rather than performing string comparisons, you instead compare the numeric string ID's.<p>
As a convenience, the <a class="el" href="classcsInitializer.html" title="This class contains several static member functions that can help setup an application...">csInitializer</a> class creates a string set at application initialization time and inserts it into the global object registry (<a class="el" href="structiObjectRegistry.html" title="This interface serves as a registry of other objects.">iObjectRegistry</a>). To obtain a reference this shared string set (which may be desirable when modules need to share string ID's), use a code snippet similar to the following:<p>
<div class="fragment"><pre class="fragment"> <a class="code" href="structiObjectRegistry.html" title="This interface serves as a registry of other objects.">iObjectRegistry</a>* object_reg = ...;
 <a class="code" href="classcsRef.html" title="A smart pointer.">csRef&lt;iStringSet&gt;</a> strings = csQueryRegistryTagInterface&lt;iStringSet&gt; (
   object_reg, <span class="stringliteral">"crystalspace.shared.stringset"</span>);
 <a class="code" href="group__util.html#gbe4f44c93bfeee85c507a999dccf21dd" title="An identifier for a string.">csStringID</a> myid = strings-&gt;Request (<span class="stringliteral">"crystalspace.mygame.mystring"</span>);
</pre></div><p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classcsStringHash.html" title="A string-to-ID hash table.">csStringHash</a> <p>
<a class="el" href="classcsStringSet.html" title="The string set is a collection of unique strings.">csStringSet</a> </dd></dl>

<p>Definition at line <a class="el" href="iutil_2strset_8h-source.html#l00063">63</a> of file <a class="el" href="iutil_2strset_8h-source.html">strset.h</a>.</p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="b90a738afe4c5bbfb280c22e20ed7ca2"></a><!-- doxytag: member="iStringSet::Clear" ref="b90a738afe4c5bbfb280c22e20ed7ca2" args="()=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void iStringSet::Clear           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Remove all stored strings. 
<p>
<dl compact><dt><b><a class="el" href="deprecated.html#_deprecated000116">Deprecated:</a></b></dt><dd>Use <a class="el" href="structiStringSet.html#1f9880315761dce30f8ef89d674a4a7e" title="Remove all stored strings.">Empty()</a> instead. </dd></dl>

<p>Implemented in <a class="el" href="classcsScfStringSet.html#e21e447dbeba3dbded1f73adc308ff35">csScfStringSet</a>.</p>

</div>
</div><p>
<a class="anchor" name="513b3c0d990d394f248a77719bbb6fc7"></a><!-- doxytag: member="iStringSet::Contains" ref="513b3c0d990d394f248a77719bbb6fc7" args="(csStringID) const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool iStringSet::Contains           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__util.html#gbe4f44c93bfeee85c507a999dccf21dd">csStringID</a>&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Check if the set contains a string with a particular ID. 
<p>
<dl class="remark" compact><dt><b>Remarks:</b></dt><dd>This is rigidly equivalent to <code>return Request(id) != NULL</code>, but more idomatic. </dd></dl>

<p>Implemented in <a class="el" href="classcsScfStringSet.html#2cda663b7aaaafb6fa736b2410a79425">csScfStringSet</a>.</p>

</div>
</div><p>
<a class="anchor" name="19b0071e7b53a8027c43be59cdf48b2e"></a><!-- doxytag: member="iStringSet::Contains" ref="19b0071e7b53a8027c43be59cdf48b2e" args="(char const *) const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool iStringSet::Contains           </td>
          <td>(</td>
          <td class="paramtype">char const *&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Check if the set contains a particular string. 
<p>

<p>Implemented in <a class="el" href="classcsScfStringSet.html#126dd6fcb08228d8f67ce3e254cf268b">csScfStringSet</a>.</p>

</div>
</div><p>
<a class="anchor" name="52e7a49fd14d75dfeed46c3a7ee5ea5d"></a><!-- doxytag: member="iStringSet::Delete" ref="52e7a49fd14d75dfeed46c3a7ee5ea5d" args="(csStringID)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool iStringSet::Delete           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__util.html#gbe4f44c93bfeee85c507a999dccf21dd">csStringID</a>&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Remove a string with the specified ID. 
<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>True if a matching string was in the set; else false. </dd></dl>

<p>Implemented in <a class="el" href="classcsScfStringSet.html#63c470f7134257e7be13a5f9a1d614d2">csScfStringSet</a>.</p>

</div>
</div><p>
<a class="anchor" name="db90162a2e4cae9ede542ddc2894ec64"></a><!-- doxytag: member="iStringSet::Delete" ref="db90162a2e4cae9ede542ddc2894ec64" args="(char const *)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool iStringSet::Delete           </td>
          <td>(</td>
          <td class="paramtype">char const *&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Remove specified string. 
<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>True if a matching string was in thet set; else false. </dd></dl>

<p>Implemented in <a class="el" href="classcsScfStringSet.html#5b8703f701de41a0f61899309366e1cb">csScfStringSet</a>.</p>

</div>
</div><p>
<a class="anchor" name="1f9880315761dce30f8ef89d674a4a7e"></a><!-- doxytag: member="iStringSet::Empty" ref="1f9880315761dce30f8ef89d674a4a7e" args="()=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void iStringSet::Empty           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Remove all stored strings. 
<p>
When new strings are registered again, new ID values will be used; the old ID's will not be re-used. 
<p>Implemented in <a class="el" href="classcsScfStringSet.html#de51ed50f2da5121e0ac93e1cce7ff59">csScfStringSet</a>.</p>

</div>
</div><p>
<a class="anchor" name="b8fdaa470a66e00516565aa44d9ba355"></a><!-- doxytag: member="iStringSet::GetSize" ref="b8fdaa470a66e00516565aa44d9ba355" args="() const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual size_t iStringSet::GetSize           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get the number of elements in the hash. 
<p>

<p>Implemented in <a class="el" href="classcsScfStringSet.html#2a0666a1bc8b357642abf15d98f8948f">csScfStringSet</a>.</p>

</div>
</div><p>
<a class="anchor" name="581f182dff1d5341c1425e777ee28edf"></a><!-- doxytag: member="iStringSet::IsEmpty" ref="581f182dff1d5341c1425e777ee28edf" args="() const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool iStringSet::IsEmpty           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Return true if the hash is empty. 
<p>
<dl class="remark" compact><dt><b>Remarks:</b></dt><dd>Rigidly equivalent to <code>return <a class="el" href="structiStringSet.html#b8fdaa470a66e00516565aa44d9ba355" title="Get the number of elements in the hash.">GetSize()</a> == 0</code>, but more idiomatic. </dd></dl>

<p>Implemented in <a class="el" href="classcsScfStringSet.html#56e0dded10bcd41268da539c2bf70170">csScfStringSet</a>.</p>

</div>
</div><p>
<a class="anchor" name="49cbbab4a65ec9c3b36dca6a17531abd"></a><!-- doxytag: member="iStringSet::Request" ref="49cbbab4a65ec9c3b36dca6a17531abd" args="(csStringID) const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual const char* iStringSet::Request           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__util.html#gbe4f44c93bfeee85c507a999dccf21dd">csStringID</a>&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Request the string corresponding to the given ID. 
<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Null if the string * has not been requested (yet), else the string corresponding to the ID. </dd></dl>

<p>Implemented in <a class="el" href="classcsScfStringSet.html#4b575b1667cd1375f7e696613edc6011">csScfStringSet</a>.</p>

</div>
</div><p>
<a class="anchor" name="d899101bd07fd4d4c018edc61794a85a"></a><!-- doxytag: member="iStringSet::Request" ref="d899101bd07fd4d4c018edc61794a85a" args="(const char *)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="group__util.html#gbe4f44c93bfeee85c507a999dccf21dd">csStringID</a> iStringSet::Request           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Request the numeric ID for the given string. 
<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>The ID of the string. </dd></dl>
<dl class="remark" compact><dt><b>Remarks:</b></dt><dd>Creates a new ID if the string is not yet present in the set, else returns the previously assigned ID. </dd></dl>

<p>Implemented in <a class="el" href="classcsScfStringSet.html#8bc6c282201aa1cfb9f542f961423f08">csScfStringSet</a>.</p>

<p>Referenced by <a class="el" href="shadervar_8h-source.html#l00493">CS::ShaderVarName::ShaderVarName()</a>.</p>

</div>
</div><p>
<hr>The documentation for this struct was generated from the following file:<ul>
<li>iutil/<a class="el" href="iutil_2strset_8h-source.html">strset.h</a></ul>
<hr size="1"><address><small>Generated for Crystal Space 1.2.1 by 
<a href="http://www.doxygen.org/index.html">doxygen</a> 1.5.3 
</small></address> </div></body> </html>