首页 / base / oaConstraintGroup

oaConstraintGroup

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

概览

oaConstraintGroupoapy 中可用,可通过 _base 模块访问。

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

详细说明

The oaConstraintGroup class implements an ordered collection of constraint and constraint group objects。 A number of oaConstraintGroups are built into OpenAccess databases。 Every object that can have constraints has a built-in constraint group that is returned by oaObject::getConstraintGroup 。 The classes oaTech , oaRoute , oaNet , oaModule , oaGroup , oaFigGroup , oaDesign , oaBoundary , and oaBlock are container classes that have an additional default constraint group that is returned by getDefaultConstraintGroup on that class。 An oaTech also has a foundry constraint group that is returned by oaTech::getFoundryRules 。 Applications also can explicitly create constraint groups to organize the access to their constraints and to provide a way to reuse a set of constraints。 An application creates a constraint group by using the oaConstraintGroup::create function and adds objects to constraint groups by using the oaConstraintGroupMem::create function。 The members of a constraint group are ordered and are intended to be searched in a depth-first manner。 You can change the order of members in a constraintGroup by using oaConstraintGroupMem::moveToFirst and oaConstraintGroupMem::moveAfter functions。 Constraint groups can be constructed in the design, technology and wafer databases。 A constraint group can include members that are individual constraints, or that are themselves constraint groups。 When talking about constraint groups, it is useful to think in terms of a parent constraint group, which includes individual constraints and other constraint groups as members。 An individual constraint must be in the same database as its parent constraint group。 A constraint group in a design or technology database may be added to a parent constraint group in a design database。 In addition, a constraint group in a design or technology database can have a member that is a user-defined constraint group in a referenced technology database。 See Using Technology Databases in the Programmers Guide for information about referenced technology databases。 Wafer database constraint groups can only include members in their own database。 All constraint groups have a unique name within a database (or across referenced technology databases)。 The database validates that no other group has the same name。 The database also ensures that no other group is ever assigned the same name。 The collection of constraint groups in a given database is implemented by the getConstraintGroups function in each database class。 See oaDesign::getConstraintGroups , and oaTech::getConstraintGroups 。 The oaConstraintGroup class can be observed by deriving from oaObserver

方法总览

状态 Python 调用
obj.getDef()
obj.getOperator()
obj.destroy()
obj.override()
obj.getName(name)
obj.getOwner()
obj.getMembers()
_base.oaConstraintGroup.getConstraints(def=NULL)
_base.oaConstraintGroup.create(database, name, override=false)
_base.oaConstraintGroup.create(database, name, override, op)
_base.oaConstraintGroup.create(database, def, name, override=false, op=oacPrecedenceGroupOperator)
_base.oaConstraintGroup.create(def, object, override=false, op=oacPrecedenceGroupOperator)
_base.oaConstraintGroup.find(database, name)
_base.oaConstraintGroup.find(database, name, local)
_base.oaConstraintGroup.find(def, object)

方法说明

obj.getDef()

绑定状态: 已绑定

Python 调用: obj.getDef()

This function returns a pointer to the oaConstraintGroupDef that is associated with this constraint group。

Python 示例

from oapy._oa import _base

# assume obj is a oaConstraintGroup
obj.getDef()

obj.getOperator()

绑定状态: 已绑定

Python 调用: obj.getOperator()

This function returns the constraint group operator associated with this constraint group。

Python 示例

from oapy._oa import _base

# assume obj is a oaConstraintGroup
obj.getOperator()

obj.destroy()

绑定状态: 已绑定

Python 调用: obj.destroy()

This function destroys the constraint group specified。 The constraints in the group are not destroyed, but all of the group's members are。 If the constraint group being destroyed is a member or another constraint group, that constraint group member is destroyed as well。

Python 示例

from oapy._oa import _base

# assume obj is a oaConstraintGroup
obj.destroy()

obj.override()

绑定状态: 已绑定

Python 调用: obj.override()

This function returns a boolean indicating whether the constraints in this group should override tighter constraints deeper in the precedence hierarchy。

Python 示例

from oapy._oa import _base

# assume obj is a oaConstraintGroup
obj.override()

obj.getName(name)

绑定状态: 已绑定

Python 调用: obj.getName(name)

This function returns the name of this constraint group。

参数

  • name: The returned string name。

Python 示例

from oapy._oa import _base

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

obj.getOwner()

绑定状态: 已绑定

Python 调用: obj.getOwner()

For a constraint group associated with a particular owning object, this member function returns a pointer to that owning object。 Specifically, constraint groups returned by the following functions will have their containing object returned by getOwner: oaObject::getConstraintGroup getDefaultConstraintGroup of various classes oaTech::getFoundryRules For constraint groups not owned by any object, getOwner returns NULL。 Note that constraint groups created with oaConstraintGroup::create will have a NULL owner。

Python 示例

from oapy._oa import _base

# assume obj is a oaConstraintGroup
obj.getOwner()

obj.getMembers()

绑定状态: 已绑定

Python 调用: obj.getMembers()

This function returns a collection of all of the members in this constraint group。

Python 示例

from oapy._oa import _base

# assume obj is a oaConstraintGroup
obj.getMembers()

_base.oaConstraintGroup.getConstraints(def=NULL)

绑定状态: 已绑定

Python 调用: _base.oaConstraintGroup.getConstraints(def=NULL)

This function returns a collection of constraints in the this group whose definition matches the specified def。 If no definition is specified, all simple constraints in this group are returned。 Note that this function only searches this group and its subgroups。 Referenced technology databases are not searched。

参数

  • def: The constraint definition to search for。

Python 示例

from oapy._oa import _base

_base.oaConstraintGroup.getConstraints(def=NULL)

_base.oaConstraintGroup.create(database, name, override=false)

绑定状态: 已绑定

Python 调用: _base.oaConstraintGroup.create(database, name, override=false)

This function creates a new constraint group on the specified object。 The override parameter is a boolean indicating whether the constraints in this group should override potentially tighter constraints deeper in the precedence hierarchy。 The constraint group definition may be built-in or it may be user defined。 Constraint groups created with this API are named automatically and can be found using the constraint group definition。 Because constraint groups created with this API are scoped by the constraint group definition and database, constraint groups that are in referenced oaTechs can be overridden using the same def。 Note that only one constraint group can be created for any given oaObject/oaConstraintGroupDef pair。

参数

  • def: The constraint group definition。
  • object: The object to which this constraint group applies。
  • override: A boolean flag indicating whether the constraint associated with this constraint group overrides tighter constraints that are deeper in the precedence hierarchy。
  • op: An oaConstraintGroupOperatorEnum value。

异常

  • oacInvalidObjForObjectDef
  • oacObjectHasConstraintGroupOfSameType
  • oacInvalidOperationOnUserDefinedConstraintGroupType

Python 示例

from oapy._oa import _base

_base.oaConstraintGroup.create(database, name, override=false)

_base.oaConstraintGroup.create(database, name, override, op)

绑定状态: 已绑定

Python 调用: _base.oaConstraintGroup.create(database, name, override, op)

This function creates a new constraint group on the specified object with the specified name。 The override parameter is a boolean indicating whether the constraints in this group should override potentially tighter constraints deeper in the precedence hierarchy。 The constraint group definition may be built-in or it may be user defined。 Because constraint groups created with this API are scoped by the constraint group definition and database, constraint groups that are in referenced oaTechs can be overridden using the same def。

参数

  • database: pointer to database in which to create this constraint group。
  • def: the constraint group def to set on this group。
  • name: name of this constraint group。
  • override: boolean; true means override tighter constraints deeper in the precedence hierarchy。
  • op: an oaConstraintGroupOperatorEnum value (default is oacPrecedenceGroupOperator)。

异常

  • oacInvalidDBForObjectDef
  • oacUniqueConstraintGroupAlreadyExists

Python 示例

from oapy._oa import _base

_base.oaConstraintGroup.create(database, name, override, op)

_base.oaConstraintGroup.create(database, def, name, override=false, op=oacPrecedenceGroupOperator)

绑定状态: 已绑定

Python 调用: _base.oaConstraintGroup.create(database, def, name, override=false, op=oacPrecedenceGroupOperator)

This function creates a new constraint group in the specified database。 The name of the constraint group is given and a boolean indicating whether the constraints in this group should override potentially tighter constraints deeper in the precedence hierarchy。 Constraint groups created with this API are automatically associated with the oacUserDefinedConstraintGroupType constraint group definition and they must be uniquely named。 Because of the unique name requirement, it is not possible to override constraint groups using the same name in any referenced oaTech 。

参数

  • database: pointer to database in which to create this constraint group。
  • name: name of this constraint group。
  • override: boolean; true means override tighter constraints deeper in the precedence hierarchy。
  • op: an oaConstraintGroupOperatorEnum value。

Python 示例

from oapy._oa import _base

_base.oaConstraintGroup.create(database, def, name, override=false, op=oacPrecedenceGroupOperator)

_base.oaConstraintGroup.create(def, object, override=false, op=oacPrecedenceGroupOperator)

绑定状态: 已绑定

Python 调用: _base.oaConstraintGroup.create(def, object, override=false, op=oacPrecedenceGroupOperator)

This function creates a new constraint group in the specified database。 The name of the constraint group is given and a boolean indicating whether the constraints in this group should override potentially tighter constraints deeper in the precedence hierarchy。 Constraint groups created with this API are automatically associated with the oacUserDefinedConstraintGroupType constraint group definition and they must be uniquely named。 Because of the unique name requirement, it is not possible to override constraint groups using the same name in any referenced oaTech 。

参数

  • database: Database to create the constraint group in。
  • name: The constant oaString name that corresponds to the constraint group。
  • override: A boolean flag indicating whether this group overrides other constraints。

异常

  • oacConstraintGroupNameExists
  • oacInvalidDatabase

Python 示例

from oapy._oa import _base

_base.oaConstraintGroup.create(def, object, override=false, op=oacPrecedenceGroupOperator)

_base.oaConstraintGroup.find(database, name)

绑定状态: 已绑定

Python 调用: _base.oaConstraintGroup.find(database, name)

This static function returns the constraint group associated with the given def on the given object。

参数

  • def: The definition of the constraint group to match。
  • object: The object to which this constraint group is associated。

Python 示例

from oapy._oa import _base

_base.oaConstraintGroup.find(database, name)

_base.oaConstraintGroup.find(database, name, local)

绑定状态: 已绑定

Python 调用: _base.oaConstraintGroup.find(database, name, local)

This function searches the specified database for a constraint group with the specified name。 The local argument specifies whether (if true) to look only in the specified database or (if false) to look in the specified database and all of its referenced databases。 If the constraint group is found, a pointer to it is returned, otherwise NULL is returned。 See Using Technology Databases in the Programmers Guide for information about referenced technology databases。

参数

  • database: Database in which to search for the constraint group。
  • name: Name of the constraint group to search for。
  • local: Specifies whether (if true) to look only in the specified technology database or (if false) to look in the specified technology database and all of its referenced databases。

Python 示例

from oapy._oa import _base

_base.oaConstraintGroup.find(database, name, local)

_base.oaConstraintGroup.find(def, object)

绑定状态: 已绑定

Python 调用: _base.oaConstraintGroup.find(def, object)

This function searches the specified database for a constraint group with the specified name。 If the specified database supports cross-database references, the referenced databases are searched as well and the first matching constraint group is returned。 If no constraint group by that name is found, NULL is returned。 To find a constraint group in the current database only, refer to the find function that accepts the local argument。

参数

  • database: The database in which to search for this constraint group。
  • name: The constant oaString name of the constraint group to search for。

Python 示例

from oapy._oa import _base

_base.oaConstraintGroup.find(def, object)