oaOccTraverser Class Reference

Inheritance diagram for oaOccTraverser:

oaOccProducer


Public Methods

 oaOccTraverser (oaOccurrence *topOcc)
 ~oaOccTraverser ()
oaUInt4flags ()
const oaOccurrencegetTopOccurrence () const
void traverse ()
void abort ()
virtual oaBoolean startInst (oaOccInst *inst)
virtual void endInst (oaOccInst *inst)
virtual oaBoolean startOccurrence (oaOccurrence *occ)
virtual void endOccurrence (oaOccurrence *occ)

Detailed Description

The oaOccTraverser class implements a hierarchical traversal for connectivity objects in the occurrence domain. oaOccTraverser is not an abstract class, however applications may choose to derive from it in order to perform specific actions on the objects being traversed.

The traverse() function initiates the traversal, which can be controlled by a set of flags bits accessed by the flags() function. During the traversal, the virtual functions process*() are called for each kind of connectivity object.

To control the expansion of the occurrence hierarchy, the application must override the virtual function startInst(), which is called just before the contents of an instance in the hierarchy are produced.


Constructor & Destructor Documentation

oaOccTraverser::oaOccTraverser oaOccurrence *    topOcc
 

This is the constructor for the oaOccTraverser class. It creates and initializes the producer.

Parameters:
topOcc The root of the occurrence subtree to be traversed.

oaOccTraverser::~oaOccTraverser  
 

This is the destructor for the oaOccTraverser class. It frees all storage associated with the producer.


Member Function Documentation

void oaOccTraverser::abort  
 

This function aborts the current traversal as soon as possible, returning control to the caller.

void oaOccTraverser::endInst oaOccInst *    inst [virtual]
 

This virtual function is called just after the contents of an instance's master in the hierarchy have been produced.

Parameters:
inst The instance has been visited.

void oaOccTraverser::endOccurrence oaOccurrence *    occ [virtual]
 

This virtual function is called just after the contents of an occurrence in the hierarchy have been produced.

Parameters:
occ The occurrence has been visited.

oaUInt4 & oaOccTraverser::flags  
 

This function gives read/write access to a set of flags that control the traversal.

These flags are:

  • oavOccTraversePostOrder use a postorder traversal rather than preorder
  • oavOccTraverseDesigns descend into occurrences of other designs
  • oavOccTraverseImplicit allows processing of implicit objects

const oaOccurrence * oaOccTraverser::getTopOccurrence   const
 

This function returns the root of the occurrence subtree to be traversed.

oaBoolean oaOccTraverser::startInst oaOccInst *    inst [virtual]
 

This virtual function is called just before the contents of an instance in the hierarchy is produced. The caller can override this function and return a boolean indicating whether or not the traversal should descend into the instance's master. The default implementation returns true, which means the transversal should descend into the instance's master.

Parameters:
inst The instance being visited.

oaBoolean oaOccTraverser::startOccurrence oaOccurrence *    occ [virtual]
 

This virtual function is called just before the contents of an occurrence in the hierarchy is produced. The caller can override this function and return a boolean indicating whether or not the contents of this particular occurrence will be produced or not.

Parameters:
occ The occurrence being visited.

void oaOccTraverser::traverse  
 

This function causes this traverser object to start generating connectivity objects in the specified occurrence hierarchy.


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

Return to top of page