oaObserver<oaAppDef> Class Template Reference

Inheritance diagram for oaObserver<oaAppDef>:

oaBaseObserver


Public Methods

 oaObserver (oaUInt4 priorityIn, oaBoolean enabledIn=true)
virtual ~oaObserver ()
virtual void onPreModify (oaObject *object, oaAppDef *appDef)
virtual void onPostModify (oaObject *object, oaAppDef *appDef)
virtual void onConflict (const oaString &name, oaType type)

Static Public Methods

oaBoolean hasObservers ()

Detailed Description

template<>
class oaObserver<oaAppDef>

This base template class can be used to derive observers for extension objects. It supports preModify, postModify, and onConflict event notifications.

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


Constructor & Destructor Documentation

oaObserver<oaAppDef>::oaObserver oaUInt4    priorityIn,
oaBoolean    enabledIn = true
 

This is the oaObserver<oaAppDef> base class constructor. If multiple observers exist for a given oaAppDef notification event, observers with a lower priorityIn value are called before those with a higher value.

Parameters:
priorityIn priority of this observer relative to other oaAppDef observers
enabledIn Determines whether this observer is called when an observed event occurs

oaObserver<oaAppDef>::~oaObserver   [virtual]
 

This is the destructor for the oaObserver<oaAppDef> class. This function destroys this oaObserver<oaAppDef> object, deactivating and deleting this observer from the AppDef observer list, and freeing all resources associated with this observer.


Member Function Documentation

oaBoolean oaObserver<oaAppDef>::hasObservers   [inline, static]
 

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

void oaObserver<oaAppDef>::onConflict const oaString &    name,
oaType    type
[virtual]
 

This function is called if there is a conflict between an application data definition (oaAppDef) and an existing application data definition.

The application's derived class should implement this function to receive this notification.

Parameters:
name name of the conflicting oaAppDef extension
type type of the conflicting oaAppdef extension

void oaObserver<oaAppDef>::onPostModify oaObject *    object,
oaAppDef *    appDef
[virtual]
 

This function is called after the extension defined by an oaAppDef has been set on some oaObject. The application's derived class should implement this function to receive notification after the extension value on an object has been set or modified.

Parameters:
object A pointer to the object that has the modified extension
appDef A pointer to the oaAppDef that defines the extension that was modified.

void oaObserver<oaAppDef>::onPreModify oaObject *    object,
oaAppDef *    appDef
[virtual]
 

This function is called before the extension defined by an oaAppDef is set on some oaObject. The application's derived class should implement this function to receive notification before the extension value on an object is set or modified.

Parameters:
object A pointer to the object that will have the modified extension
appDef A pointer to the oaAppDef that defines the extension to be modified.


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

Return to top of page