oaStdObserver Class Template Reference

Inheritance diagram for oaStdObserver:

oaBaseObserver oaObserver oaObserver<T, V>


Public Methods

 oaStdObserver (oaUInt4 priorityIn, oaBoolean enabledIn=true)
virtual ~oaStdObserver ()
virtual void onPostCreate (T *object)
virtual void onPreDestroy (T *object)
virtual void onPreModify (T *object, D modType)
virtual void onPostModify (T *object, D modType)

Static Public Methods

oaBoolean hasObservers ()

Detailed Description

template<class T, typename D>
class oaStdObserver< T, D >

The oaStdObserver<T, D> class is a base template class for standard observers. It supports postCreate, preDestroy, preModify, and postModify event notifications.

See oaObserver for information on using OpenAccess observer template classes to derive and instantiate observers in an application.


Constructor & Destructor Documentation

template<class T, typename D>
oaStdObserver< T, D >::oaStdObserver oaUInt4    priorityIn,
oaBoolean    enabledIn = true
 

This is the constructor for the oaStdObserver<T, D> template class. Observers are ordered by priority from lowest to highest.

Parameters:
priorityIn priority of this observer
enabledIn Determines whether this observer is called when an observed event occurs

template<class T, typename D>
oaStdObserver< T, D >::~oaStdObserver   [virtual]
 

This is the destructor for the oaStdObserver<T, D> template class.


Member Function Documentation

template<class T, typename D>
oaBoolean oaStdObserver< T, D >::hasObservers   [inline, static]
 

This function returns true if any observers for type 'T' are active.

Reimplemented in oaObserver<T, V>.

template<class T, typename D>
void oaStdObserver< T, D >::onPostCreate T *    object [virtual]
 

This function is called after an observed object is created. The application's derived observer class should implement this function to receive notification after the object is created.

Parameters:
object pointer to the created object

template<class T, typename D>
void oaStdObserver< T, D >::onPostModify T *    object,
D    modType
[virtual]
 

This function is called after an observed object has been modified. The application's derived class should implement this function to receive notification when an observed object has been modified.

Parameters:
object A pointer to the modified object
modType The type of modification that was made

template<class T, typename D>
void oaStdObserver< T, D >::onPreDestroy T *    object [virtual]
 

This function is called just before an observed object is destroyed. The application's derived observer class should implement this function to receive notification before the object is destroyed.

Parameters:
object pointer to the header to be destroyed

template<class T, typename D>
void oaStdObserver< T, D >::onPreModify T *    object,
D    modType
[virtual]
 

This function is called before an observed object is modified. The application's derived class should implement this function to receive notification when the observed object is about to be modified.

Parameters:
object A pointer to the object to be modified
modType The type of modification to be made


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

Return to top of page