oaValue Class Reference

Inheritance diagram for oaValue:

oaObject oaAntennaRatioArrayValue oaAntennaRatioValue oaBooleanValue oaBoxArrayValue oaDualInt1DTblValue oaDualIntValue oaFlt1DTblValue oaFlt2DTblValue oaFltIntFltTblValue oaFltValue oaInt1DTblValue oaInt2DTblValue oaIntDualIntArrayTblValue oaIntFltTblValue oaIntRangeArray1DTblValue oaIntRangeArray2DTblValue oaIntRangeArrayValue oaIntRangeValue oaIntValue oaLayerArrayValue oaLayerValue oaPurposeValue oaStringValue oaUInt8RangeValue oaUInt8Value oaValueArrayValue oaViaDef2DTblValue oaViaDefArrayValue oaViaTopology2DTblValue oaViaTopologyArrayValue


Public Methods

void destroy ()
oaBoolean isOwned () const
oaObjectgetOwner (oaBoolean local=false) const
oaBoolean isEqual (oaValue *value) const
oaValue * copy () const
oaValue * copyTo (oaObject *database) const

Public Types

enum  { dtIndex = oacBaseValueDataType }

Detailed Description

The oaValue class represents a base class for all value objects.

The subclasses of oaValue are used to provide a variety of types of information about constraints. Each oaValue object is created by itself and then assigned to an oaConstraint or an oaConstraintParam which becomes its owning object. It can only be used by a single oaConstraint or oaConstraintParam object (see oaConstraint::setValue and oaConstraintParam::setValue for its usage).

oaValues are managed objects that are created separately from the constraint or constraintParam that owns them, but they do not serve any purpose until they are set on their owning object. If a database is saved with an oaValue that does not have an owner, the oaValue will be orphaned. To clean up these oaValues, use the collections oaDesign::getValues and oaTech::getValues.

An oaValue is destroyed when its owner is destroyed or when a setValue() is performed that overwrites it.

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


Member Function Documentation

oaValue * oaValue::copy   const
 

This function makes a copy of this object within the same database and returns a pointer to the value.

oaValue * oaValue::copyTo oaObject *    database const
 

This function copies the value of this object to the specified database and returns a pointer to the new value.

Parameters:
database The destination database

void oaValue::destroy  
 

This will attempt to destroy this oaValue object. This call will throw oacCantDestroyOwnedValue if this value has an owning Constraint or ConstraintParam. Such oaValues are destroyed when the owning object is destroyed or when a new setValue() is performed on the owning object.

Exceptions:
oacCantDestroyOwnedValue 

oaObject * oaValue::getOwner oaBoolean    local = false const
 

This function returns the owner object which owns this value. If the parameter, "local", is true, the immediate owner of this value is returned; otherwise, the top non-value owner is returned. If there is no any owner object qualified to the specified condition, NULL is returned.

Usually, application may want to call this API to get the owner of a value, like constraint object or layer object. If the value is not owned by such object, NULL will be returned. However, if a value is owned by another value, like oaValueArrayValue, and that oaValueArrayValue object is not owned by any object, which owner object to be returned depends on the parameter, "local". If "local" is true, the oaValueArrayValue object is returned, otherwise, NULL is returned. Parameter "local" gives application a flexibility to find either a true, non-value owner object, like constraint, or an immediate owner even the owner itself is really a value.

Parameters:
local The condition for query.

oaBoolean oaValue::isEqual oaValue *    value const
 

This function returns a boolean indicating whether or not the value of this value is the same as the value of the specified value.

Parameters:
value The value to compare with

oaBoolean oaValue::isOwned   const
 

This returns true if this oaValue has an owning oaConstraint or oaConstraintParam. There is no function for traversing from the oaValue to its owner.


Member Enumeration Documentation

anonymous enum
 

Enumeration values:
dtIndex 


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

Return to top of page