oaConstraint Class Reference

Inheritance diagram for oaConstraint:

oaObject oaLayerArrayConstraint oaLayerConstraint oaLayerPairConstraint oaSimpleConstraint


Public Methods

void getName (oaString &name) const
oaConstraintDefgetDef () const
oaValuegetValue () const
void getParams (oaConstraintParamArray &params) const
void getID (oaString &id) const
void getDescription (oaString &description) const
oaBoolean hasParams () const
oaBoolean isHard () const
void setValue (oaValue *value)
void setParams (const oaConstraintParamArray &params)
void setHard (oaBoolean isHard)
void setID (const oaString &id)
void setDescription (const oaString &description)
void destroy ()

Public Types

enum  { dtIndex = oacBaseConstraintDataType }

Detailed Description

The oaConstraint class provides a base class for all kinds of constraint representations. All constraint objects are defined by the constraintDef. They have a value associated with them and potentially a list of constraint parameters. A constraint may or may not be a hard constraint. A hard constraint is a constraint that must be met.

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

The oaConstraint class can be observed by deriving from oaObserver<oaConstraint>.


Member Function Documentation

void oaConstraint::destroy  
 

This function destroys this constraint removing it from any constraint groups it is a part of.

oaConstraintDef * oaConstraint::getDef   const
 

This function returns the definition for this constraint.

void oaConstraint::getDescription oaString &    descOut const
 

This function returns the description string of this constraint.

Parameters:
descOut The string description of this constraint.

void oaConstraint::getID oaString &    idOut const
 

This function returns the id string of this constraint.

Parameters:
idOut The string id of this constraint

void oaConstraint::getName oaString &    name const
 

This function returns the name of this constraint. If a name wasn't specified on creation one is automatically generated.

Parameters:
name The returned name

void oaConstraint::getParams oaConstraintParamArray &    params const
 

This function returns the parameters associated with this constraint

Parameters:
params The returned constraint parameters

oaValue * oaConstraint::getValue   const
 

This function returns the value for this constraint

oaBoolean oaConstraint::hasParams   const
 

This function returns a boolean indicating whether or not the constraint has parameters associated with it.

oaBoolean oaConstraint::isHard   const
 

This function returns a boolean indicated whether or not this is a hard constraint.

void oaConstraint::setDescription const oaString &    descIn
 

This function sets the description string of this constraint.

Parameters:
descIn The string description to be set on this constraint.

void oaConstraint::setHard oaBoolean    isHard
 

This function sets a boolean attribute on the constraint indicating whether or not it is hard.

Parameters:
isHard A boolean indicating whether or not the constraint is a hard constraint

void oaConstraint::setID const oaString &    idIn
 

This function sets the ID string of this constraint.

Parameters:
idIn The string id to be set on this constraint.

void oaConstraint::setParams const oaConstraintParamArray &    params
 

This function sets the parameters for this constraint. The old parameters are destroyed.

Parameters:
params Constraint parameters to set.
Exceptions:
oacConstraintParamAlreadyOwned 
oacConstraintParamNotInSameDB 

void oaConstraint::setValue oaValue *    value
 

This function sets the value for this constraint. The old value is destroyed.

Parameters:
value Value to set
Exceptions:
oacValueAlreadyOwned 
oacValueNotInSameDatabase 
oacInvalidValueForConstraintDef 


Member Enumeration Documentation

anonymous enum
 

Enumeration values:
dtIndex 


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

Return to top of page