oaRegionQuery
模块: oapy._oa._design
导入: from oapy._oa import _design
概览
oaRegionQuery 在 oapy 中可用,可通过 _design 模块访问。
本页汇总 oaRegionQuery 当前在 oapy 中可用的 Python 接口。
详细说明
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。
方法总览
| 状态 | Python 调用 |
|---|---|
| ✅ | obj.getTopDesign() |
| ✅ | obj.getRegion() |
| ✅ | obj.getCurrentTransform() |
| ✅ | obj.getCurrentRegion() |
| ✅ | obj.getHierPath(hierPath) |
| ✅ | obj.getFilterSize() |
| ✅ | obj.getStartLevel() |
| ✅ | obj.getStopLevel() |
| ✅ | obj.abort() |
| ✅ | obj.startRef(ref, row=0, col=0) |
| ✅ | obj.endRef(ref, row=0, col=0) |
| ✅ | _design.oaRegionQuery.init(plugInName) |
| ✅ | _design.oaRegionQuery.getPlugInName(plugInName) |
方法说明
obj.getTopDesign()
绑定状态: 已绑定
Python 调用: obj.getTopDesign()
This function returns the top design from which this query was started。
Python 示例
from oapy._oa import _design
# assume obj is a oaRegionQuery
obj.getTopDesign()
obj.getRegion()
绑定状态: 已绑定
Python 调用: obj.getRegion()
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。
Python 示例
from oapy._oa import _design
# assume obj is a oaRegionQuery
obj.getRegion()
obj.getCurrentTransform()
绑定状态: 已绑定
Python 调用: obj.getCurrentTransform()
This function returns the current transformation of this query object in the reference frame of the design currently being processed。
Python 示例
from oapy._oa import _design
# assume obj is a oaRegionQuery
obj.getCurrentTransform()
obj.getCurrentRegion()
绑定状态: 已绑定
Python 调用: obj.getCurrentRegion()
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。
Python 示例
from oapy._oa import _design
# assume obj is a oaRegionQuery
obj.getCurrentRegion()
obj.getHierPath(hierPath)
绑定状态: 已绑定
Python 调用: obj.getHierPath(hierPath)
This function returns the current hierarchical path of this query object。
参数
hierPath: The returned hierarchical path。
Python 示例
from oapy._oa import _design
# assume obj is a oaRegionQuery
obj.getHierPath(hierPath)
obj.getFilterSize()
绑定状态: 已绑定
Python 调用: obj.getFilterSize()
This function returns the size of the filter for the query。
Python 示例
from oapy._oa import _design
# assume obj is a oaRegionQuery
obj.getFilterSize()
obj.getStartLevel()
绑定状态: 已绑定
Python 调用: obj.getStartLevel()
This function returns the start search level of the current query。
Python 示例
from oapy._oa import _design
# assume obj is a oaRegionQuery
obj.getStartLevel()
obj.getStopLevel()
绑定状态: 已绑定
Python 调用: obj.getStopLevel()
This function returns the stop search level of the current query。
Python 示例
from oapy._oa import _design
# assume obj is a oaRegionQuery
obj.getStopLevel()
obj.abort()
绑定状态: 已绑定
Python 调用: obj.abort()
This function aborts the current query as soon as possible, returning control to the caller。
Python 示例
from oapy._oa import _design
# assume obj is a oaRegionQuery
obj.abort()
obj.startRef(ref, row=0, col=0)
绑定状态: 已绑定
Python 调用: obj.startRef(ref, row=0, col=0)
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。
参数
ref: The pointer to an oaRef 。row: The row index of the arrayInst。col: The col index of the arrayInst。
Python 示例
from oapy._oa import _design
# assume obj is a oaRegionQuery
obj.startRef(ref, row=0, col=0)
obj.endRef(ref, row=0, col=0)
绑定状态: 已绑定
Python 调用: obj.endRef(ref, row=0, col=0)
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。
参数
ref: The pointer to an oaRef 。row: The row index of the arrayInst。col: The col index of the arrayInst。
Python 示例
from oapy._oa import _design
# assume obj is a oaRegionQuery
obj.endRef(ref, row=0, col=0)
_design.oaRegionQuery.init(plugInName)
绑定状态: 已绑定
Python 调用: _design.oaRegionQuery.init(plugInName)
This function initialized the plugIn for oaRegionQuery to use。 An application can specify the default OpenAccess region query plugIn "oaRQSystem" or a customized one。
参数
plugInName: The name of the plugIn。
异常
oacRegionQueryAlreadyInitialized。
Python 示例
from oapy._oa import _design
_design.oaRegionQuery.init(plugInName)
_design.oaRegionQuery.getPlugInName(plugInName)
绑定状态: 已绑定
Python 调用: _design.oaRegionQuery.getPlugInName(plugInName)
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。
参数
plugInName: The returned plugIn name。
Python 示例
from oapy._oa import _design
_design.oaRegionQuery.getPlugInName(plugInName)