oaConstraintDef Class Reference

Inheritance diagram for oaConstraintDef:

oaSessionObject oaObject oaLayerArrayConstraintDef oaLayerConstraintDef oaLayerPairConstraintDef oaSimpleConstraintDef


Public Methods

void getName (oaString &name) const
void getValueTypes (oaSubset< oaType > &allowedValues) const
void getObjectTypes (oaSubset< oaType > &allowedObjects) const
void getDatabaseTypes (oaSubset< oaDBType > &allowedDbs) const
oaBoolean isBuiltIn () const
void destroy ()
void remove (oaObject *database)

Static Public Methods

oaConstraintDef * find (const oaString &name)

Public Types

enum  { dtIndex = oacBaseConstraintDefDataType }

Detailed Description

The oaConstraintDef object specifies a definition for a particular constraint. The definition contains a name, a list of databases that the constraint can be created in, and a list of types of oaValues that are allowed for the constraint. The names for constraint definitions must be unique.

oaConstraintDefs can be built-in or user defined. Built-in oaConstraintDefs can be obtained with an enum, for example, using oaLayerConstraintDef::get(). User- defined oaConstraintDefs can be obtained by name using find().

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

See Uniqueness of Session Objects for information about the requirement that session objects be unique.


Member Function Documentation

void oaConstraintDef::destroy  
 

This function destroys this constraint definition. If it is a built-in definition, or there are databases referencing this definition, an exception is thrown. An exception is also thrown if this function is called when undo is enabled on any of the current in-memory design or tech databases.

Exceptions:
oacUnableToDestroyBuiltInType 
oacConstraintDefHasReference 
oacCannotDestroyDefUndo 

oaConstraintDef * oaConstraintDef::find const oaString &    name [static]
 

This function returns the constraint definition with the specified name. If no definition by that name is found, NULL is returned.

Parameters:
name The name of the constraintDef to search for.

void oaConstraintDef::getDatabaseTypes oaSubset< oaDBType > &    allowedDbs const
 

This function returns the types of databases that a constraint specified with this definition can be created in.

Parameters:
allowedDbs The databases allowed.

void oaConstraintDef::getName oaString &    name const
 

This function returns the name of this constraint definition.

Parameters:
name The returned name.

void oaConstraintDef::getObjectTypes oaSubset< oaType > &    allowedObjects const
 

This function returns the types of objects that a constraint specified with this definition can be attached to.

Parameters:
allowedObjects The objects allowed.

void oaConstraintDef::getValueTypes oaSubset< oaType > &    allowedValues const
 

This function returns the allowed value types for a constraint specified with this definition.

Parameters:
allowedValues The returned value types

oaBoolean oaConstraintDef::isBuiltIn   const
 

This function returns true if this constraint def is a built-in def.

void oaConstraintDef::remove oaObject *    database
 

This function removes this constraint definition from the specified database. If there are constraints in the specified database that reference this definition, an error is thrown.

Parameters:
database The database to remove the constraint definition from.


Member Enumeration Documentation

anonymous enum
 

Enumeration values:
dtIndex 


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

Return to top of page