oaAppDef Class Reference

Inheritance diagram for oaAppDef:

oaSessionObject oaObject oaBooleanAppDef oaDataAppDef oaDoubleAppDef oaFloatAppDef oaIntAppDef oaInterPointerAppDef oaIntraPointerAppDef oaStringAppDef oaTimeAppDef oaVarDataAppDef oaVoidPointerAppDef


Public Methods

void getName (oaString &name) const
void getName (oaString &name)
oaBoolean isPersistent () const
void destroy (oaObject *object)
oaBoolean isUsedIn (const oaObject *database)
void remove (oaObject *database)

Detailed Description

The oaAppDef class is an abstract base class. The oaAppDef hierarchy of classes provides a way to add extension values to existing database objects. AppDefs may be used to create extensions on any managed object in an oaDesign, oaTech, or oaWafer database.

All uses of a given AppDef across a session must be consistent. A “given” AppDef is determined by its name and the class of object it applies to. For a given name and class pair, all the other attributes - persistence, type of value, and default value - must have a consistent setting. For example, if an IntAppDef named “myData” exists on oaNets, trying to get() a FloatAppDef named “myData” on oaNets will throw an exception. However it is still legal to get() a BooleanAppDef named “myData” on oaInsts.

An AppDef will exist in a given session either because it exists in an open database, or because the application has done a get() on it. Once an AppDef exists in a given session any attempt to create an inconsistent AppDef of the same name and object type will be an error. If a database is opened that has an AppDef stored in it that is inconsistent with a previously existing AppDef, then the newly read AppDef and its associated extension data will be ignored and will not be available to the application.

Note: oaAppDefs and oaProps and 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.

Please refer to documentation for classes derived from oaAppDef for further information on their use. Also see Extending the Database in the Programmer's Guide for information on what classes can be extended and additional usage information. Also, see Uniqueness of Session Objects for information about the requirement that session objects be unique.

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


Member Function Documentation

void oaAppDef::destroy oaObject *    object
 

This function removes the extension data set on the specified object.

Parameters:
object The object to search

void oaAppDef::getName oaString &    name
 

This function is deprecated. Use the const oaAppDef::getName function instead.

This function returns the name of the extension.

void oaAppDef::getName oaString &    name const
 

This function returns the name of the extension.

oaBoolean oaAppDef::isPersistent   const
 

This function returns the value of the persistence flag for this AppDef. Persistent extension data is saved to the disk when its database is saved and will be present when the database is opened at a later time.

Note that the first AppDef used to write a given type of extension data in a given database will determine its persistence. You cannot have some items that are persistent and some that are not for a single database and extension name.

oaBoolean oaAppDef::isUsedIn const oaObject *    database
 

This function returns true if the extension is used in the specified database. Note that extensions that are set to the default value are not counted as being used.

Parameters:
database The database to search
Exceptions:
oacInvalidDatabase 

void oaAppDef::remove oaObject *    database
 

This function removes extension data of this extension from the specified database.

Parameters:
database The database from which to remove this extension
Exceptions:
oacInvalidDatabase 


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

Return to top of page