oaFloatAppDef Class Template Reference

Inheritance diagram for oaFloatAppDef:

oaAppDef oaSessionObject oaObject


Public Methods

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

Static Public Methods

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

Detailed Description

template<class T>
class oaFloatAppDef< T >

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

Once created, a float field is added to each object of the specified dataType. The default value for this extension is FLT_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>
oaFloatAppDef< T > * oaFloatAppDef< T >::find const oaString &    name,
const oaAppObjectDef *    objDef
[inline, static]
 

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

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

This function returns the value of this float extension.

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

This function constructs an oaFloatAppDef object, creating a float extension with the specified name for an object extension.

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

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

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

Parameters:
name The name given to the oaFloatAppDef object
defValue An optional default value
persist Saves the oaFloatAppDef data in the database
Exceptions:
oacAppDefExists 

template<class T>
oaFloat oaFloatAppDef< T >::getDefault   const
 

This function returns the default value for this float extension.

template<class T>
void oaFloatAppDef< T >::set T *    object,
oaFloat    value
[inline]
 

This function sets the value of this string extension.

Exceptions:
oacInvalidDesignObjectForAppDef 


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

Return to top of page