<!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: csKeyValuePair Class 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 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 Pages</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="classes.html"><span>Alphabetical List</span></a></li> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> <h1>csKeyValuePair Class Reference</h1><!-- doxytag: class="csKeyValuePair" --><!-- doxytag: inherits="scfImplementationExt1< csKeyValuePair, csObject, iKeyValuePair >" -->A Key Value pair. <a href="#_details">More...</a> <p> <code>#include <<a class="el" href="cstool_2keyval_8h-source.html">cstool/keyval.h</a>></code> <p> <div class="dynheader"> Inheritance diagram for csKeyValuePair:</div> <div class="dynsection"> <p><center><img src="classcsKeyValuePair__inherit__graph.png" border="0" usemap="#csKeyValuePair__inherit__map" alt="Inheritance graph"></center> <map name="csKeyValuePair__inherit__map"> <area shape="rect" href="classscfImplementationExt1.html" title="scfImplementationExt1\< csKeyValuePair, csObject, iKeyValuePair \>" alt="" coords="37,316,496,343"><area shape="rect" href="classcsObject.html" title="A generic csObject class." alt="" coords="172,239,247,265"><area shape="rect" href="classscfImplementation1.html" title="scfImplementation1\< csObject, iObject \>" alt="" coords="35,161,320,188"><area shape="rect" href="classscfImplementation.html" title="scfImplementation\< csObject \>" alt="" coords="5,84,232,111"><area shape="rect" href="structiBase.html" title="This is the basic interface: all other interfaces should be derived from this one..." alt="" coords="260,7,316,33"><area shape="rect" href="structiObject.html" title="This interface is an SCF interface for encapsulating csObject." alt="" coords="256,84,320,111"><area shape="rect" href="structiKeyValuePair.html" title="A Key Value pair." alt="" coords="271,239,380,265"><area shape="rect" href="classCS_1_1Memory_1_1CustomAllocated.html" title="Class that overrides operator new/operator delete/etc." alt="" coords="8,7,229,33"></map> <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div> <p> <a href="classcsKeyValuePair-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"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsKeyValuePair.html#7145cfb4f6385a2ea0eca13a76dd7f9c">csKeyValuePair</a> (const char *Key)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">The constructor. Requires only key. <a href="#7145cfb4f6385a2ea0eca13a76dd7f9c"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsKeyValuePair.html#000a714c29a19980f23092090ee6632c">csKeyValuePair</a> (const char *Key, const char *Value)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">The constructor. Requires both key and value. Data is being copied! <a href="#000a714c29a19980f23092090ee6632c"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsKeyValuePair.html#6c86c42d15a29c606c376cd8091b926d">SetEditorOnly</a> (bool flag)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Set the "editor only" flag of this key value pair. <a href="#6c86c42d15a29c606c376cd8091b926d"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsKeyValuePair.html#90538c07d6ed5eb2be2f1bf7b0f4189d">~csKeyValuePair</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">The destructor as usual. <a href="#90538c07d6ed5eb2be2f1bf7b0f4189d"></a><br></td></tr> <tr><td colspan="2"><div class="groupHeader">iKeyValuePair implementation</div></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsKeyValuePair.html#0f893731a8f259cf0c06140572cea217">GetEditorOnly</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Query whether this pair is an "editor-only" pair. <a href="#0f893731a8f259cf0c06140572cea217"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsKeyValuePair.html#5a1760a1270ab9e1ff707bb99992ff77">GetKey</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Get the key string of the pair. <a href="#5a1760a1270ab9e1ff707bb99992ff77"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsKeyValuePair.html#68ac06903648da1ed00fa55c3f5015c0">GetValue</a> (const char *vname) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Get a value string from the pair. <a href="#68ac06903648da1ed00fa55c3f5015c0"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsKeyValuePair.html#e0f1fa49c25ce848aa8555816fabdc8f">GetValue</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Get the 'value' string of the pair. <a href="#e0f1fa49c25ce848aa8555816fabdc8f"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classcsRef.html">csRef</a><br> < <a class="el" href="structiStringArray.html">iStringArray</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsKeyValuePair.html#f5e8a2525b975f2902b9b645f0c87c65">GetValueNames</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Get a list of the names of values in the pair. <a href="#f5e8a2525b975f2902b9b645f0c87c65"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="structiObject.html">iObject</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsKeyValuePair.html#8e41bf67cba182fcf1137fcb6a4f7b3d">QueryObject</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Get the <a class="el" href="structiObject.html" title="This interface is an SCF interface for encapsulating csObject.">iObject</a>. <a href="#8e41bf67cba182fcf1137fcb6a4f7b3d"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsKeyValuePair.html#b3c00f5a5f3edb953570b6d98831a465">SetKey</a> (const char *s)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Set the key string of the pair. <a href="#b3c00f5a5f3edb953570b6d98831a465"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsKeyValuePair.html#fd5ac1e989f58a25a63b55e55b1667eb">SetValue</a> (const char *vname, const char *value)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Set a value string of the pair. <a href="#fd5ac1e989f58a25a63b55e55b1667eb"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsKeyValuePair.html#aafac3ed0e4155e4b59719fa44aa5fec">SetValue</a> (const char *value)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Set the value string of the pair. <a href="#aafac3ed0e4155e4b59719fa44aa5fec"></a><br></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> A Key Value pair. <p> This object contains a 'key' string and a 'value' string. The 'key' string is the same as the name of the object as returned from the <a class="el" href="structiObject.html" title="This interface is an SCF interface for encapsulating csObject.">iObject</a>. <p> One way to attach key value pairs to <a class="el" href="namespaceCS.html" title="Main namespace for CrystalSpace.">CS</a> objects is to add the following xml to your object: <key name="somename" value="somevalue" /> <p>Definition at line <a class="el" href="cstool_2keyval_8h-source.html#l00043">43</a> of file <a class="el" href="cstool_2keyval_8h-source.html">keyval.h</a>.</p> <hr><h2>Constructor & Destructor Documentation</h2> <a class="anchor" name="000a714c29a19980f23092090ee6632c"></a><!-- doxytag: member="csKeyValuePair::csKeyValuePair" ref="000a714c29a19980f23092090ee6632c" args="(const char *Key, const char *Value)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">csKeyValuePair::csKeyValuePair </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"> <em>Key</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"> <em>Value</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> The constructor. Requires both key and value. Data is being copied! <p> </div> </div><p> <a class="anchor" name="7145cfb4f6385a2ea0eca13a76dd7f9c"></a><!-- doxytag: member="csKeyValuePair::csKeyValuePair" ref="7145cfb4f6385a2ea0eca13a76dd7f9c" args="(const char *Key)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">csKeyValuePair::csKeyValuePair </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"> <em>Key</em> </td> <td> ) </td> <td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> The constructor. Requires only key. <p> </div> </div><p> <a class="anchor" name="90538c07d6ed5eb2be2f1bf7b0f4189d"></a><!-- doxytag: member="csKeyValuePair::~csKeyValuePair" ref="90538c07d6ed5eb2be2f1bf7b0f4189d" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual csKeyValuePair::~csKeyValuePair </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> The destructor as usual. <p> </div> </div><p> <hr><h2>Member Function Documentation</h2> <a class="anchor" name="0f893731a8f259cf0c06140572cea217"></a><!-- doxytag: member="csKeyValuePair::GetEditorOnly" ref="0f893731a8f259cf0c06140572cea217" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual bool csKeyValuePair::GetEditorOnly </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"> const<code> [inline, virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Query whether this pair is an "editor-only" pair. <p> They're marked as such in world files and are normally not kept in memory. <p>Implements <a class="el" href="structiKeyValuePair.html#3efad4849a1f349d3a6995bd45e7e270">iKeyValuePair</a>.</p> <p>Definition at line <a class="el" href="cstool_2keyval_8h-source.html#l00075">75</a> of file <a class="el" href="cstool_2keyval_8h-source.html">keyval.h</a>.</p> </div> </div><p> <a class="anchor" name="5a1760a1270ab9e1ff707bb99992ff77"></a><!-- doxytag: member="csKeyValuePair::GetKey" ref="5a1760a1270ab9e1ff707bb99992ff77" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual const char* csKeyValuePair::GetKey </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"> const<code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Get the key string of the pair. <p> <p>Implements <a class="el" href="structiKeyValuePair.html#aa6d2a0564f5d6b3802f75c43e6b662b">iKeyValuePair</a>.</p> </div> </div><p> <a class="anchor" name="68ac06903648da1ed00fa55c3f5015c0"></a><!-- doxytag: member="csKeyValuePair::GetValue" ref="68ac06903648da1ed00fa55c3f5015c0" args="(const char *vname) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual const char* csKeyValuePair::GetValue </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"> <em>vname</em> </td> <td> ) </td> <td width="100%"> const<code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Get a value string from the pair. <p> <p>Implements <a class="el" href="structiKeyValuePair.html#0f843e6301c2e80abed3fe791c940c39">iKeyValuePair</a>.</p> </div> </div><p> <a class="anchor" name="e0f1fa49c25ce848aa8555816fabdc8f"></a><!-- doxytag: member="csKeyValuePair::GetValue" ref="e0f1fa49c25ce848aa8555816fabdc8f" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual const char* csKeyValuePair::GetValue </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"> const<code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Get the 'value' string of the pair. <p> This is the same as calling 'GetValue ("value")'. <p>Implements <a class="el" href="structiKeyValuePair.html#cb5f4f3cc84bb54129e72d9d1743eb6c">iKeyValuePair</a>.</p> </div> </div><p> <a class="anchor" name="f5e8a2525b975f2902b9b645f0c87c65"></a><!-- doxytag: member="csKeyValuePair::GetValueNames" ref="f5e8a2525b975f2902b9b645f0c87c65" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual <a class="el" href="classcsRef.html">csRef</a><<a class="el" href="structiStringArray.html">iStringArray</a>> csKeyValuePair::GetValueNames </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"> const<code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Get a list of the names of values in the pair. <p> <p>Implements <a class="el" href="structiKeyValuePair.html#d2e39e32d30965df98c56ed78a3146d1">iKeyValuePair</a>.</p> </div> </div><p> <a class="anchor" name="8e41bf67cba182fcf1137fcb6a4f7b3d"></a><!-- doxytag: member="csKeyValuePair::QueryObject" ref="8e41bf67cba182fcf1137fcb6a4f7b3d" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual <a class="el" href="structiObject.html">iObject</a>* csKeyValuePair::QueryObject </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"><code> [inline, virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Get the <a class="el" href="structiObject.html" title="This interface is an SCF interface for encapsulating csObject.">iObject</a>. <p> <p>Implements <a class="el" href="structiKeyValuePair.html#fff0d7e2853c2eb3bcbee6363aa2827a">iKeyValuePair</a>.</p> <p>Definition at line <a class="el" href="cstool_2keyval_8h-source.html#l00065">65</a> of file <a class="el" href="cstool_2keyval_8h-source.html">keyval.h</a>.</p> </div> </div><p> <a class="anchor" name="6c86c42d15a29c606c376cd8091b926d"></a><!-- doxytag: member="csKeyValuePair::SetEditorOnly" ref="6c86c42d15a29c606c376cd8091b926d" args="(bool flag)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void csKeyValuePair::SetEditorOnly </td> <td>(</td> <td class="paramtype">bool </td> <td class="paramname"> <em>flag</em> </td> <td> ) </td> <td width="100%"><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Set the "editor only" flag of this key value pair. <p> <p>Definition at line <a class="el" href="cstool_2keyval_8h-source.html#l00060">60</a> of file <a class="el" href="cstool_2keyval_8h-source.html">keyval.h</a>.</p> </div> </div><p> <a class="anchor" name="b3c00f5a5f3edb953570b6d98831a465"></a><!-- doxytag: member="csKeyValuePair::SetKey" ref="b3c00f5a5f3edb953570b6d98831a465" args="(const char *s)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual void csKeyValuePair::SetKey </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"> <em>key</em> </td> <td> ) </td> <td width="100%"><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Set the key string of the pair. <p> <p>Implements <a class="el" href="structiKeyValuePair.html#7cf660ac5a94d7f50789a26871721cc3">iKeyValuePair</a>.</p> </div> </div><p> <a class="anchor" name="fd5ac1e989f58a25a63b55e55b1667eb"></a><!-- doxytag: member="csKeyValuePair::SetValue" ref="fd5ac1e989f58a25a63b55e55b1667eb" args="(const char *vname, const char *value)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual void csKeyValuePair::SetValue </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"> <em>vname</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"> <em>value</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Set a value string of the pair. <p> <p>Implements <a class="el" href="structiKeyValuePair.html#3da81793a1dc3a2b5ff79a6ec6966045">iKeyValuePair</a>.</p> </div> </div><p> <a class="anchor" name="aafac3ed0e4155e4b59719fa44aa5fec"></a><!-- doxytag: member="csKeyValuePair::SetValue" ref="aafac3ed0e4155e4b59719fa44aa5fec" args="(const char *value)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual void csKeyValuePair::SetValue </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"> <em>value</em> </td> <td> ) </td> <td width="100%"><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Set the value string of the pair. <p> This is the same as calling 'SetValue ("value", value)'. <p>Implements <a class="el" href="structiKeyValuePair.html#2130cf1099c1a29bb74962efde34e5d7">iKeyValuePair</a>.</p> </div> </div><p> <hr>The documentation for this class was generated from the following file:<ul> <li>cstool/<a class="el" href="cstool_2keyval_8h-source.html">keyval.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>