Sophie

Sophie

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

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: csTreeNode 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&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>csTreeNode Class Reference</h1><!-- doxytag: class="csTreeNode" -->A generic tree class.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="tree_8h-source.html">csutil/tree.h</a>&gt;</code>
<p>
<div class="dynheader">
Inheritance diagram for csTreeNode:</div>
<div class="dynsection">
<p><center><img src="classcsTreeNode__inherit__graph.png" border="0" usemap="#csTreeNode__inherit__map" alt="Inheritance graph"></center>
<map name="csTreeNode__inherit__map">
<area shape="rect" href="classcsEventTree.html" title="This class is used to represent the event namespace (tree)." alt="" coords="5,84,104,111"></map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>

<p>
<a href="classcsTreeNode-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">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsTreeNode.html#2f9082ceea829781495f78879294d0f9">AddChild</a> (<a class="el" href="classcsTreeNode.html">csTreeNode</a> *child)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Add a child node.  <a href="#2f9082ceea829781495f78879294d0f9"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classcsTreeNode.html">csTreeNode</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsTreeNode.html#9edde11103b0273d65bba26dc5bc2360">BSF</a> (bool(*TreeFunc)(<a class="el" href="classcsTreeNode.html">csTreeNode</a> *node, void *param, bool stopOnSuccess), bool(*SelBranch)(<a class="el" href="classcsTreeNode.html">csTreeNode</a> *node), void *param, bool stopOnSuccess)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Execute a function on this node and its children.  <a href="#9edde11103b0273d65bba26dc5bc2360"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsTreeNode.html#c5523e316a20725eb2f444f42481fa36">csTreeNode</a> (<a class="el" href="classcsTreeNode.html">csTreeNode</a> *theParent=0)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create node, optionally as a child of <code>theParent</code>.  <a href="#c5523e316a20725eb2f444f42481fa36"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classcsTreeNode.html">csTreeNode</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsTreeNode.html#47135474f9caa279f78d36a85b9d0df8">DSF</a> (bool(*TreeFunc)(<a class="el" href="classcsTreeNode.html">csTreeNode</a> *node, void *param, bool stopOnSuccess), bool(*SelBranch)(<a class="el" href="classcsTreeNode.html">csTreeNode</a> *node), void *param, bool stopOnSuccess)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Execute a function on this node and its children.  <a href="#47135474f9caa279f78d36a85b9d0df8"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsTreeNode.html#aef5fbde5a0b3c99768374510d28974a">IsLeaf</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns true if this node has no children.  <a href="#aef5fbde5a0b3c99768374510d28974a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsTreeNode.html#3d567dfe02cde13750aa2625b8e8613a">RemoveChild</a> (<a class="el" href="classcsTreeNode.html">csTreeNode</a> *child)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Remove a child node.  <a href="#3d567dfe02cde13750aa2625b8e8613a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f3f5cf66c433f23d29067743d64391ae"></a><!-- doxytag: member="csTreeNode::~csTreeNode" ref="f3f5cf66c433f23d29067743d64391ae" args="()" -->
virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsTreeNode.html#f3f5cf66c433f23d29067743d64391ae">~csTreeNode</a> ()</td></tr>

<tr><td colspan="2"><br><h2>Public Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="808d384f15332c896c54dca01434f71c"></a><!-- doxytag: member="csTreeNode::children" ref="808d384f15332c896c54dca01434f71c" args="" -->
<a class="el" href="classcsArray.html">csArray</a>&lt; <a class="el" href="classcsTreeNode.html">csTreeNode</a> * &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsTreeNode.html#808d384f15332c896c54dca01434f71c">children</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="69ff22a180d65c9ff3b7473bb8b97357"></a><!-- doxytag: member="csTreeNode::parent" ref="69ff22a180d65c9ff3b7473bb8b97357" args="" -->
<a class="el" href="classcsTreeNode.html">csTreeNode</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsTreeNode.html#69ff22a180d65c9ff3b7473bb8b97357">parent</a></td></tr>

</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
A generic tree class. 
<p>Definition at line <a class="el" href="tree_8h-source.html#l00032">32</a> of file <a class="el" href="tree_8h-source.html">tree.h</a>.</p>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="c5523e316a20725eb2f444f42481fa36"></a><!-- doxytag: member="csTreeNode::csTreeNode" ref="c5523e316a20725eb2f444f42481fa36" args="(csTreeNode *theParent=0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">csTreeNode::csTreeNode           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classcsTreeNode.html">csTreeNode</a> *&nbsp;</td>
          <td class="paramname"> <em>theParent</em> = <code>0</code>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Create node, optionally as a child of <code>theParent</code>. 
<p>

<p>Definition at line <a class="el" href="tree_8h-source.html#l00051">51</a> of file <a class="el" href="tree_8h-source.html">tree.h</a>.</p>

<p>References <a class="el" href="tree_8h-source.html#l00131">children</a>, <a class="el" href="tree_8h-source.html#l00130">parent</a>, and <a class="el" href="csutil_2array_8h-source.html#l00691">csArray&lt; T, ElementHandler, MemoryAllocator, CapacityHandler &gt;::Push()</a>.</p>

</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="2f9082ceea829781495f78879294d0f9"></a><!-- doxytag: member="csTreeNode::AddChild" ref="2f9082ceea829781495f78879294d0f9" args="(csTreeNode *child)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void csTreeNode::AddChild           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classcsTreeNode.html">csTreeNode</a> *&nbsp;</td>
          <td class="paramname"> <em>child</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Add a child node. 
<p>

<p>Definition at line <a class="el" href="tree_8h-source.html#l00047">47</a> of file <a class="el" href="tree_8h-source.html">tree.h</a>.</p>

<p>References <a class="el" href="tree_8h-source.html#l00131">children</a>, <a class="el" href="tree_8h-source.html#l00130">parent</a>, and <a class="el" href="csutil_2array_8h-source.html#l00691">csArray&lt; T, ElementHandler, MemoryAllocator, CapacityHandler &gt;::Push()</a>.</p>

</div>
</div><p>
<a class="anchor" name="9edde11103b0273d65bba26dc5bc2360"></a><!-- doxytag: member="csTreeNode::BSF" ref="9edde11103b0273d65bba26dc5bc2360" args="(bool(*TreeFunc)(csTreeNode *node, void *param, bool stopOnSuccess), bool(*SelBranch)(csTreeNode *node), void *param, bool stopOnSuccess)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classcsTreeNode.html">csTreeNode</a>* csTreeNode::BSF           </td>
          <td>(</td>
          <td class="paramtype">bool(*)(<a class="el" href="classcsTreeNode.html">csTreeNode</a> *node, void *param, bool stopOnSuccess)&nbsp;</td>
          <td class="paramname"> <em>TreeFunc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool(*)(<a class="el" href="classcsTreeNode.html">csTreeNode</a> *node)&nbsp;</td>
          <td class="paramname"> <em>SelBranch</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&nbsp;</td>
          <td class="paramname"> <em>param</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&nbsp;</td>
          <td class="paramname"> <em>stopOnSuccess</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Execute a function on this node and its children. 
<p>
Do this in "BreadthSearchFirst" order, that is check first all direct children before diving into subchildren. Returns the last node where TreeFunc resulted in TRUE. If stopOnSuccess is true, then execution is stoped after first successful execution of TreeFunc. SelBranch lets you decide which children to select for further investugation. 0 means all children. 
<p>Definition at line <a class="el" href="tree_8h-source.html#l00104">104</a> of file <a class="el" href="tree_8h-source.html">tree.h</a>.</p>

<p>References <a class="el" href="tree_8h-source.html#l00131">children</a>, <a class="el" href="csutil_2array_8h-source.html#l00886">csArray&lt; T, ElementHandler, MemoryAllocator, CapacityHandler &gt;::DeleteAll()</a>, <a class="el" href="csutil_2array_8h-source.html#l00993">csArray&lt; T, ElementHandler, MemoryAllocator, CapacityHandler &gt;::DeleteIndex()</a>, <a class="el" href="csutil_2array_8h-source.html#l00535">csArray&lt; T, ElementHandler, MemoryAllocator, CapacityHandler &gt;::GetSize()</a>, <a class="el" href="tree_8h-source.html#l00036">IsLeaf()</a>, and <a class="el" href="csutil_2array_8h-source.html#l00691">csArray&lt; T, ElementHandler, MemoryAllocator, CapacityHandler &gt;::Push()</a>.</p>

</div>
</div><p>
<a class="anchor" name="47135474f9caa279f78d36a85b9d0df8"></a><!-- doxytag: member="csTreeNode::DSF" ref="47135474f9caa279f78d36a85b9d0df8" args="(bool(*TreeFunc)(csTreeNode *node, void *param, bool stopOnSuccess), bool(*SelBranch)(csTreeNode *node), void *param, bool stopOnSuccess)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classcsTreeNode.html">csTreeNode</a>* csTreeNode::DSF           </td>
          <td>(</td>
          <td class="paramtype">bool(*)(<a class="el" href="classcsTreeNode.html">csTreeNode</a> *node, void *param, bool stopOnSuccess)&nbsp;</td>
          <td class="paramname"> <em>TreeFunc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool(*)(<a class="el" href="classcsTreeNode.html">csTreeNode</a> *node)&nbsp;</td>
          <td class="paramname"> <em>SelBranch</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&nbsp;</td>
          <td class="paramname"> <em>param</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&nbsp;</td>
          <td class="paramname"> <em>stopOnSuccess</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Execute a function on this node and its children. 
<p>
Do this in "DepthSearchFirst" order, that is check a childs children before testing the next direct child. Returns the last node where TreeFunc resulted in TRUE. If stopOnSuccess is true, then execution is stoped after first successful execution of TreeFunc. SelBranch lets you decide which children to select for further investigation. 0 means all children. 
<p>Definition at line <a class="el" href="tree_8h-source.html#l00073">73</a> of file <a class="el" href="tree_8h-source.html">tree.h</a>.</p>

<p>References <a class="el" href="tree_8h-source.html#l00131">children</a>, and <a class="el" href="csutil_2array_8h-source.html#l00535">csArray&lt; T, ElementHandler, MemoryAllocator, CapacityHandler &gt;::GetSize()</a>.</p>

</div>
</div><p>
<a class="anchor" name="aef5fbde5a0b3c99768374510d28974a"></a><!-- doxytag: member="csTreeNode::IsLeaf" ref="aef5fbde5a0b3c99768374510d28974a" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool csTreeNode::IsLeaf           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns true if this node has no children. 
<p>

<p>Definition at line <a class="el" href="tree_8h-source.html#l00036">36</a> of file <a class="el" href="tree_8h-source.html">tree.h</a>.</p>

<p>References <a class="el" href="tree_8h-source.html#l00131">children</a>, and <a class="el" href="csutil_2array_8h-source.html#l00535">csArray&lt; T, ElementHandler, MemoryAllocator, CapacityHandler &gt;::GetSize()</a>.</p>

<p>Referenced by <a class="el" href="tree_8h-source.html#l00104">BSF()</a>.</p>

</div>
</div><p>
<a class="anchor" name="3d567dfe02cde13750aa2625b8e8613a"></a><!-- doxytag: member="csTreeNode::RemoveChild" ref="3d567dfe02cde13750aa2625b8e8613a" args="(csTreeNode *child)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void csTreeNode::RemoveChild           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classcsTreeNode.html">csTreeNode</a> *&nbsp;</td>
          <td class="paramname"> <em>child</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Remove a child node. 
<p>

<p>Definition at line <a class="el" href="tree_8h-source.html#l00040">40</a> of file <a class="el" href="tree_8h-source.html">tree.h</a>.</p>

<p>References <a class="el" href="tree_8h-source.html#l00131">children</a>, <a class="el" href="csutil_2array_8h-source.html#l00337">csArrayItemNotFound</a>, <a class="el" href="csutil_2array_8h-source.html#l00993">csArray&lt; T, ElementHandler, MemoryAllocator, CapacityHandler &gt;::DeleteIndex()</a>, and <a class="el" href="csutil_2array_8h-source.html#l00849">csArray&lt; T, ElementHandler, MemoryAllocator, CapacityHandler &gt;::Find()</a>.</p>

<p>Referenced by <a class="el" href="tree_8h-source.html#l00054">~csTreeNode()</a>.</p>

</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li>csutil/<a class="el" href="tree_8h-source.html">tree.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>