oaSimpleConstraint Class Reference

Inheritance diagram for oaSimpleConstraint:

oaConstraint oaObject


Static Public Methods

oaSimpleConstraint * create (const oaSimpleConstraintDef *def, oaValue *value, oaBoolean isHard=true, const oaConstraintParamArray *params=NULL)
oaSimpleConstraint * create (const oaSimpleConstraintDef *def, const oaString &name, oaValue *value, oaBoolean isHard=true, const oaConstraintParamArray *params=NULL)
oaSimpleConstraint * find (const oaConstraintGroup *group, const oaSimpleConstraintDef *def, oaBoolean hardOnly=false)
oaCollection< oaSimpleConstraint, oaConstraintGroupgetConstraints (const oaConstraintGroup *group, const oaSimpleConstraintDef *def)

Detailed Description

The oaSimpleConstraint class represents a basic constraint object that is defined by its oaSimpleConstraintDef. A simple constraint has a value associated with it and potentially a list of constraint parameters. A simple constraint may or may not be a hard constraint. A hard constraint is a constraint that must be met.

oaSimpleConstraints always have a value, and are created in the same database as that value. oaSimpleConstraints get applied to objects by being placed in an oaConstraintGroup.


Member Function Documentation

oaSimpleConstraint * oaSimpleConstraint::create const oaSimpleConstraintDef *    def,
const oaString &    name,
oaValue *    value,
oaBoolean    isHard = true,
const oaConstraintParamArray *    params = NULL
[static]
 

This function creates an explicitly name constraint with the specified attributes. The constraint is created in the same database as the value. The constraint parameters must also exist in the same database as the value.

Parameters:
def Simple Constraint definition
name Constraint name
value Constraint value
isHard Boolean indicating whether constraint must be met
params Optional constraint parameters
Exceptions:
oacValueAlreadyOwned 
oacConstraintParamAlreadyOwned 

oaSimpleConstraint * oaSimpleConstraint::create const oaSimpleConstraintDef *    def,
oaValue *    value,
oaBoolean    isHard = true,
const oaConstraintParamArray *    params = NULL
[static]
 

This function creates an auto-named constraint with the specified attributes. The constraint is created in the same database as the value. The constraint parameters must also exist in the same database as the value.

Parameters:
def Simple Constraint definition
value Constraint value
isHard Boolean indicating whether constraint must be met
params Optional constraint parameters
Exceptions:
oacValueAlreadyOwned 
oacConstraintParamAlreadyOwned 

oaSimpleConstraint * oaSimpleConstraint::find const oaConstraintGroup *    group,
const oaSimpleConstraintDef *    def,
oaBoolean    hard = false
[static]
 

This function returns the first hard or soft constraint in the group with the definition specified.

Parameters:
group Constraint group to search
def Simple Constraint definition to search for
hard Boolean indicating whether or not the constraint to be searched for is hard or soft

oaCollection< oaSimpleConstraint, oaConstraintGroup > oaSimpleConstraint::getConstraints const oaConstraintGroup *    group,
const oaSimpleConstraintDef *    def
[static]
 

This function returns a collection of simple constraints in the specified group whose definition matches the one given. If no definition is specified, all simple constraints in that group are returned.

Parameters:
group The group to search in
def The simple constraint definition to filter for


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

Return to top of page