oaStringAppDef Class Template Reference

Inheritance diagram for oaStringAppDef:

oaAppDef oaSessionObject oaObject


Public Methods

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

Static Public Methods

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

Detailed Description

template<class T>
class oaStringAppDef< T >

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

When these classes are created, a string field is added to each object of the specified dataType. The default value of the string field is the empty string. Applications can use the new string 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>
oaStringAppDef< T > * oaStringAppDef< T >::find const oaString &    name,
const oaAppObjectDef *    objDef
[inline, static]
 

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

This function returns an oaStringAppDef 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>
void oaStringAppDef< T >::get const T *    object,
oaString &    value
[inline]
 

This function returns the value of this string extension.

Parameters:
object The object type with which this extension is associated
value The value of the string extension
Exceptions:
oacInvalidDesignObjectForAppDef 

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

This function constructs an oaStringAppDef class string extension with the specified name for the specified object extension.

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

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

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

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

template<class T>
void oaStringAppDef< T >::getDefault oaString &    value const
 

This function fills out the default value for this string extension.

Parameters:
value The string to be filled out with the default value

template<class T>
void oaStringAppDef< T >::set T *    object,
const oaString &    value
[inline]
 

This function sets the value of this string extension.

Parameters:
object The object type with which this extension is associated
value The value of the string extension
Exceptions:
oacInvalidDesignObjectForAppDef 


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

Return to top of page