<?php $isip_window_title = "ISIP Homepage"; ?>
<?php include("/data/isip/www/templates/documentation/header/header.html"); ?>

<!--#set var="isip_page_title" value="TreeNode" -->
<?php include("/data/isip/www/templates/documentation/body/index_class.html"); ?>
<?php include("/data/isip/www/templates/documentation/body/bar.html"); ?>

<a name="name">
<b>

name:
<a href="/perl/ifc_document.pl?file=$isip/class/dstr/TreeNode/TreeNode.h">TreeNode&lt;TObject&gt;</a>

</b>
<br><br>

<a name="synopsis">
<b>synopsis:</b>
<br><br>

<blockquote>
<pre>

g++ [flags ...] file ... -l /isip/tools/lib/$ISIP_BINARY/lib_dstr_a

#include &lt;TreeNode.h&gt;

long degree() const;
boolean increment();
boolean decrement();
TreeNode&lt;TObject&gt;* getParent() const;
boolean setParent(const TreeNode&lt;TObject&gt;* arg);
TreeNode&lt;TObject&gt;* getLeftChild() const;
boolean setLeftChild(const TreeNode&lt;TObject&gt;* arg);
TreeNode&lt;TObject&gt;* getRightSibling() const;
boolean setRightSibling(const TreeNode&lt;TObject&gt;* arg);
boolean isAdjacent(const TObject* obj) const;
boolean isAdjacent(const TreeNode&lt;TObject&gt;* node) const;
</pre>
</blockquote>

<a name="quick_start">
<b>quick start:</b>
<br><br>

<blockquote>
<pre>

TreeNode&lt;Ulong&gt tree_node;

tree_node.setParent((TreeNode&lt;Ulong&gt*)NULL);
tree_node.increment();
tree_node.decrement();

</pre>
</blockquote>

<a name="description">
<b>description:</b>
<br><br>

This class is used to implements a tree node and forms the basis of the Tree class data structure.

<br><br>

<a name="dependencies">
<b>dependencies:</b>
<br><br>

<ul>
  <li> <a href="../../math/scalar/String/">String.h</a>
  <li> <a href="../../system/Console/">Console.h</a>
</ul>

<a name="constants">
<b>public constants:</b>
<br><br>

<ul>
  <li> define public constants:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/dstr/TreeNode/TreeNode.h&constant=CLASS_NAME">static const String CLASS_NAME;</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/dstr/TreeNode/TreeNode.h&constant=DEF_PARAM">static const String DEF_PARAM;</a></pre>

  <li> define default values and arguments:
       
       <pre>static const long DEF_DEGREE = 0;</pre>

</ul>

<a name="error">
<b>error codes:</b>
<br><br>

<ul>
  <li> none.

</ul>

<a name="protected">
<b>protected data:</b>
<br><br>

<ul>
  <li> define a pointer to the parent node:

       <pre>TreeNode&lt;TObject&gt;* parent_d;</pre>

  <li> define a pointer to the left child node:

       <pre>TreeNode&lt;TObject&gt;* left_d;</pre>

  <li> define a pointer to the right child node:

       <pre>TreeNode&lt;TObject&gt;* right_d;</pre>

  <li> define the out degree of the node:

       <pre>Long degree_d;</pre>

  <li> declare the debugging parameters:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/dstr/TreeNode/TreeNode.h&static=debug_level_d">static Integral::DEBUG debug_level_d;</a></pre>

  <li> declare the memory manager:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/dstr/TreeNode/TreeNode.h&static=mgr_d">static MemoryManager mgr_d;</a></pre>

</ul>

<a name="public">
<b>required public methods:</b>
<br><br>

<ul>
  <li> static methods:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/dstr/TreeNode/TreeNode.h&method=name&instance=0">static const String& name();</a></pre>

  <li> debug methods:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/dstr/TreeNode/TreeNode.h&method=setDebug&instance=0">static boolean setDebug(Integral::DEBUG debug_level);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/dstr/TreeNode/TreeNode.h&method=debug&instance=0">boolean debug(const unichar* msg) const;</a></pre>

  <li> destructor/constructor(s):

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/dstr/TreeNode/TreeNode.h&method=destructor&instance=0">~TreeNode();</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/dstr/TreeNode/TreeNode.h&method=default+constructor&instance=0">TreeNode(TObject* item = (TObject*)NULL);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/dstr/TreeNode/TreeNode.h&method=copy+constructor&instance=0">TreeNode(const TreeNode&lt;TObject&gt;& copy_tnode);</a></pre>

       <pre>not present.</pre>

  <li> assign methods:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/dstr/TreeNode/TreeNode.h&method=assign&instance=0">boolean assign(const TreeNode&lt;TObject&gt;& copy_stack);</a></pre>

  <li> operator= method:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/dstr/TreeNode/TreeNode.h&method=operator%3D&instance=0">TreeNode&lt;TObject&gt;& operator=(const TreeNode&lt;TObject&gt;& arg);</a></pre>

  <li> i/o methods:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/dstr/TreeNode/TreeNode.h&method=sofSize&instance=0">long sofSize() const;</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/dstr/TreeNode/TreeNode.h&method=read&instance=0">boolean read(Sof& sof, long tag);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/dstr/TreeNode/TreeNode.h&method=write&instance=0">boolean write(Sof& sof, long tag) const;</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/dstr/TreeNode/TreeNode.h&method=read&instance=1">boolean read(Sof& sof, long tag, const String& name);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/dstr/TreeNode/TreeNode.h&method=write&instance=1">boolean write(Sof& sof, long tag, const String& name) const;</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/dstr/TreeNode/TreeNode.h&method=readData&instance=0">boolean readData(Sof& sof, const String& pname = DEF_PARAM, long size = SofParser::FULL_OBJECT, boolean param = true, boolean nested = true);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/dstr/TreeNode/TreeNode.h&method=writeData&instance=0">boolean writeData(Sof& sof, const String& pname = DEF_PARAM) const;</a></pre>

  <li> equality methods:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/dstr/TreeNode/TreeNode.h&method=eq&instance=0">boolean eq(const TreeNode&lt;TObject&gt;& arg) const;</a></pre>

  <li> memory management methods:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/dstr/TreeNode/TreeNode.h&method=new&instance=0">static void* operator new(size_t size);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/dstr/TreeNode/TreeNode.h&method=new\[\]&instance=0">static void* operator new[](size_t size);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/dstr/TreeNode/TreeNode.h&method=delete&instance=0">static void operator delete(void* ptr);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/dstr/TreeNode/TreeNode.h&method=delete\[\]&instance=0">static void operator delete[](void* ptr);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/dstr/TreeNode/TreeNode.h&method=setGrowSize&instance=0">static boolean setGrowSize(long grow_size);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/dstr/TreeNode/TreeNode.h&method=clear&instance=0">boolean clear(Integral::CMODE cmode = Integral::DEF_CMODE);</a></pre>

</ul>

<a name="specific">
<b>class-specific public methods:</b>
<br><br>

<ul>
  <li> node degree methods:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/dstr/TreeNode/TreeNode.h&method=degree&instance=0">long degree() const;</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/dstr/TreeNode/TreeNode.h&method=increment&instance=0">boolean increment();</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/dstr/TreeNode/TreeNode.h&method=decrement&instance=0">boolean decrement();</a></pre>

  <li> node parent methods:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/dstr/TreeNode/TreeNode.h&method=getParent&instance=0">TreeNode&lt;TObject&gt;* getParent() const;</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/dstr/TreeNode/TreeNode.h&method=setParent&instance=0">boolean setParent(const TreeNode&lt;TObject&gt;* arg);</a></pre>

  <li> node children methods:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/dstr/TreeNode/TreeNode.h&method=getLeftChild&instance=0">TreeNode&lt;TObject&gt;* getLeftChild() const;</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/dstr/TreeNode/TreeNode.h&method=setLeftChild&instance=0">boolean setLeftChild(const TreeNode&lt;TObject&gt;* arg);</a></pre>

  <li> node sibling methods:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/dstr/TreeNode/TreeNode.h&method=getRightSibling&instance=0">TreeNode&lt;TObject&gt;* getRightSibling() const;</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/dstr/TreeNode/TreeNode.h&method=setRightSibling&instance=0">boolean setRightSibling(const TreeNode&lt;TObject&gt;* arg);</a></pre>

  <li> node adjacency methods:
     
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/dstr/TreeNode/TreeNode.h&method=isAdjacent&instance=0">boolean isAdjacent(const TObject* obj) const;</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/dstr/TreeNode/TreeNode.h&method=isAdjacent&instance=0">boolean isAdjacent(const TreeNode&lt;TObject&gt;* node) const;</a></pre>

</ul>

<a name="private">
<b>private methods:</b>
<br><br>

<ul>
  <li> declare private methods:

       <pre>template &lt;class TObject_diagnose&gt; friend class TreeNodeDiagnose;</pre>

</ul>

<a name="examples">
<b>examples:</b>
<br><br>

<ul>
  <li> none.

<pre>
</pre>
</ul>

<a name="notes">
<b>notes:</b>
<br><br>

<ul>
  <li> none.
</ul>

<!--#include virtual="/hse/ies/templates/documentation/footer/footer.html" -->
