Open CASCADE Technology  6.9.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. More...

#include <Standard_AncestorIterator.hxx>

Public Member Functions

 Standard_AncestorIterator (const Standard_AncestorIterator &anOther)
 The copy constructor for a AncestorIterator . More...
 
 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. More...
 
void Assign (const Standard_AncestorIterator &anOther)
 Assigns an AncestorIterator from another AncestorIterator. More...
 
void operator= (const Standard_AncestorIterator &anOther)
 
Standard_Boolean More () const
 Returns True if there are other ancestors. More...
 
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. More...
 
Standard_AncestorIterator Iterator () const
 Returns an <AncestorIterator> corresponding to the current position of the iterator. If there are no more Ancestors. More...
 
Handle< Standard_TypeValue () const
 Returns the type corresponding to the current position of the iterator. More...
 

Detailed Description

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.

Constructor & Destructor Documentation

Standard_AncestorIterator::Standard_AncestorIterator ( const Standard_AncestorIterator anOther)

The copy constructor for a AncestorIterator .

Standard_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.

Member Function Documentation

void Standard_AncestorIterator::Assign ( const Standard_AncestorIterator anOther)

Assigns an AncestorIterator from another AncestorIterator.

Standard_AncestorIterator Standard_AncestorIterator::Iterator ( ) const

Returns an <AncestorIterator> corresponding to the current position of the iterator. If there are no more Ancestors.

Standard_Boolean Standard_AncestorIterator::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 Standard_AncestorIterator::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.

void Standard_AncestorIterator::operator= ( const Standard_AncestorIterator anOther)
inline
Handle< Standard_Type > Standard_AncestorIterator::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.


The documentation for this class was generated from the following file: