oaInterPointerAppDef Class Template Reference

Inheritance diagram for oaInterPointerAppDef:

oaAppDef oaSessionObject oaObject


Public Methods

void set (T *object, const oaObject *otherObject)
oaObjectget (const T *object)

Static Public Methods

oaInterPointerAppDef< T > * get (const oaString &name, oaBoolean persist=true)
oaInterPointerAppDef< T > * get (const oaString &name, const oaAppObjectDef *objDef, oaBoolean persist=true)
oaInterPointerAppDef< T > * find (const oaString &name)
oaInterPointerAppDef< T > * find (const oaString &name, const oaAppObjectDef *objDef)

Detailed Description

template<class T>
class oaInterPointerAppDef< T >

The oaInterPointerAppDef class implements an application-specific extension to a particular type of data in a database.

Once created, a database object pointer field is added to each object of the specified dataType. The default value for the object pointer is NULL. Applications can use the new field for whatever purpose is necessary.

Note: The pointer must be NULL or must point to a persistent object in the same database. The pointer must not point at objects in another database, objects not in a database, the database itself (oaDesign or oaTech), or utility objects.

This extension is similar to the oaIntraPointerAppDef, except that oaInterPointerAppDef supports pointers to other types of objects within the same database. If only pointers to objects of the same type are created, use oaIntraPointerAppDef, since it requires slightly less memory and is slightly faster.

For additional information on defining and using AppDefs, see oaAppDef and Extending the Database in the Programmer's Guide.


Member Function Documentation

template<class T>
oaInterPointerAppDef< T > * oaInterPointerAppDef< T >::find const oaString &    name,
const oaAppObjectDef *    objDef
[inline, static]
 

This function returns an oaInterPointerAppDef object with this dataType and the specified 'name' that is associated with the specified object extension 'objDef'.

Parameters:
name The name of the oaAppDef object to look for
objDef A constant pointer to the object extension

template<class T>
oaInterPointerAppDef< T > * oaInterPointerAppDef< T >::find const oaString &    name [inline, static]
 

This function returns an oaInterPointerAppDef object with this dataType and the specified 'name' if it exists.

Parameters:
name The name of the oaAppDef object to look for

template<class T>
oaObject * oaInterPointerAppDef< T >::get const T *    object [inline]
 

This function returns the value associated with this extension for the specified object. The value is returned as a pointer to an oaObject.

Parameters:
object The object whose extension value to return
Exceptions:
oacInvalidDesignObjectForAppDef 

template<class T>
oaInterPointerAppDef< T > * oaInterPointerAppDef< T >::get const oaString &    name,
const oaAppObjectDef *    objDef,
oaBoolean    persist = true
[inline, static]
 

This function constructs an oaInterPointerAppDef with the specified name and associates it with the specified oaAppObjectDef class. The name must be unique for all extension types.

Parameters:
name The name given to the oaInterPointerAppDef object
objDef The object extension with which to associate the extension
persist Saves the oaInterPointerAppDef data in the database
Exceptions:
oacAppDefExists 

template<class T>
oaInterPointerAppDef< T > * oaInterPointerAppDef< T >::get const oaString &    name,
oaBoolean    persist = true
[inline, static]
 

This function constructs an oaInterPointerAppDef with the specified name. The name must be unique for all extension types. You can create an oaInterPointerAppDef extension on any object except another extension.

Parameters:
name The name given to the oaInterPointerAppDef object
persist Saves the oaInterPointerAppDef data in the database
Exceptions:
oacAppDefExists 

template<class T>
void oaInterPointerAppDef< T >::set T *    object,
const oaObject *    otherObject
[inline]
 

This function sets the value associated with this extension for the specified object to the specified value.

Parameters:
object The object whose extension value to set
otherObject The value to assign to the specified object
Exceptions:
oacInvalidDesignObjectForAppDef 


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

Return to top of page