首页 / design / oaOccInst

oaOccInst

模块: oapy._oa._design 导入: from oapy._oa import _design

概览

oaOccInstoapy 中可用,可通过 _design 模块访问。

本页汇总 oaOccInst 当前在 oapy 中可用的 Python 接口。

详细说明

The oaOccInst class is an abstract base class for occurrence instances。 An occurrence instance is the reflection of either an oaModInst or an oaInst in the occurrence hierarchy。 The occurrence hierarchy is the completely unfolded version of the union of the module and block hierarchies。 See Understanding OpenAccess Embedded Module Hierarchy in the Programmers Guide for a discussion of the occurrence hierarchy。 An oaOccInst may correspond to an oaModInst , an oaInst , or both: If the occInst is an occurrence of an oaModModuleInst (it will be an oaOccModuleScalarInst , or an oaOccModuleVectorInst ) then it will only have a corresponding oaModInst 。 If the occInst is an occurrence of an oaModInst that is not visible in the block domain, then it will only have a corresponding oaModInst 。 If the occInst is an occurrence of an oaInst that is not visible in the module domain, then it will only have a corresponding oaInst 。 It will be either an oaOccScalarInst an oaOccVectorInst or an oaOccArrayInst in this case。 Otherwise the occInst will have both a corresponding oaModInst and a corresponding oaInst 。 An oaOccInst will always have an oaOccurrence that is its parent。 An oaOccInst will always have an oaOccurrence that is its master except at the frontier which is the bottom level of the occurrence hierarchy。 All occurrence instances have names。 These names are non-hierarchical names that are scoped relative to the parent occurrence。 For an occInst that is an occurrence of an oaModInst its name is the name of the oaModInst 。 For an occurrence of an oaInst that doesn't have an oaModInst (a physical-only instance) its name is the name of that oaInst 。 OccInsts always have an InstHeader which is one of oaOccInstHeader or oaOccModuleInstHeader 。 This header contains the attributes that are common for all of the occInsts with the same master within the same parent occurrence。 The oaOccInst class can be observed by deriving from oaObserver

方法总览

状态 Python 调用
obj.getMasterOccurrence(expand=true)
obj.getName(name)
obj.getName(ns, name)
obj.getPathName(pathName)
obj.getPathName(ns, pathName)
obj.getInst()
obj.getModInst()
obj.getNumBits()
obj.isBound()
obj.isImplicit()
obj.isOccDesignInst()
obj.isOccModuleInst()
obj.usesTermPositions()
obj.getInstTerms(filterFlags=oacInstTermIterNotImplicit)
obj.getAssignments()
_design.oaOccInst.find(occurrence, name)

方法说明

obj.getMasterOccurrence(expand=true)

绑定状态: 已绑定

Python 调用: obj.getMasterOccurrence(expand=true)

This function attempts to return the master associated with this instance。 If expand is true and the instance cannot be bound, NULL is returned。 An exception will be thrown if the instance is a vectorInst or an implicit vectorInstBit, as there is no occurrence hierarchy beneath those types of instances。 An application will generally make a pass over the occurrence hierarchy calling getMasterOccurrence with expand set to true to expand the hierarchy to the desired depth。 Later traversals will set expand to false so the traversal does not cause additional expansion。 See oaOccTraverser for a utility class that can simplify walking the occurrence hierarchy。

参数

  • expand: Specifies whether to expand the occurrence hierarchy to include the master occurrence for this instance, if it has not yet been expanded in the current session。

异常

  • oacCannotGetVectorInstOccurrence
  • oacCannotGetImplicitInstOccurrence

Python 示例

from oapy._oa import _design

# assume obj is a oaOccInst
obj.getMasterOccurrence(expand=true)

obj.getName(name)

绑定状态: 已绑定

Python 调用: obj.getName(name)

This function fills out name with the name of this instance。 The name is mapped according to the specified nameSpace。

参数

  • ns: The nameSpace used to map the name。
  • name: The returned instance name。

Python 示例

from oapy._oa import _design

# assume obj is a oaOccInst
obj.getName(name)

obj.getName(ns, name)

绑定状态: 已绑定

Python 调用: obj.getName(ns, name)

This function fills out name with the name of this instance。

参数

  • name: The returned instance name。

Python 示例

from oapy._oa import _design

# assume obj is a oaOccInst
obj.getName(ns, name)

obj.getPathName(pathName)

绑定状态: 已绑定

Python 调用: obj.getPathName(pathName)

This function returns the full path name of this instance in the specified nameSpace in the specified pathName string。 The pathName is relative to the top occurrence in the occurrence hierarchy containing this instance。

参数

  • ns: The nameSpace in which to return the name。
  • pathName: The path name of the instance。

Python 示例

from oapy._oa import _design

# assume obj is a oaOccInst
obj.getPathName(pathName)

obj.getPathName(ns, pathName)

绑定状态: 已绑定

Python 调用: obj.getPathName(ns, pathName)

This function fills out pathName with the full path name of this instance, relative to the top occurrence in the occurrence hierarchy containing this instance。

参数

  • pathName: The path name of the instance。

Python 示例

from oapy._oa import _design

# assume obj is a oaOccInst
obj.getPathName(ns, pathName)

obj.getInst()

绑定状态: 已绑定

Python 调用: obj.getInst()

This function returns the corresponding instance in the block domain。 NULL will be returned if the master design for this instance does not have a top block。 在 oaOccArrayInst、oaOccScalarInst、oaOccVectorInst 和 oaOccVectorInstBit 中重新实现。

返回

  • A pointer to an oaInst。

Python 示例

from oapy._oa import _design

# assume obj is a oaOccInst
obj.getInst()

obj.getModInst()

绑定状态: 已绑定

Python 调用: obj.getModInst()

This function returns the corresponding instance in the module domain。 NULL will be returned if this instance is an occurrence of a physical-only instance。 在 oaOccModuleInst、oaOccModuleScalarInst、oaOccModuleVectorInst、oaOccModuleVectorInstBit、oaOccScalarInst、oaOccVectorInst 和 oaOccVectorInstBit 中重新实现。

返回

  • A pointer to an oaModInst。

Python 示例

from oapy._oa import _design

# assume obj is a oaOccInst
obj.getModInst()

obj.getNumBits()

绑定状态: 已绑定

Python 调用: obj.getNumBits()

This function returns the number of bits of this instance。 This function always returns '1' for scalar and array instances。 The function can return '1' or more for vector instances。

Python 示例

from oapy._oa import _design

# assume obj is a oaOccInst
obj.getNumBits()

obj.isBound()

绑定状态: 已绑定

Python 调用: obj.isBound()

This function returns a boolean value that indicates if this instance is currently bound to its master。 An instance is bound to its master if some traversal is made from the instance to the master or an object in the master。 If the instance is bound, then its master is in memory and the linkage from the instance to the master is established。

返回

  • true if the instance is bound, otherwise false。

Python 示例

from oapy._oa import _design

# assume obj is a oaOccInst
obj.isBound()

obj.isImplicit()

绑定状态: 已绑定

Python 调用: obj.isImplicit()

This function returns a boolean value that indicates if this instance is implicit, having been automatically created as a result of the creation of a vectorInst。

Python 示例

from oapy._oa import _design

# assume obj is a oaOccInst
obj.isImplicit()

obj.isOccDesignInst()

绑定状态: 已绑定

Python 调用: obj.isOccDesignInst()

This function determines if this object is an instance of one of the classes derived from the oaOccDesignInst class。 The function returns a boolean value of true if the oaOccInst is an oaOccDesignInst 。

Python 示例

from oapy._oa import _design

# assume obj is a oaOccInst
obj.isOccDesignInst()

obj.isOccModuleInst()

绑定状态: 已绑定

Python 调用: obj.isOccModuleInst()

This function determines if this object is an instance of one of the classes derived from the oaOccModuleInst class。 The function returns a boolean value of true if the oaOccInst is an oaOccModuleInst 。

Python 示例

from oapy._oa import _design

# assume obj is a oaOccInst
obj.isOccModuleInst()

obj.usesTermPositions()

绑定状态: 已绑定

Python 调用: obj.usesTermPositions()

This function returns a boolean indicating how connections to this instance have been made。 If the instTerms associated with this instance connect to terminal positions, this function returns 'true'。 Otherwise, this function returns 'false'。 Note that if the collection of instTerms for this instance is empty, this function will also return 'false'。

Python 示例

from oapy._oa import _design

# assume obj is a oaOccInst
obj.usesTermPositions()

obj.getInstTerms(filterFlags=oacInstTermIterNotImplicit)

绑定状态: 已绑定

Python 调用: obj.getInstTerms(filterFlags=oacInstTermIterNotImplicit)

This function returns a collection of occurrence instTerms associated with this instance。

参数

  • filterFlags: Specifies what the collection contains。 The bits flags are defined as follows:。

Python 示例

from oapy._oa import _design

# assume obj is a oaOccInst
obj.getInstTerms(filterFlags=oacInstTermIterNotImplicit)

obj.getAssignments()

绑定状态: 已绑定

Python 调用: obj.getAssignments()

This function returns a collection of occurrence assignments associated with this instance。

Python 示例

from oapy._oa import _design

# assume obj is a oaOccInst
obj.getAssignments()

_design.oaOccInst.find(occurrence, name)

绑定状态: 已绑定

Python 调用: _design.oaOccInst.find(occurrence, name)

This function searches the specified occurrence looking for an instance with the specified name。 If name is hierarchical, this function will descend into lower levels of occurrence hierarchy, expanding the hierarchy and binding the master designs as needed。 The instance is returned if found, otherwise NULL is returned。

参数

  • occurrence: The occurrence domain to search。
  • name: The instance name to find。

返回

  • A pointer to an oaOccInst。

Python 示例

from oapy._oa import _design

_design.oaOccInst.find(occurrence, name)