Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

exotkTree_TreeNode Class Reference

a node in a tree. More...

#include <exotkTree_TreeNode.hxx>

Inheritance diagram for exotkTree_TreeNode:

Inheritance graph
[legend]
Collaboration diagram for exotkTree_TreeNode:

Collaboration graph
[legend]
List of all members.

Public Methods

void * operator new (size_t, void *anAddress)
 OCC new. More...

void * operator new (size_t size)
 OCC new. More...

void operator delete (void *anAddress)
 OCC delete. More...

Standard_EXPORT exotkTree_TreeNode ()
 Constructor. More...

virtual Standard_EXPORT ~exotkTree_TreeNode ()
 Destructor. More...

virtual Standard_EXPORT void SetData (const Handle_Standard_Transient &aData)
 Set a data to the node. More...

virtual Standard_EXPORT Handle_Standard_Transient Data ()
 Return the associated data. More...

virtual Standard_EXPORT Standard_Boolean HasData ()
 Return true if a data is associted to the node. More...

virtual Standard_EXPORT Standard_Boolean IsRoot ()
 Return true if the node is a root. More...

virtual Standard_EXPORT Standard_Boolean HasChildren ()
 Return true if the node has children. More...

virtual Standard_EXPORT Handle_exotkTree_TreeNode FirstChild ()
 Return the first child. More...

virtual Standard_EXPORT Handle_exotkTree_TreeNode LastChild ()
 Return the last child. More...

virtual Standard_EXPORT void Children (exotkTree_ListOfTreeNode &aChildList)
 Return the children of the node. More...

virtual Standard_EXPORT Standard_Boolean HasParent ()
 Return true if the node has a parent node. More...

virtual Standard_EXPORT Handle_exotkTree_TreeNode Parent ()
 Return the parent. More...

virtual Standard_EXPORT void SetParent (const Handle_exotkTree_TreeNode &aParent)
 Set aParent as parent node. More...

virtual Standard_EXPORT void SetTree (const Handle_exotkTree_Tree &aTree)
 Set the tree. More...

virtual Standard_EXPORT Handle_exotkTree_Tree Tree ()
 Return the associated tree. More...

virtual Standard_EXPORT Standard_Boolean HasTree ()
 Return true if a tree is associated to this node. More...

virtual Standard_EXPORT TCollection_AsciiString SetName (const TCollection_AsciiString &aName)
 Set the name of this node. More...

virtual Standard_EXPORT TCollection_AsciiString Name ()
 Return the name of this node. More...

virtual Standard_EXPORT Standard_Boolean SetChecked (const Standard_Boolean aCheckStatus)
 Set the check status. More...

virtual Standard_EXPORT Standard_Boolean IsChecked ()
 Return true if this node is checked. More...

virtual Standard_EXPORT Standard_Boolean FindChild (const TCollection_AsciiString &aNodeToFind, Handle_exotkTree_TreeNode &aFoundNode)
 Find the child of this with aNodeToFind name. More...

virtual Standard_EXPORT Standard_Boolean AppendChild (const Handle_exotkTree_TreeNode &aChildToAppend)
 Insert aChildToAppend at the end of the child list. More...

virtual Standard_EXPORT Standard_Boolean PrependChild (const Handle_exotkTree_TreeNode &aChildToPrepend)
 Insert aChildToAppend at the beginning of the child list. More...

virtual Standard_EXPORT Standard_Boolean InsertChildAfter (const Handle_exotkTree_TreeNode &aChildToInsert, const Handle_exotkTree_TreeNode &After)
 Insert aChildToInsert after After. More...

virtual Standard_EXPORT Standard_Boolean InsertChildAfter (const Handle_exotkTree_TreeNode &aChildToInsert, const TCollection_AsciiString &After)
 Insert aChildToInsert after the node named After. More...

virtual Standard_EXPORT Standard_Boolean InsertChildBefore (const Handle_exotkTree_TreeNode &aChildToInsert, const Handle_exotkTree_TreeNode &Before)
 Insert aChildToInsert before Before. More...

virtual Standard_EXPORT Standard_Boolean InsertChildBefore (const Handle_exotkTree_TreeNode &aChildToInsert, const TCollection_AsciiString &Before)
 Insert aChildToInsert before the node named Before. More...

Standard_EXPORT const Handle_Standard_Type & DynamicType () const
 Type management. More...

Standard_EXPORT Standard_Boolean IsKind (const Handle_Standard_Type &) const
 Type management. More...


Protected Methods

virtual Standard_EXPORT Standard_Boolean FindChild (const Handle_exotkTree_TreeNode &aNodeToFind, exotkTree_ListIteratorOfListOfTreeNode &anIterator)
 Find a child. More...

virtual Standard_EXPORT Standard_Boolean FindChild (const TCollection_AsciiString &aNodeToFind, exotkTree_ListIteratorOfListOfTreeNode &anIterator)
 Find a child. More...


Protected Attributes

Handle_exotkTree_TreeNode myParent
Handle_Standard_Transient myData
Handle_exotkTree_Tree myTree
exotkTree_ListOfTreeNode myChildren
Standard_Boolean myIsChecked
TCollection_AsciiString myName

Friends

Standard_EXPORT friend Handle_Standard_Type & exotkTree_TreeNode_Type_ ()
 Type management. More...


Detailed Description

a node in a tree.

Author:
Stephane Routelous

Definition at line 61 of file exotkTree_TreeNode.hxx.


Constructor & Destructor Documentation

exotkTree_TreeNode::exotkTree_TreeNode  
 

Constructor.

Definition at line 63 of file exotkTree_TreeNode.cxx.

References myIsChecked.

exotkTree_TreeNode::~exotkTree_TreeNode   [virtual]
 

Destructor.

Definition at line 76 of file exotkTree_TreeNode.cxx.

References SetData(), SetParent(), and SetTree().


Member Function Documentation

exotkTree_TreeNode::AppendChild const Handle_exotkTree_TreeNode   aChildToAppend [virtual]
 

Insert aChildToAppend at the end of the child list.

Returns:
Standard_Boolean : false if aChildToAppend already has a parent
Parameters:
aChildToAppend  const Handle_exotkTree_TreeNode&

Definition at line 509 of file exotkTree_TreeNode.cxx.

References exotkTree_ListOfTreeNode::Append(), myChildren, and myTree.

Referenced by exotkTree_MenuNode::AddSeparator().

exotkTree_TreeNode::Children exotkTree_ListOfTreeNode   aChildList [virtual]
 

Return the children of the node.

Warning:
can be empty if the node has no children
Return values:
aChildList  exotkTree_ListOfTreeNode&

Definition at line 180 of file exotkTree_TreeNode.cxx.

References myChildren.

exotkTree_TreeNode::Data   [virtual]
 

Return the associated data.

Warning:
can be null
Returns:
Handle_Standard_Transient

Definition at line 131 of file exotkTree_TreeNode.cxx.

References myData.

Handle_Standard_Type & exotkTree_TreeNode::DynamicType   const
 

Type management.

Returns:
const Handle_Standard_Type&

Reimplemented in exotkAIS_DisplayModeMenuNode, exotkAIS_MaterialMenuNode, exotkAIS_TransparencyMenuNode, exotkBRepTree_ShapeNode, exotkTree_MenuNode, and exotkTree_Separator.

exotkTree_TreeNode::FindChild const TCollection_AsciiString &    aNodeToFind,
exotkTree_ListIteratorOfListOfTreeNode   anIterator
[protected, virtual]
 

Find a child.

Returns:
Standard_Boolean
Parameters:
aNodeToFind  const TCollection_AsciiString&
anIterator  exotkTree_ListIteratorOfListOfTreeNode&

Definition at line 350 of file exotkTree_TreeNode.cxx.

References HasChildren(), exotkTree_ListIteratorOfListOfTreeNode::Initialize(), exotkTree_ListIteratorOfListOfTreeNode::More(), myChildren, exotkTree_ListIteratorOfListOfTreeNode::Next(), and exotkTree_ListIteratorOfListOfTreeNode::Value().

exotkTree_TreeNode::FindChild const Handle_exotkTree_TreeNode   aNodeToFind,
exotkTree_ListIteratorOfListOfTreeNode   anIterator
[protected, virtual]
 

Find a child.

Returns:
Standard_Boolean
Parameters:
aNodeToFind  const Handle_exotkTree_TreeNode&
anIterator  exotkTree_ListIteratorOfListOfTreeNode&

Definition at line 324 of file exotkTree_TreeNode.cxx.

References HasChildren(), exotkTree_ListIteratorOfListOfTreeNode::Initialize(), exotkTree_ListIteratorOfListOfTreeNode::More(), myChildren, exotkTree_ListIteratorOfListOfTreeNode::Next(), and exotkTree_ListIteratorOfListOfTreeNode::Value().

exotkTree_TreeNode::FindChild const TCollection_AsciiString &    aNodeToFind,
Handle_exotkTree_TreeNode   aFoundNode
[virtual]
 

Find the child of this with aNodeToFind name.

Returns:
Standard_Boolean : true if the child is found
Parameters:
aNodeToFind  const TCollection_AsciiString&
Return values:
aFoundNode  Handle_exotkTree_TreeNode&

Definition at line 295 of file exotkTree_TreeNode.cxx.

References HasChildren(), exotkTree_ListIteratorOfListOfTreeNode::Initialize(), exotkTree_ListIteratorOfListOfTreeNode::More(), myChildren, exotkTree_ListIteratorOfListOfTreeNode::Next(), exotkMaterial_Datas::theIterator, and exotkTree_ListIteratorOfListOfTreeNode::Value().

Referenced by InsertChildAfter(), and InsertChildBefore().

exotkTree_TreeNode::FirstChild   [virtual]
 

Return the first child.

Returns:
Handle_exotkTree_TreeNode

Definition at line 553 of file exotkTree_TreeNode.cxx.

References exotkTree_ListOfTreeNode::First(), HasChildren(), and myChildren.

exotkTree_TreeNode::HasChildren   [virtual]
 

Return true if the node has children.

Returns:
Standard_Boolean

Definition at line 167 of file exotkTree_TreeNode.cxx.

References exotkTree_ListOfTreeNode::IsEmpty(), and myChildren.

Referenced by FindChild(), FirstChild(), InsertChildAfter(), InsertChildBefore(), and LastChild().

exotkTree_TreeNode::HasData   [virtual]
 

Return true if a data is associted to the node.

Returns:
Standard_Boolean

Definition at line 143 of file exotkTree_TreeNode.cxx.

References myData.

exotkTree_TreeNode::HasParent   [virtual]
 

Return true if the node has a parent node.

Returns:
Standard_Boolean

Definition at line 192 of file exotkTree_TreeNode.cxx.

References myParent.

exotkTree_TreeNode::HasTree   [virtual]
 

Return true if a tree is associated to this node.

Returns:
Standard_Boolean

Definition at line 254 of file exotkTree_TreeNode.cxx.

References myTree.

exotkTree_TreeNode::InsertChildAfter const Handle_exotkTree_TreeNode   aChildToInsert,
const TCollection_AsciiString &    After
[virtual]
 

Insert aChildToInsert after the node named After.

Returns:
Standard_Boolean : false if failed
Parameters:
aChildToInsert  const Handle_exotkTree_TreeNode&
After  const TCollection_AsciiString&

Definition at line 442 of file exotkTree_TreeNode.cxx.

References FindChild(), HasChildren(), exotkTree_ListOfTreeNode::InsertAfter(), myChildren, myTree, and exotkMaterial_Datas::theIterator.

exotkTree_TreeNode::InsertChildAfter const Handle_exotkTree_TreeNode   aChildToInsert,
const Handle_exotkTree_TreeNode   After
[virtual]
 

Insert aChildToInsert after After.

Returns:
Standard_Boolean : false if failed
Parameters:
aChildToInsert  const Handle_exotkTree_TreeNode&
After  const Handle_exotkTree_TreeNode&

Definition at line 376 of file exotkTree_TreeNode.cxx.

References FindChild(), HasChildren(), exotkTree_ListOfTreeNode::InsertAfter(), myChildren, myTree, and exotkMaterial_Datas::theIterator.

exotkTree_TreeNode::InsertChildBefore const Handle_exotkTree_TreeNode   aChildToInsert,
const TCollection_AsciiString &    Before
[virtual]
 

Insert aChildToInsert before the node named Before.

Returns:
Standard_Boolean : false if failed
Parameters:
aChildToInsert  const Handle_exotkTree_TreeNode&
Before  const TCollection_AsciiString&

Definition at line 476 of file exotkTree_TreeNode.cxx.

References FindChild(), HasChildren(), exotkTree_ListOfTreeNode::InsertBefore(), myChildren, myTree, and exotkMaterial_Datas::theIterator.

exotkTree_TreeNode::InsertChildBefore const Handle_exotkTree_TreeNode   aChildToInsert,
const Handle_exotkTree_TreeNode   Before
[virtual]
 

Insert aChildToInsert before Before.

Returns:
Standard_Boolean : false if failed
Parameters:
aChildToInsert  const Handle_exotkTree_TreeNode&
Before  const Handle_exotkTree_TreeNode&

Definition at line 409 of file exotkTree_TreeNode.cxx.

References FindChild(), HasChildren(), exotkTree_ListOfTreeNode::InsertBefore(), myChildren, myTree, and exotkMaterial_Datas::theIterator.

exotkTree_TreeNode::IsChecked   [virtual]
 

Return true if this node is checked.

Returns:
Standard_Boolean

Definition at line 118 of file exotkTree_TreeNode.cxx.

References myIsChecked.

exotkTree_TreeNode::IsKind const Handle_Standard_Type &    const
 

Type management.

Returns:
Standard_Boolean
Parameters:
const  Handle_Standard_Type&

Reimplemented in exotkAIS_DisplayModeMenuNode, exotkAIS_MaterialMenuNode, exotkAIS_TransparencyMenuNode, exotkBRepTree_ShapeNode, exotkTree_MenuNode, and exotkTree_Separator.

exotkTree_TreeNode::IsRoot   [virtual]
 

Return true if the node is a root.

Returns:
Standard_Boolean

Definition at line 155 of file exotkTree_TreeNode.cxx.

References myParent, and myTree.

exotkTree_TreeNode::LastChild   [virtual]
 

Return the last child.

Returns:
Handle_exotkTree_TreeNode

Definition at line 570 of file exotkTree_TreeNode.cxx.

References HasChildren(), exotkTree_ListOfTreeNode::Last(), and myChildren.

exotkTree_TreeNode::Name   [virtual]
 

Return the name of this node.

Returns:
TCollection_AsciiString

Definition at line 281 of file exotkTree_TreeNode.cxx.

References myName.

void exotkTree_TreeNode::operator delete void *    anAddress [inline]
 

OCC delete.

Returns:
inline void
Parameters:
void  *anAddress

Reimplemented in exotkAF_ViewAntialiasingMenuNode, exotkAF_ViewBackgroundColorMenuNode, exotkAF_ViewFitMenuNode, exotkAF_ViewHLRMenuNode, exotkAF_ViewTypeMenuNode, exotkAIS_DisplayModeMenuNode, exotkAIS_MaterialMenuNode, exotkAIS_TransparencyMenuNode, exotkBRepTree_ShapeNode, exotkTree_MenuNode, and exotkTree_Separator.

Definition at line 94 of file exotkTree_TreeNode.hxx.

void * exotkTree_TreeNode::operator new size_t    size [inline]
 

OCC new.

Returns:
inline void*
Parameters:
size_t  size

Reimplemented in exotkAF_ViewAntialiasingMenuNode, exotkAF_ViewBackgroundColorMenuNode, exotkAF_ViewFitMenuNode, exotkAF_ViewHLRMenuNode, exotkAF_ViewTypeMenuNode, exotkAIS_DisplayModeMenuNode, exotkAIS_MaterialMenuNode, exotkAIS_TransparencyMenuNode, exotkBRepTree_ShapeNode, exotkTree_MenuNode, and exotkTree_Separator.

Definition at line 83 of file exotkTree_TreeNode.hxx.

void * exotkTree_TreeNode::operator new size_t   ,
void *    anAddress
[inline]
 

OCC new.

Returns:
inline void*
Parameters:
size_t 
void  * anAddress

Reimplemented in exotkAF_ViewAntialiasingMenuNode, exotkAF_ViewBackgroundColorMenuNode, exotkAF_ViewFitMenuNode, exotkAF_ViewHLRMenuNode, exotkAF_ViewTypeMenuNode, exotkAIS_DisplayModeMenuNode, exotkAIS_MaterialMenuNode, exotkAIS_TransparencyMenuNode, exotkBRepTree_ShapeNode, exotkTree_MenuNode, and exotkTree_Separator.

Definition at line 72 of file exotkTree_TreeNode.hxx.

exotkTree_TreeNode::Parent   [virtual]
 

Return the parent.

Warning:
can be null
Returns:
Handle_exotkTree_TreeNode

Definition at line 204 of file exotkTree_TreeNode.cxx.

References myParent.

exotkTree_TreeNode::PrependChild const Handle_exotkTree_TreeNode   aChildToPrepend [virtual]
 

Insert aChildToAppend at the beginning of the child list.

Returns:
Standard_Boolean : false if aChildToAppend already has a parent
Parameters:
aChildToAppend  const Handle_exotkTree_TreeNode&

Definition at line 531 of file exotkTree_TreeNode.cxx.

References myChildren, myTree, and exotkTree_ListOfTreeNode::Prepend().

exotkTree_TreeNode::SetChecked const Standard_Boolean    aCheckStatus [virtual]
 

Set the check status.

Returns:
Standard_Boolean : the old status
Parameters:
aCheckStatus  const Standard_Boolean

Definition at line 104 of file exotkTree_TreeNode.cxx.

References myIsChecked.

exotkTree_TreeNode::SetData const Handle_Standard_Transient &    aData [virtual]
 

Set a data to the node.

Parameters:
aData  const Handle_Standard_Transient&

Definition at line 91 of file exotkTree_TreeNode.cxx.

References myData.

Referenced by ~exotkTree_TreeNode().

exotkTree_TreeNode::SetName const TCollection_AsciiString &    aName [virtual]
 

Set the name of this node.

Returns:
TCollection_AsciiString : the old name
Parameters:
aName  const TCollection_AsciiString&

Definition at line 267 of file exotkTree_TreeNode.cxx.

References myName.

exotkTree_TreeNode::SetParent const Handle_exotkTree_TreeNode   aParent [virtual]
 

Set aParent as parent node.

Warning:
If a parent exists, the old one is replaced by aParent
Parameters:
aParent  const Handle_exotkTree_TreeNode&

Definition at line 217 of file exotkTree_TreeNode.cxx.

References myParent.

Referenced by ~exotkTree_TreeNode().

exotkTree_TreeNode::SetTree const Handle_exotkTree_Tree   aTree [virtual]
 

Set the tree.

Parameters:
aTree  const Handle_exotkTree_Tree&

Definition at line 230 of file exotkTree_TreeNode.cxx.

References myTree.

Referenced by ~exotkTree_TreeNode().

exotkTree_TreeNode::Tree   [virtual]
 

Return the associated tree.

Returns:
Handle_exotkTree_Tree

Definition at line 242 of file exotkTree_TreeNode.cxx.

References myTree.


Friends And Related Function Documentation

Handle_Standard_Type & exotkTree_TreeNode::exotkTree_TreeNode_Type_   [friend]
 

Type management.

Returns:
friend Handle_Standard_Type&


Member Data Documentation

exotkTree_ListOfTreeNode exotkTree_TreeNode::myChildren [protected]
 

the children list

Definition at line 364 of file exotkTree_TreeNode.hxx.

Referenced by AppendChild(), Children(), FindChild(), FirstChild(), HasChildren(), InsertChildAfter(), InsertChildBefore(), LastChild(), and PrependChild().

Handle_Standard_Transient exotkTree_TreeNode::myData [protected]
 

the associated data

Definition at line 358 of file exotkTree_TreeNode.hxx.

Referenced by Data(), HasData(), and SetData().

Standard_Boolean exotkTree_TreeNode::myIsChecked [protected]
 

true if the node is checked

Definition at line 367 of file exotkTree_TreeNode.hxx.

Referenced by exotkAF_ViewHLRMenuNode::Execute(), exotkAF_ViewAntialiasingMenuNode::Execute(), exotkAF_ViewAntialiasingMenuNode::exotkAF_ViewAntialiasingMenuNode(), exotkAF_ViewHLRMenuNode::exotkAF_ViewHLRMenuNode(), exotkAIS_DisplayModeMenuNode::exotkAIS_DisplayModeMenuNode(), exotkTree_TreeNode(), IsChecked(), and SetChecked().

TCollection_AsciiString exotkTree_TreeNode::myName [protected]
 

the node name

Definition at line 370 of file exotkTree_TreeNode.hxx.

Referenced by exotkAF_ViewAntialiasingMenuNode::exotkAF_ViewAntialiasingMenuNode(), exotkAF_ViewBackgroundColorMenuNode::exotkAF_ViewBackgroundColorMenuNode(), exotkAF_ViewFitMenuNode::exotkAF_ViewFitMenuNode(), exotkAF_ViewHLRMenuNode::exotkAF_ViewHLRMenuNode(), exotkTree_Separator::exotkTree_Separator(), Name(), and SetName().

Handle_exotkTree_TreeNode exotkTree_TreeNode::myParent [protected]
 

the parent node

Definition at line 355 of file exotkTree_TreeNode.hxx.

Referenced by HasParent(), IsRoot(), Parent(), and SetParent().

Handle_exotkTree_Tree exotkTree_TreeNode::myTree [protected]
 

the associated tree

Definition at line 361 of file exotkTree_TreeNode.hxx.

Referenced by AppendChild(), HasTree(), InsertChildAfter(), InsertChildBefore(), IsRoot(), PrependChild(), SetTree(), and Tree().


The documentation for this class was generated from the following files:
Generated on Wed Jan 23 12:18:42 2002 for exotk by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001