oaBooleanAppDef Class Template Reference

Inheritance diagram for oaBooleanAppDef:

oaAppDef oaSessionObject oaObject


Public Methods

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

Static Public Methods

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

Detailed Description

template<class T>
class oaBooleanAppDef< T >

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

Once created, a boolean field is added to each object of the specified dataType, with the specified default value. Applications can use the new data 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>
oaBooleanAppDef< T > * oaBooleanAppDef< T >::find const oaString &    name,
const oaAppObjectDef *    objDef
[inline, static]
 

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

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

This function returns the value of this Boolean AppDef.

Parameters:
object The object on which to get the value for this extension.
Exceptions:
oacInvalidDesignObjectForAppDef 

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

This function constructs a boolean extension with the given name, associated with the given appObject and with the specified default value.

Parameters:
name The name of the boolean extension to create
objDef The oaAppObjectDef with which to associate the new extension
defValue The default value for the extension to create
persist The persistency of the extension to create
Exceptions:
oacAppDefExists 

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

This function constructs a boolean extension with the given name, and the specified default value.

Parameters:
name The name of the boolean extension to create
defValue The default value for the extension to create
persist The persistency of the extension to create
Exceptions:
oacAppDefExists 

template<class T>
oaBoolean oaBooleanAppDef< T >::getDefault   const
 

This function returns the default value for this boolean extension.

template<class T>
void oaBooleanAppDef< T >::set T *    object,
oaBoolean    value
[inline]
 

This function sets the value of this Boolean AppDef.

Parameters:
object The object on which to set the value for this extension
value The value of the extension to set on the object
Exceptions:
oacInvalidDesignObjectForAppDef 


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

Return to top of page