oaObserver<oaConstraintDef> Class Template Reference

Inheritance diagram for oaObserver<oaConstraintDef>:

oaBaseObserver


Public Methods

 oaObserver (oaUInt4 priorityIn, oaBoolean enabledIn=true)
virtual ~oaObserver ()
virtual void onPreDestroy (oaConstraintDef *def)
virtual void onPostCreate (oaConstraintDef *def)
virtual void onConflict (const oaString &name, oaType defType)

Static Public Methods

oaBoolean hasObservers ()

Detailed Description

template<>
class oaObserver<oaConstraintDef>

This base template class can be used to derive observers for oaConstraintDef objects. It supports It supports postCreate, preDestroy, 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<oaConstraintDef>::oaObserver oaUInt4    priorityIn,
oaBoolean    enabledIn = true
 

This is the oaObserver<oaConstraintDef> base class constructor. If multiple observers exist for a given oaConstraintDef 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 oaConstraintDef observers
enabledIn Determines whether this observer is called when an observed event occurs

oaObserver<oaConstraintDef>::~oaObserver   [virtual]
 

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


Member Function Documentation

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

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

void oaObserver<oaConstraintDef>::onConflict const oaString &    name,
oaType    defType
[virtual]
 

This function is called if an on-disk oaConstraintDef conflicts with an existing oaConstraintDef definition. Note that that all data associated with the conflicting definition, including the definition itself, will be destroyed following this notification.

Parameters:
name name of the conflicting oaConstraintDef
defType type of the conflicting oaConstraintDef

void oaObserver<oaConstraintDef>::onPostCreate oaConstraintDef *    def [virtual]
 

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

Parameters:
def pointer to the created oaConstraintDef object

void oaObserver<oaConstraintDef>::onPreDestroy oaConstraintDef *    def [virtual]
 

This function is called before an oaConstraintDef is destroyed. The application's derived observer class should implement this function to receive notification when an oaConstraintDef is about to be destroyed.

Parameters:
def pointer to the oaConstraintDef object about to be destroyed


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

Return to top of page