oaConstraintGroup Class Reference

Inheritance diagram for oaConstraintGroup:

oaObject


Public Methods

oaConstraintGroupDefgetDef () const
oaConstraintGroupOperator getOperator () const
void destroy ()
oaBoolean override () const
void getName (oaString &name) const
oaObjectgetOwner () const
oaCollection< oaConstraintGroupMem, oaConstraintGroup > getMembers () const
oaCollection< oaConstraint, oaConstraintGroup > getConstraints (const oaConstraintDef *def=NULL) const

Static Public Methods

oaConstraintGroup * create (oaObject *database, const oaString &name, oaBoolean override=false)
oaConstraintGroup * create (oaObject *database, const oaString &name, oaBoolean override, oaConstraintGroupOperator op)
oaConstraintGroup * create (oaObject *database, oaConstraintGroupDef *def, const oaString &name, oaBoolean override=false, oaConstraintGroupOperator op=oacPrecedenceGroupOperator)
oaConstraintGroup * create (oaConstraintGroupDef *def, oaObject *object, oaBoolean override=false, oaConstraintGroupOperator op=oacPrecedenceGroupOperator)
oaConstraintGroup * find (const oaObject *database, const oaString &name)
oaConstraintGroup * find (const oaObject *database, const oaString &name, oaBoolean local)
oaConstraintGroup * find (const oaConstraintGroupDef *def, const oaObject *object)

Public Types

enum  { dtIndex = oacBaseConstraintGroupDataType }

Detailed Description

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<oaConstraintGroup>.


Member Function Documentation

static oaConstraintGroup oaConstraintGroup::create oaConstraintGroupDef *    def,
oaObject *    object,
oaBoolean    override = false,
oaConstraintGroupOperator    op = oacPrecedenceGroupOperator
[static]
 

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.

Parameters:
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
Exceptions:
oacInvalidObjForObjectDef 
oacObjectHasConstraintGroupOfSameType 
oacInvalidOperationOnUserDefinedConstraintGroupType 

oaConstraintGroup * oaConstraintGroup::create oaObject *    database,
oaConstraintGroupDef *    def,
const oaString &    name,
oaBoolean    override = false,
oaConstraintGroupOperator    op = oacPrecedenceGroupOperator
[static]
 

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.

Parameters:
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)
Exceptions:
oacInvalidDBForObjectDef 
oacUniqueConstraintGroupAlreadyExists 

oaConstraintGroup * oaConstraintGroup::create oaObject *    database,
const oaString &    name,
oaBoolean    override,
oaConstraintGroupOperator    op
[static]
 

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.

Parameters:
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.

oaConstraintGroup * oaConstraintGroup::create oaObject *    database,
const oaString &    name,
oaBoolean    override = false
[static]
 

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.

Parameters:
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.
Exceptions:
oacConstraintGroupNameExists 
oacInvalidDatabase 

void oaConstraintGroup::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.

static oaConstraintGroup * oaConstraintGroup::find const oaConstraintGroupDef *    def,
const oaObject *    object
[static]
 

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

Parameters:
def The definition of the constraint group to match.
object The object to which this constraint group is associated.

oaConstraintGroup * oaConstraintGroup::find const oaObject *    database,
const oaString &    name,
oaBoolean    local
[static]
 

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.

Parameters:
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.

oaConstraintGroup * oaConstraintGroup::find const oaObject *    database,
const oaString &    name
[static]
 

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.

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

oaCollection< oaConstraint, oaConstraintGroup > oaConstraintGroup::getConstraints const oaConstraintDef *    def = NULL const
 

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.

Parameters:
def The constraint definition to search for.

oaConstraintGroupDef * oaConstraintGroup::getDef   const
 

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

oaCollection< oaConstraintGroupMem, oaConstraintGroup > oaConstraintGroup::getMembers   const
 

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

void oaConstraintGroup::getName oaString &    name const
 

This function returns the name of this constraint group.

Parameters:
name The returned string name.

oaConstraintGroupOperator oaConstraintGroup::getOperator   const
 

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

oaObject * oaConstraintGroup::getOwner   const
 

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:

For constraint groups not owned by any object, getOwner returns NULL. Note that constraint groups created with oaConstraintGroup::create will have a NULL owner.

oaBoolean oaConstraintGroup::override   const
 

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


Member Enumeration Documentation

anonymous enum
 

Enumeration values:
dtIndex 


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

Return to top of page