Open CASCADE Technology
6.9.1
|
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_Type > | Value () const |
Returns the type corresponding to the current position of the iterator. More... | |
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.
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.
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.
|
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.