oaRegionQuery Class Reference

Inheritance diagram for oaRegionQuery:

oaBlockageQuery oaBoundaryQuery oaFigGroupQuery oaGuideQuery oaInstQuery oaLayerRangeBlockageQuery oaMarkerQuery oaPlacementBlockageQuery oaRowQuery oaShapeQuery oaSteinerQuery oaViaQuery


Public Methods

virtual ~oaRegionQuery ()
const oaDesigngetTopDesign () const
const oaBoxgetRegion () const
const oaTransformgetCurrentTransform () const
const oaBoxgetCurrentRegion () const
void getHierPath (oaHierPath &hierPath) const
oaDist getFilterSize () const
oaUInt4 getStartLevel () const
oaUInt4 getStopLevel () const
void abort ()
virtual oaBoolean startRef (oaRef *ref, oaUInt4 row=0, oaUInt4 col=0)
virtual void endRef (oaRef *ref, oaUInt4 row=0, oaUInt4 col=0)

Static Public Methods

void init (const oaString &plugInName)
void getPlugInName (oaString &plugInName)

Friends

class oaBlockTbl

Detailed Description

The oaRegionQuery class is an abstract class that is the parent class to query classes for each type of figure. These classes implement a hierarchical query for figures within a specified rectangular region of a design hierarchy. RegionQuery is used to drive the graphical display of design hierarchies as well as find the set of objects that are neighbors to a given object for analysis.

A Region Query descends through a design hierarchy from the top design with which it is constructed, producing all objects of a specified type in the specified query region. It should be noted that Region Query never opens instance masters that are not already open. In other words, it will not process the contents of instances unless their masters are already open. This is true regardless of the specified startLevel and stopLevel. If the caller wants to ensure that a specified number of levels of design hierarchy are processed by Region Query, the caller can precede the call to oaBlock::initForRegionQuery with a call to oaDesign::openHier().

Applications use oaRegionQuery by creating their own class that derives from one of the oaRegionQuery subclasses, then implementing functions in their class for virtual functions declared in either the base or the derived oaRegionQuery class. These user-implemented functions will be called by the database to hand off the figures found in a specified region.

A region query is initiated by a query() function in the figure-specific RegionQuery class, for example by oaShapeQuery::query(). The figures are then handed to the application by calls to the implemented virtual function with a name of the form queryFigure(), such as oaBoundaryQuery::queryBoundary().

Attributes are provided to allow applications to control how the query is performed. For example, the startLevel and stopLevel attributes allow applications to control the depth of hierarchy traversal, and filterSize allows applications to eliminate objects below a specified size threshold.

If the application needs to keep track of where it is in the hierarchy, it can implement the startRef() member function, which returns a boolean value that can be set to FALSE to tell the database not to continue into this portion of the hierarchy.


Constructor & Destructor Documentation

oaRegionQuery::~oaRegionQuery   [virtual]
 

This function destroys this oaRegionQuery instance.


Member Function Documentation

void oaRegionQuery::abort  
 

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

void oaRegionQuery::endRef oaRef *    ref,
oaUInt4    row = 0,
oaUInt4    col = 0
[virtual]
 

This function is called by the query, if startRef returned true for the reference and after the specified reference is processed. If the reference is an arrayInst, each element of the array that overlaps the query region will be processed separately, in which case 'row' and 'col' indicate which element is being processed.

If the maximum dimension of the ref's master is smaller than the filter size specified for the query, this reference will not be processed. In this case, neither startRef, nor endRef will be called for the reference.

The user may override this function to be notified of the event.

Parameters:
ref The pointer to an oaRef.
row The row index of the arrayInst.
col The col index of the arrayInst.

const oaBox & oaRegionQuery::getCurrentRegion   const
 

This function returns the current region that is being searched in the reference frame of the design that is currently being processed. If the query region specified by the caller completely contains the design that is being processed, the current region will be the bounding box of the top block of that design.

const oaTransform & oaRegionQuery::getCurrentTransform   const
 

This function returns the current transformation of this query object in the reference frame of the design currently being processed.

oaUInt4 oaRegionQuery::getFilterSize   const
 

This function returns the size of the filter for the query.

void oaRegionQuery::getHierPath oaHierPath &    hierPath const
 

This function returns the current hierarchical path of this query object.

Parameters:
hierPath The returned hierarchical path.

void oaRegionQuery::getPlugInName oaString &    plugInName [static]
 

This function returns the name of the current plugIn used by region query. If there is no plugIn is initialized through the init(), the return value will an empty string.

Parameters:
plugInName The returned plugIn name.

const oaBox & oaRegionQuery::getRegion   const
 

This function returns the region that is being searched to produce objects in a design hierarchy. This is region specified through the query call. If a transform is specified for the query, the specified region is transformed by the specified transform which is then returned by this function. The bBox returned by this function does not change till the query is completed.

oaUInt4 oaRegionQuery::getStartLevel   const
 

This function returns the start search level of the current query.

oaUInt4 oaRegionQuery::getStopLevel   const
 

This function returns the stop search level of the current query.

const oaDesign * oaRegionQuery::getTopDesign   const
 

This function returns the top design from which this query was started.

void oaRegionQuery::init const oaString &    plugInName [static]
 

This function initialized the plugIn for oaRegionQuery to use. An application can specify the default OpenAccess region query plugIn "oaRQSystem" or a customized one.

Parameters:
plugInName The name of the plugIn.
Exceptions:
oacRegionQueryAlreadyInitialized 

oaBoolean oaRegionQuery::startRef oaRef *    ref,
oaUInt4    row = 0,
oaUInt4    col = 0
[virtual]
 

This function is called by the query just before the specified reference is processed. The user may override this function to be notified of the event. If desired, the user may return false from startRef(), indicating that the query should not descend into the reference's master. This is used to control if certain parts of the hierarchy gets traversed or not. The default implementation returns true, which means the query should descend into the ref's master.

If the reference is an arrayInst, each element of the array that overlaps the query region will be processed separately, in which case 'row' and 'col' indicate which element is being processed.

If the maximum dimension of the ref's master is smaller than the filter size specified for the query, this reference will not be processed. In this case, startRef will not be called for the reference.

Parameters:
ref The pointer to an oaRef.
row The row index of the arrayInst.
col The col index of the arrayInst.


Friends And Related Function Documentation

friend class oaBlockTbl [friend]
 


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

Return to top of page