Sophie

Sophie

distrib > Mandriva > 9.1 > ppc > by-pkgid > a74ec78bdb789d910d054e3918f3f007 > files > 270

libsword1-devel-1.5.5-2mdk.ppc.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>TreeKey class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.2.15 -->
<center>
<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="namespaces.html">Namespace List</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="classes.html">Alphabetical List</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; </center>
<hr><h1>TreeKey  Class Reference</h1>Class <a class="el" href="class_verse_key.html">VerseKey</a> The <a class="el" href="class_s_w_key.html">SWKey</a> implementation used for verse based modules like Bibles or commentaries. 
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="treekey_8h-source.html">treekey.h</a>&gt;</code>
<p>
Inheritance diagram for TreeKey:<p><center><img src="class_tree_key__inherit__graph.png" border="0" usemap="#_tree_key__inherit__map" alt="Inheritance graph"></center>
<map name="_tree_key__inherit__map">
<area href="class_tree_key_idx.html" shape="rect" coords="14,223,91,242" alt="">
<area href="class_s_w_key.html" shape="rect" coords="25,85,81,103" alt="">
<area href="class_s_w_object.html" shape="rect" coords="17,15,89,34" alt="">
</map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center>Collaboration diagram for TreeKey:<p><center><img src="class_tree_key__coll__graph.png" border="0" usemap="#_tree_key__coll__map" alt="Collaboration graph"></center>
<map name="_tree_key__coll__map">
<area href="class_s_w_key.html" shape="rect" coords="107,196,163,215" alt="">
<area href="class_s_w_object.html" shape="rect" coords="219,106,291,124" alt="">
<area href="class_s_w_class.html" shape="rect" coords="103,15,167,34" alt="">
</map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="class_tree_key-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>
<tr><td colspan=2><br><h2>Public Methods</h2></td></tr>
<tr><td nowrap align=right valign=top><a name="a0" doxytag="TreeKey::TreeKey"></a>
&nbsp;</td><td valign=bottom><b>TreeKey</b> ()</td></tr>
<tr><td nowrap align=right valign=top><a name="a1" doxytag="TreeKey::~TreeKey"></a>
&nbsp;</td><td valign=bottom><b>~TreeKey</b> ()</td></tr>
<tr><td nowrap align=right valign=top><a name="a2" doxytag="TreeKey::getLocalName"></a>
virtual const char *&nbsp;</td><td valign=bottom><b>getLocalName</b> ()=0</td></tr>
<tr><td nowrap align=right valign=top><a name="a3" doxytag="TreeKey::setLocalName"></a>
virtual const char *&nbsp;</td><td valign=bottom><b>setLocalName</b> (const char *)=0</td></tr>
<tr><td nowrap align=right valign=top><a name="a4" doxytag="TreeKey::getUserData"></a>
virtual const char *&nbsp;</td><td valign=bottom><b>getUserData</b> (int *size=0)=0</td></tr>
<tr><td nowrap align=right valign=top><a name="a5" doxytag="TreeKey::setUserData"></a>
virtual void&nbsp;</td><td valign=bottom><b>setUserData</b> (const char *userData, int size=0)=0</td></tr>
<tr><td nowrap align=right valign=top><a name="a6" doxytag="TreeKey::getFullName"></a>
virtual const char *&nbsp;</td><td valign=bottom><b>getFullName</b> () const=0</td></tr>
<tr><td nowrap align=right valign=top><a name="a7" doxytag="TreeKey::root"></a>
virtual void&nbsp;</td><td valign=bottom><b>root</b> ()=0</td></tr>
<tr><td nowrap align=right valign=top><a name="a8" doxytag="TreeKey::parent"></a>
virtual bool&nbsp;</td><td valign=bottom><b>parent</b> ()=0</td></tr>
<tr><td nowrap align=right valign=top><a name="a9" doxytag="TreeKey::firstChild"></a>
virtual bool&nbsp;</td><td valign=bottom><b>firstChild</b> ()=0</td></tr>
<tr><td nowrap align=right valign=top><a name="a10" doxytag="TreeKey::nextSibling"></a>
virtual bool&nbsp;</td><td valign=bottom><b>nextSibling</b> ()=0</td></tr>
<tr><td nowrap align=right valign=top><a name="a11" doxytag="TreeKey::previousSibling"></a>
virtual bool&nbsp;</td><td valign=bottom><b>previousSibling</b> ()=0</td></tr>
<tr><td nowrap align=right valign=top><a name="a12" doxytag="TreeKey::hasChildren"></a>
virtual bool&nbsp;</td><td valign=bottom><b>hasChildren</b> ()=0</td></tr>
<tr><td nowrap align=right valign=top><a name="a13" doxytag="TreeKey::append"></a>
virtual void&nbsp;</td><td valign=bottom><b>append</b> ()=0</td></tr>
<tr><td nowrap align=right valign=top><a name="a14" doxytag="TreeKey::appendChild"></a>
virtual void&nbsp;</td><td valign=bottom><b>appendChild</b> ()=0</td></tr>
<tr><td nowrap align=right valign=top><a name="a15" doxytag="TreeKey::insertBefore"></a>
virtual void&nbsp;</td><td valign=bottom><b>insertBefore</b> ()=0</td></tr>
<tr><td nowrap align=right valign=top><a name="a16" doxytag="TreeKey::remove"></a>
virtual void&nbsp;</td><td valign=bottom><b>remove</b> ()=0</td></tr>
<tr><td nowrap align=right valign=top><a name="a17" doxytag="TreeKey::setOffset"></a>
virtual void&nbsp;</td><td valign=bottom><b>setOffset</b> (unsigned long offset)=0</td></tr>
<tr><td nowrap align=right valign=top><a name="a18" doxytag="TreeKey::getOffset"></a>
virtual unsigned long&nbsp;</td><td valign=bottom><b>getOffset</b> () const=0</td></tr>
<tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="class_tree_key.html#a19">setText</a> (const char *ikey)=0</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Equates this <a class="el" href="class_s_w_key.html">SWKey</a> to a character string.</em> <a href="#a19">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top><a name="a20" doxytag="TreeKey::setPosition"></a>
virtual void&nbsp;</td><td valign=bottom><b>setPosition</b> (SW_POSITION p)=0</td></tr>
<tr><td nowrap align=right valign=top><a name="a21" doxytag="TreeKey::getText"></a>
virtual const char *&nbsp;</td><td valign=bottom><a class="el" href="class_tree_key.html#a21">getText</a> () const=0</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>returns text key if (char *) cast is requested.</em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>virtual int&nbsp;</td><td valign=bottom><a class="el" href="class_tree_key.html#a22">compare</a> (const <a class="el" href="class_s_w_key.html">SWKey</a> &amp;ikey)=0</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Compares another <a class="el" href="class_verse_key.html">VerseKey</a> object.</em> <a href="#a22">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="class_tree_key.html#a23">decrement</a> (int steps=1)=0</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Decrements key a number of entries.</em> <a href="#a23">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="class_tree_key.html#a24">increment</a> (int steps=1)=0</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Increments key a number of entries.</em> <a href="#a24">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top><a name="a25" doxytag="TreeKey::Traversable"></a>
virtual char&nbsp;</td><td valign=bottom><b>Traversable</b> ()</td></tr>
<tr><td nowrap align=right valign=top>virtual long&nbsp;</td><td valign=bottom><a class="el" href="class_tree_key.html#a26">Index</a> () const</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Use this function to get te current position withing a module.</em> <a href="#a26">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top><a name="a27" doxytag="TreeKey::Index"></a>
virtual long&nbsp;</td><td valign=bottom><b>Index</b> (long iindex)</td></tr>
<tr><td colspan=2><br><h2>Private Methods</h2></td></tr>
<tr><td nowrap align=right valign=top><a name="c0" doxytag="TreeKey::init"></a>
void&nbsp;</td><td valign=bottom><b>init</b> ()</td></tr>
<tr><td colspan=2><br><h2>Static Private Attributes</h2></td></tr>
<tr><td nowrap align=right valign=top><a name="r0" doxytag="TreeKey::classdef"></a>
<a class="el" href="class_s_w_class.html">SWClass</a>&nbsp;</td><td valign=bottom><b>classdef</b></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Class <a class="el" href="class_verse_key.html">VerseKey</a> The <a class="el" href="class_s_w_key.html">SWKey</a> implementation used for verse based modules like Bibles or commentaries.
<p>

<p>
Definition at line <a class="el" href="treekey_8h-source.html#l00036">36</a> of file <a class="el" href="treekey_8h-source.html">treekey.h</a>.<hr><h2>Member Function Documentation</h2>
<a name="a22" doxytag="TreeKey::compare"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> virtual int TreeKey::compare </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="class_s_w_key.html">SWKey</a> &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp; <em>ikey</em>          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap><code> [pure virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Compares another <a class="el" href="class_verse_key.html">VerseKey</a> object.
<p>
<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>ikey</em>&nbsp;</td><td>
key to compare with this one </td></tr>
</table>
</dl><dl compact><dt><b>
Returns: </b><dd>
&gt;0 if this key is greater than compare key; &lt;0 if this key is smaller than compare key; 0 if the keys are the same </dl>
<p>
Reimplemented from <a class="el" href="class_s_w_key.html#a11">SWKey</a>.
<p>
Implemented in <a class="el" href="class_tree_key_idx.html#a28">TreeKeyIdx</a>.    </td>
  </tr>
</table>
<a name="a23" doxytag="TreeKey::decrement"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> virtual void TreeKey::decrement </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">int&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp; <em>steps</em> = 1          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap><code> [pure virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Decrements key a number of entries.
<p>
<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>steps</em>&nbsp;</td><td>
Number of entries to jump backward </td></tr>
</table>
</dl><dl compact><dt><b>
Returns: </b><dd>
*this </dl>
<p>
Reimplemented from <a class="el" href="class_s_w_key.html#a14">SWKey</a>.
<p>
Implemented in <a class="el" href="class_tree_key_idx.html#a29">TreeKeyIdx</a>.    </td>
  </tr>
</table>
<a name="a24" doxytag="TreeKey::increment"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> virtual void TreeKey::increment </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">int&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp; <em>steps</em> = 1          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap><code> [pure virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Increments key a number of entries.
<p>
<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>increment</em>&nbsp;</td><td>
Number of entries to jump forward </td></tr>
</table>
</dl><dl compact><dt><b>
Returns: </b><dd>
*this </dl>
<p>
Reimplemented from <a class="el" href="class_s_w_key.html#a15">SWKey</a>.
<p>
Implemented in <a class="el" href="class_tree_key_idx.html#a30">TreeKeyIdx</a>.    </td>
  </tr>
</table>
<a name="a26" doxytag="TreeKey::Index"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> virtual long TreeKey::Index </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
          <td class="md" valign="top">)&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>
Use this function to get te current position withing a module.
<p>
Here's a small example how to use this function and Index(long). This function uses the GerLut module and chooses a random verse from the Bible and returns it. <div class="fragment"><pre> <font class="keyword">const</font> <font class="keywordtype">char</font>* randomVerse() {
   <a class="code" href="class_verse_key.html">VerseKey</a> vk;
   <a class="code" href="class_s_w_mgr.html">SWMgr</a> mgr;
   <a class="code" href="class_locale_mgr.html#p0">LocaleMgr::systemLocaleMgr</a>.<a class="code" href="class_locale_mgr.html#a6">setDefaultLocaleName</a>(<font class="stringliteral">"de"</font>);

   <a class="code" href="class_s_w_module.html">SWModule</a>* module = mgr-&gt;<a class="code" href="class_s_w_mgr.html#m2">Modules</a>(<font class="stringliteral">"GerLut"</font>);
   srand( time(0) );
   <font class="keyword">const</font> <font class="keywordtype">double</font> newIndex = (double(rand())/RAND_MAX)*(24108+8224);
   vk.<a class="code" href="class_verse_key.html#a34">Index</a>(newIndex);
   module-&gt;<a class="code" href="class_s_w_module.html#a8">SetKey</a>(vk);

   <font class="keywordtype">char</font>* text;
   sprintf(text, <font class="stringliteral">"%s: %s"</font>,(<font class="keyword">const</font> <font class="keywordtype">char</font>*)vk ,module-&gt;<a class="code" href="class_s_w_module.html#a56">StripText</a>(&amp;vk));
   <font class="keywordflow">return</font> text;
</pre></div> 
<p>
Reimplemented from <a class="el" href="class_s_w_key.html#a17">SWKey</a>.
<p>
Definition at line <a class="el" href="treekey_8h-source.html#l00081">81</a> of file <a class="el" href="treekey_8h-source.html">treekey.h</a>.
<p>
<div class="fragment"><pre>00081 { <font class="keywordflow">return</font> getOffset(); }
</pre></div>    </td>
  </tr>
</table>
<a name="a19" doxytag="TreeKey::setText"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> virtual void TreeKey::setText </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const char *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp; <em>ikey</em>          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap><code> [pure virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Equates this <a class="el" href="class_s_w_key.html">SWKey</a> to a character string.
<p>
<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>ikey</em>&nbsp;</td><td>
string to set this key to </td></tr>
</table>
</dl>
<p>
Reimplemented from <a class="el" href="class_s_w_key.html#a7">SWKey</a>.
<p>
Implemented in <a class="el" href="class_tree_key_idx.html#a24">TreeKeyIdx</a>.    </td>
  </tr>
</table>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="treekey_8h-source.html">treekey.h</a><li><a class="el" href="treekey_8cpp-source.html">treekey.cpp</a></ul>
<hr><address align="right"><small>Generated on Thu Jun 20 22:13:04 2002 for The Sword Project by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 
width=110 height=53></a>1.2.15 </small></address>
</body>
</html>