Open CASCADE Technology 6.6.0
Public Member Functions
Standard_AncestorIterator Class Reference

The class <AncestorIterator> is a iterator which provides
information about inheritance.
An AncestorIterator object is used to scan sequentially the
hierarchy of a type object from its direct super-type to the root.

Warning:
The near parents are first.

#include <Standard_AncestorIterator.hxx>

Public Member Functions

 Standard_AncestorIterator (const Standard_AncestorIterator &anOther)
 The copy constructor for a AncestorIterator .


 Standard_AncestorIterator (const Handle< Standard_Type > &aType)
 Creates an iterator on the type <aType>.
Set the iterator at the beginning of the ancestors;
this means near parents are first.

void Assign (const Standard_AncestorIterator &anOther)
 Assigns an AncestorIterator from another AncestorIterator.


void operator= (const Standard_AncestorIterator &anOther)
Standard_Boolean More () const
 Returns True if there are other ancestors.

Example:

Handle(Standard_Type) type;
Standard_AncestorIterator super(TYPE(Geom_Circle));
while(super.More()) { type = super.Value();
super.Next();
}

void Next ()
 Moves the position of the iterator to the next super-type.
If the current position corresponds to a root class, it becomes undefined.

Exceptions:
Standard_NoMoreObject if the position of the iterator is undefined
If there are no more ancestors.

Standard_AncestorIterator Iterator () const
 Returns an <AncestorIterator> corresponding to the current position
of the iterator.
If there are no more Ancestors.

Handle_Standard_Type Value () const
 Returns the type corresponding to the current position of
the iterator.

Example:

Standard_AncestorIterator super(TYPE(Geom_Circle));
assert (super.Value() == TYPE(Geom_Conic));

Exceptions:
Standard_NoSuchObject if the position of the iterator is undefined.
If there are no more ancestors.


Constructor & Destructor Documentation

Standard_AncestorIterator::Standard_AncestorIterator ( const Standard_AncestorIterator anOther)
Standard_AncestorIterator::Standard_AncestorIterator ( const Handle< Standard_Type > &  aType)

Member Function Documentation

void Standard_AncestorIterator::Assign ( const Standard_AncestorIterator anOther)
Standard_AncestorIterator Standard_AncestorIterator::Iterator ( ) const
Standard_Boolean Standard_AncestorIterator::More ( ) const
void Standard_AncestorIterator::Next ( )
void Standard_AncestorIterator::operator= ( const Standard_AncestorIterator anOther) [inline]
Handle_Standard_Type Standard_AncestorIterator::Value ( ) const

The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines