oaDoubleAppDef Class Template Reference

Inheritance diagram for oaDoubleAppDef:

oaAppDef oaSessionObject oaObject


Public Methods

void set (T *object, oaDouble value)
oaDouble get (const T *object)
oaDouble getDefault () const

Static Public Methods

oaDoubleAppDef< T > * get (const oaString &name, oaDouble defValue=0., oaBoolean persist=true)
oaDoubleAppDef< T > * get (const oaString &name, const oaAppObjectDef *objDef, oaDouble defValue=0., oaBoolean persist=true)
oaDoubleAppDef< T > * find (const oaString &name)
oaDoubleAppDef< T > * find (const oaString &name, const oaAppObjectDef *objDef)

Detailed Description

template<class T>
class oaDoubleAppDef< T >

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

Once created, a double field is added to each object of the specified dataType. The default value for this extension is DBL_MAX. Applications can use the new field for whatever purpose is necessary.

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

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

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

This function returns the value of this double extension.

Parameters:
object The object for which to get the value

template<class T>
oaDoubleAppDef< T > * oaDoubleAppDef< T >::get const oaString &    name,
const oaAppObjectDef *    objDef,
oaDouble    defValue = 0.,
oaBoolean    persist = true
[inline, static]
 

This function constructs an oaDoubleAppDef object, creating a double extension with the specified name for the specified object type.

Parameters:
name The name given to the oaDoubleAppDef object
objDef The object extension with which to associate the extension
defValue An optional default value
persist Saves the oaDoubleAppDef data in the database
Exceptions:
oacAppDefExists 

template<class T>
oaDoubleAppDef< T > * oaDoubleAppDef< T >::get const oaString &    name,
oaDouble    defValue = 0.,
oaBoolean    persist = true
[inline, static]
 

This function constructs an oaDoubleAppDef object, creating a double extension with the specified name. You can create a double extension on any object except another extension.

Parameters:
name The name given to the oaDoubleAppDef object
defValue The default value for this extension
persist Saves the oaDoubleAppDef data in the database
Exceptions:
oacAppDefExists 

template<class T>
oaDouble oaDoubleAppDef< T >::getDefault   const
 

This function returns the default value of this double extension.

template<class T>
void oaDoubleAppDef< T >::set T *    object,
oaDouble    value
[inline]
 

This function sets the value of this double extension.

Parameters:
object The object on which to set the value
value The value to set on the object


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

Return to top of page