oaIntAppDef Class Template Reference

Inheritance diagram for oaIntAppDef:

oaAppDef oaSessionObject oaObject


Public Methods

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

Static Public Methods

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

Detailed Description

template<class T>
class oaIntAppDef< T >

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

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

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

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

This function returns the value of this integer extension.

Exceptions:
oacInvalidDesignObjectForAppDef 

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

This function constructs an oaIntAppDef object, creating an integer extension with the specified name for the specified object type.

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

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

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

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

template<class T>
oaInt4 oaIntAppDef< T >::getDefault   const
 

This function returns the default value for this integer extension.

template<class T>
void oaIntAppDef< T >::set T *    object,
oaInt4    value
[inline]
 

This function sets the value of this integer extension.

Exceptions:
oacInvalidDesignObjectForAppDef 


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

Return to top of page