oaIntraPointerAppDef Class Template Reference

Inheritance diagram for oaIntraPointerAppDef:

oaAppDef oaSessionObject oaObject


Public Methods

void set (T *object, const T *otherObject)
T * get (const T *object)

Static Public Methods

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

Detailed Description

template<class T>
class oaIntraPointerAppDef< T >

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

Once created, a pointer field is added to each object of the specified dataType. The pointer can point to any object of the same type in the same database. The pointer cannot be used to point to anything else. The default value for the object pointer is NULL.

Note: This extension is similar to oaInterPointerAppDef. However, since the pointers are all known to be of the same type of object, oaIntraPointerAppDef uses less space.

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>
oaIntraPointerAppDef< T > * oaIntraPointerAppDef< T >::find const oaString &    name,
const oaAppObjectDef *    objDef
[inline, static]
 

This function returns an oaIntraPointerAppDef 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>
oaIntraPointerAppDef< T > * oaIntraPointerAppDef< T >::find const oaString &    name [inline, static]
 

This function returns an oaIntraPointerAppDef 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>
T * oaIntraPointerAppDef< T >::get const T *    object [inline]
 

This function returns the value associated with this oaIntraPointerAppDef 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>
oaIntraPointerAppDef< T > * oaIntraPointerAppDef< T >::get const oaString &    name,
const oaAppObjectDef *    objDef,
oaBoolean    persist = true
[inline, static]
 

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

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

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

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

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

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

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

Parameters:
object The object whose extension value to set
otherObject The new value for this extension
Exceptions:
oacInvalidDesignObjectForAppDef 


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

Return to top of page