oaProp Class Reference

Inheritance diagram for oaProp:

oaObject oaAppProp oaBooleanProp oaDoubleProp oaDoubleRangeProp oaEnumProp oaFloatProp oaFloatRangeProp oaHierProp oaIntProp oaIntRangeProp oaStringProp oaTimeProp oaTimeRangeProp


Public Methods

void destroy ()
oaObjectgetOwner () const
void getName (oaString &name) const
void getValue (oaString &value) const
void setName (const oaString &name)
oaProp * moveTo (oaObject *object)
oaProp * copyTo (oaObject *object) const

Static Public Methods

oaProp * find (const oaObject *object, const oaString &name, oaBoolean crossDomain=false)

Public Types

enum  { dtIndex = oacBasePropDataType }
enum  { domain = oacNoDomain }

Detailed Description

The oaProp class is an abstract base for all types of properties.

Properties are application-defined values that can be added to any managed object in any database except for the paged objects: oaDevice, oaNode, oaParasiticNetwork, and oaSubNetwork.

Also note that Note: oaProps and oaAppDefs should not be created on oaDMObjects such as oaLibs and oaCellViews. While OpenAccess does not enforce this restriction, there is no way to save such extensions. Instead, use a corresponding oaDMData object to properly represent these Props and AppDefs.

Properties are a simple name/value pair. They are optimized for sparse usage on any managed object in an OpenAccess database. They are often used by application programmers for simple customization. Properties are persistently stored in the database. They are visible to anyone who queries for them. Currently there are 13 types of properties that have different types of values. Click on the specific property in the above Inheritance diagram for more details.

If applications need to extend the database schema, instead of adding simple name/value pair properties, oaAppDef extensions should be used instead. See Extending the Database in the Programmers Guide for a general discussion of appDefs.

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


Member Function Documentation

oaProp * oaProp::copyTo oaObject *    object const
 

This function creates a copy of this property on the specified object, and returns the new property. The new object may either be in the same or a different database from the original property.

Exceptions:
oacPropNameUsed 

void oaProp::destroy  
 

This function destroys this property, removing it from the database.

oaProp * oaProp::find const oaObject *    object,
const oaString &    name,
oaBoolean    crossDomain = false
[static]
 

This function searches the specified object for a property with the specified name. If found, the function returns the property. Otherwise, the function returns NULL.

If the specified object is a multi-domain object and crossDomain is true, this function searches other domains and inherits properties from the other domains if appropriate. The order of domains from which a multi-domain object can inherit properties is:

  • design-level occurrence
  • design-local occurrence
  • block domain
  • module domain

For example, a design-local occurrence object can inherit properties with the same name defined on its equivalant block domain object, and it can inherit properties from the module domain object as well.

Note: The owner of the inherited property remains as the equivalent object in the other domain.

void oaProp::getName oaString &    name const
 

This function returns the name of the property in name.

oaObject * oaProp::getOwner   const
 

This function returns a pointer to the object that owns this property.

void oaProp::getValue oaString &    value const
 

This function converts the value of this property to a string and returns the result in value. The is the string that will be shown if this property is displayed using an oaPropDisplay.

Note that many of the oaProp subclasses have a getValue function that returns the property value as its native type. These functions usually have a different argument type.

When called with a property of type oaHierProp this call will return the constant string "oaHierProp".

Reimplemented in oaEnumProp, and oaStringProp.

oaProp * oaProp::moveTo oaObject *    object
 

This function moves this property to the specifed object. If the object resides in a different design, the returned property pointer points to a property in that design rather than the property with which this operation was initiated. The property will be removed from the object it was previously associated with.

Exceptions:
oacPropNameUsed 
oacInvalidObjForProp 
oacPropRecursiveOwnership 

void oaProp::setName const oaString &    name
 

This function sets the name of this property to the specified name.

Exceptions:
oacPropNameUsed 


Member Enumeration Documentation

anonymous enum
 

Enumeration values:
dtIndex 

anonymous enum
 

Enumeration values:
domain 


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

Return to top of page