OCC Main Page | ApplicationFramework | Toolkits | Packages | Class Hierarchy | Data Structures | File List | Data Fields | Globals

ApplicationFramework
TKLCAF
TDataStd


TDataStd_TreeNode Class Reference

Allows you to define an explicit tree of labels
which you can also edit.
Without this class, the data structure cannot be fully edited.
This service is required if for presentation
purposes, you want to create an application with
a tree which allows you to organize and link data
as a function of application features.
.

#include <TDataStd_TreeNode.hxx>

Inheritance diagram for TDataStd_TreeNode:

Inheritance graph
[legend]

Public Member Functions

Standard_EXPORT TDataStd_TreeNode ()
Standard_EXPORT Standard_Boolean Append (const Handle(TDataStd_TreeNode)&Child)
 Insert the TreeNode <child> as last child of <me>. If
the insertion is successful <me> becomes the Father of <child>.
.
Standard_EXPORT Standard_Boolean Prepend (const Handle(TDataStd_TreeNode)&Child)
 Insert the the TreeNode <child> as first child of
<me>. If the insertion is successful <me> becomes the Father of <child>
.
Standard_EXPORT Standard_Boolean InsertBefore (const Handle(TDataStd_TreeNode)&Node)
 Inserts the TreeNode <node> before <me>. If insertion is successful <me>
and <node> belongs to the same Father.
.
Standard_EXPORT Standard_Boolean InsertAfter (const Handle(TDataStd_TreeNode)&Node)
 Inserts the TreeNode <node> after <me>. If insertion is successful <me>
and <node> belongs to the same Father.
.
Standard_EXPORT Standard_Boolean Remove ()
 Removes this tree node attribute from its father
node. The result is that this attribute becomes a root node.
.
Standard_EXPORT Standard_Integer Depth () const
 Returns the depth of this tree node in the overall tree node structure.
In other words, the number of father tree nodes of this one is returned.
.
Standard_EXPORT Standard_Boolean IsAscendant (const Handle(TDataStd_TreeNode)&of) const
 Returns true if this tree node attribute is an
ascendant of of. In other words, if it is a father or
the father of a father of of.
.
Standard_EXPORT Standard_Boolean IsDescendant (const Handle(TDataStd_TreeNode)&of) const
 Returns true if this tree node attribute is a
descendant of of. In other words, if it is a child or
the child of a child of of.
.
Standard_EXPORT Standard_Boolean IsRoot () const
 Returns true if this tree node attribute is the
ultimate father in the tree.
.
Standard_EXPORT Handle_TDataStd_TreeNode Root () const
 Returns the ultimate father of this tree node attribute.
.
Standard_EXPORT Standard_Boolean IsFather (const Handle(TDataStd_TreeNode)&of) const
 Returns true if this tree node attribute is a father of of.
.
Standard_EXPORT Standard_Boolean IsChild (const Handle(TDataStd_TreeNode)&of) const
 Returns true if this tree node attribute is a child of of.
.
Standard_Boolean HasFather () const
 Returns true if this tree node attribute has a father tree node.
.
Standard_EXPORT Handle_TDataStd_TreeNode Father () const
 Returns the father TreeNode of <me>. Null if root.
.
Standard_Boolean HasNext () const
 Returns true if this tree node attribute has a next tree node.
.
Standard_EXPORT Handle_TDataStd_TreeNode Next () const
 Returns the next tree node in this tree node attribute.
Warning
This tree node is null if it is the last one in this
tree node attribute.Returns the next TreeNode of <me>. Null if last.
.
Standard_Boolean HasPrevious () const
 Returns true if this tree node attribute has a previous tree node.
.
Standard_EXPORT Handle_TDataStd_TreeNode Previous () const
 Returns the previous tree node of this tree node attribute.
Warning
This tree node is null if it is the first one in this tree node attribute.
.
Standard_Boolean HasFirst () const
 Returns true if this tree node attribute has a first child tree node.
.
Standard_EXPORT Handle_TDataStd_TreeNode First () const
 Returns the first child tree node in this tree node object.
.
Standard_Boolean HasLast () const
 Returns true if this tree node attribute has a last child tree node.
.
Standard_EXPORT Handle_TDataStd_TreeNode Last ()
 Returns the last child tree node in this tree node object.
//! to set fields
=============
.
Standard_EXPORT void SetTreeID (const Standard_GUID &explicitID)
Standard_EXPORT void SetFather (const Handle(TDataStd_TreeNode)&F)
Standard_EXPORT void SetNext (const Handle(TDataStd_TreeNode)&F)
Standard_EXPORT void SetPrevious (const Handle(TDataStd_TreeNode)&F)
Standard_EXPORT void SetFirst (const Handle(TDataStd_TreeNode)&F)
Standard_EXPORT void SetLast (const Handle(TDataStd_TreeNode)&F)
 TreeNode callback:
==================
.
virtual Standard_EXPORT void AfterAddition ()
 Connect the TreeNode to its father child list
.
virtual Standard_EXPORT void BeforeForget ()
 Disconnect the TreeNode from its Father child list
.
virtual Standard_EXPORT void AfterResume ()
 Reconnect the TreeNode to its father child list.
.
virtual Standard_EXPORT Standard_Boolean BeforeUndo (const Handle(TDF_AttributeDelta)&anAttDelta, const Standard_Boolean forceIt=Standard_False)
 Disconnect the TreeNode, if necessary.
.
virtual Standard_EXPORT Standard_Boolean AfterUndo (const Handle(TDF_AttributeDelta)&anAttDelta, const Standard_Boolean forceIt=Standard_False)
 Reconnect the TreeNode, if necessary.
//! Implementation of Attribute methods:
===================================
.
Standard_EXPORT const Standard_GUID & ID () const
 Returns the tree ID (default or explicit one depending
onthe Set method used).
.
virtual Standard_EXPORT void Restore (const Handle(TDF_Attribute)&with)
 Restores the backuped contents from <anattribute>
into this one. It is used when aborting a
transaction.
.
virtual Standard_EXPORT void Paste (const Handle(TDF_Attribute)&into, const Handle(TDF_RelocationTable)&RT) const
 This method is different from the "Copy" one,
because it is used when copying an attribute from
a source structure into a target structure. This
method may paste the contents of <me> into
<intoattribute>.

The given pasted attribute can be full or empty of
its contents. But don't make a NEW! Just set the
contents!

It is possible to use <arelocationtable> to
get/set the relocation value of a source
attribute.
.
virtual Standard_EXPORT Handle_TDF_Attribute NewEmpty () const
 Returns an new empty attribute from the good end
type. It is used by the copy algorithm.
.
virtual Standard_EXPORT void References (const Handle(TDF_DataSet)&aDataSet) const
 Adds the first level referenced attributes and labels
to <adataset>.

For this, use the AddLabel or AddAttribute of
DataSet.

If there is none, do not implement the method.
.
virtual Standard_EXPORT Standard_OStream & Dump (Standard_OStream &anOS) const
 Dumps the minimum information about <me> on
<astream>.

.
Standard_EXPORT const Handle (Standard_Type)&DynamicType() const

Static Public Member Functions

static Standard_EXPORT Standard_Boolean Find (const TDF_Label &L, Handle(TDataStd_TreeNode)&T)
 class methods working on the node
===================================
//! Returns true if the tree node T is found on the label L.
Otherwise, false is returned.

static Standard_EXPORT Handle_TDataStd_TreeNode Set (const TDF_Label &L)
 Finds or Creates a TreeNode attribute on the label <l>
with the default tree ID, returned by the method
<getdefaulttreeid>. Returns the created/found TreeNode
attribute.
.
static Standard_EXPORT Handle_TDataStd_TreeNode Set (const TDF_Label &L, const Standard_GUID &ExplicitTreeID)
 Finds or Creates a TreeNode attribute on the label
<l>, with an explicit tree ID. <explicittreeid> is
the ID returned by <TDF_Attribute::ID> method.
Returns the found/created TreeNode attribute.
.
static Standard_EXPORT const
Standard_GUID & 
GetDefaultTreeID ()
 returns a default tree ID. this ID is used by the
<set> method without explicit tree ID.
//! Instance methods:
================


Private Attributes

TDataStd_PtrTreeNode myFather
TDataStd_PtrTreeNode myPrevious
TDataStd_PtrTreeNode myNext
TDataStd_PtrTreeNode myFirst
TDataStd_PtrTreeNode myLast
Standard_GUID myTreeID

Constructor & Destructor Documentation

Standard_EXPORT TDataStd_TreeNode::TDataStd_TreeNode  ) 
 


Member Function Documentation

virtual Standard_EXPORT void TDataStd_TreeNode::AfterAddition  )  [virtual]
 

Reimplemented from TDF_Attribute.

virtual Standard_EXPORT void TDataStd_TreeNode::AfterResume  )  [virtual]
 

Reimplemented from TDF_Attribute.

virtual Standard_EXPORT Standard_Boolean TDataStd_TreeNode::AfterUndo const Handle(TDF_AttributeDelta)&  anAttDelta,
const Standard_Boolean  forceIt = Standard_False
[virtual]
 

Reimplemented from TDF_Attribute.

Standard_EXPORT Standard_Boolean TDataStd_TreeNode::Append const Handle(TDataStd_TreeNode)&  Child  ) 
 

virtual Standard_EXPORT void TDataStd_TreeNode::BeforeForget  )  [virtual]
 

Reimplemented from TDF_Attribute.

virtual Standard_EXPORT Standard_Boolean TDataStd_TreeNode::BeforeUndo const Handle(TDF_AttributeDelta)&  anAttDelta,
const Standard_Boolean  forceIt = Standard_False
[virtual]
 

Reimplemented from TDF_Attribute.

Standard_EXPORT Standard_Integer TDataStd_TreeNode::Depth  )  const
 

virtual Standard_EXPORT Standard_OStream& TDataStd_TreeNode::Dump Standard_OStream &  anOS  )  const [virtual]
 

Reimplemented from TDF_Attribute.

Standard_EXPORT Handle_TDataStd_TreeNode TDataStd_TreeNode::Father  )  const
 

static Standard_EXPORT Standard_Boolean TDataStd_TreeNode::Find const TDF_Label L,
Handle(TDataStd_TreeNode)&  T
[static]
 

Standard_EXPORT Handle_TDataStd_TreeNode TDataStd_TreeNode::First  )  const
 

static Standard_EXPORT const Standard_GUID& TDataStd_TreeNode::GetDefaultTreeID  )  [static]
 

Standard_EXPORT const TDataStd_TreeNode::Handle Standard_Type   )  const
 

Reimplemented from TDF_Attribute.

Standard_Boolean TDataStd_TreeNode::HasFather  )  const [inline]
 

Standard_Boolean TDataStd_TreeNode::HasFirst  )  const [inline]
 

Standard_Boolean TDataStd_TreeNode::HasLast  )  const [inline]
 

Standard_Boolean TDataStd_TreeNode::HasNext  )  const [inline]
 

Standard_Boolean TDataStd_TreeNode::HasPrevious  )  const [inline]
 

Standard_EXPORT const Standard_GUID& TDataStd_TreeNode::ID  )  const [virtual]
 

Implements TDF_Attribute.

Standard_EXPORT Standard_Boolean TDataStd_TreeNode::InsertAfter const Handle(TDataStd_TreeNode)&  Node  ) 
 

Standard_EXPORT Standard_Boolean TDataStd_TreeNode::InsertBefore const Handle(TDataStd_TreeNode)&  Node  ) 
 

Standard_EXPORT Standard_Boolean TDataStd_TreeNode::IsAscendant const Handle(TDataStd_TreeNode)&  of  )  const
 

Standard_EXPORT Standard_Boolean TDataStd_TreeNode::IsChild const Handle(TDataStd_TreeNode)&  of  )  const
 

Standard_EXPORT Standard_Boolean TDataStd_TreeNode::IsDescendant const Handle(TDataStd_TreeNode)&  of  )  const
 

Standard_EXPORT Standard_Boolean TDataStd_TreeNode::IsFather const Handle(TDataStd_TreeNode)&  of  )  const
 

Standard_EXPORT Standard_Boolean TDataStd_TreeNode::IsRoot  )  const
 

Standard_EXPORT Handle_TDataStd_TreeNode TDataStd_TreeNode::Last  ) 
 

virtual Standard_EXPORT Handle_TDF_Attribute TDataStd_TreeNode::NewEmpty  )  const [virtual]
 

Implements TDF_Attribute.

Standard_EXPORT Handle_TDataStd_TreeNode TDataStd_TreeNode::Next  )  const
 

virtual Standard_EXPORT void TDataStd_TreeNode::Paste const Handle(TDF_Attribute)&  into,
const Handle(TDF_RelocationTable)&  RT
const [virtual]
 

Implements TDF_Attribute.

Standard_EXPORT Standard_Boolean TDataStd_TreeNode::Prepend const Handle(TDataStd_TreeNode)&  Child  ) 
 

Standard_EXPORT Handle_TDataStd_TreeNode TDataStd_TreeNode::Previous  )  const
 

virtual Standard_EXPORT void TDataStd_TreeNode::References const Handle(TDF_DataSet)&  aDataSet  )  const [virtual]
 

Reimplemented from TDF_Attribute.

Standard_EXPORT Standard_Boolean TDataStd_TreeNode::Remove  ) 
 

virtual Standard_EXPORT void TDataStd_TreeNode::Restore const Handle(TDF_Attribute)&  with  )  [virtual]
 

Implements TDF_Attribute.

Standard_EXPORT Handle_TDataStd_TreeNode TDataStd_TreeNode::Root  )  const
 

static Standard_EXPORT Handle_TDataStd_TreeNode TDataStd_TreeNode::Set const TDF_Label L,
const Standard_GUID &  ExplicitTreeID
[static]
 

static Standard_EXPORT Handle_TDataStd_TreeNode TDataStd_TreeNode::Set const TDF_Label L  )  [static]
 

Standard_EXPORT void TDataStd_TreeNode::SetFather const Handle(TDataStd_TreeNode)&  F  ) 
 

Standard_EXPORT void TDataStd_TreeNode::SetFirst const Handle(TDataStd_TreeNode)&  F  ) 
 

Standard_EXPORT void TDataStd_TreeNode::SetLast const Handle(TDataStd_TreeNode)&  F  ) 
 

Standard_EXPORT void TDataStd_TreeNode::SetNext const Handle(TDataStd_TreeNode)&  F  ) 
 

Standard_EXPORT void TDataStd_TreeNode::SetPrevious const Handle(TDataStd_TreeNode)&  F  ) 
 

Standard_EXPORT void TDataStd_TreeNode::SetTreeID const Standard_GUID &  explicitID  ) 
 


Field Documentation

TDataStd_PtrTreeNode TDataStd_TreeNode::myFather [private]
 

TDataStd_PtrTreeNode TDataStd_TreeNode::myFirst [private]
 

TDataStd_PtrTreeNode TDataStd_TreeNode::myLast [private]
 

TDataStd_PtrTreeNode TDataStd_TreeNode::myNext [private]
 

Reimplemented from TDF_Attribute.

TDataStd_PtrTreeNode TDataStd_TreeNode::myPrevious [private]
 

Standard_GUID TDataStd_TreeNode::myTreeID [private]
 


The documentation for this class was generated from the following files:
Generated on Mon Aug 25 14:15:30 2008 for OpenCASCADE by  doxygen 1.4.1