oaTimeAppDef Class Template Reference

Inheritance diagram for oaTimeAppDef:

oaAppDef oaSessionObject oaObject


Public Methods

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

Static Public Methods

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

Detailed Description

template<class T>
class oaTimeAppDef< T >

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

Once are created, a time field is added to each object of the specified dataType. The default value for the time extension is the epoch (0). Applications can use the new time field for any purpose.

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

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

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

This function returns the value of this extension.

Exceptions:
oacInvalidDesignObjectForAppDef 

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

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

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

template<class T>
oaTimeAppDef< T > * oaTimeAppDef< T >::get const oaString &    name,
oaTime    defValue = oaTime(0),
oaBoolean    persist = true
[inline, static]
 

This function constructs an oaTimeAppDef class time extension with the specified name. You can create a time extension on any object except another extension.

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

template<class T>
oaTime oaTimeAppDef< T >::getDefault   const
 

This function returns the default value for this time extension.

template<class T>
void oaTimeAppDef< T >::set T *    object,
oaTime    value
[inline]
 

This function sets the value of this extension.

Exceptions:
oacInvalidDesignObjectForAppDef 


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

Return to top of page