oaObserver<T, V> Class Template Reference

Inheritance diagram for oaObserver<T, V>:

oaStdObserver<T, oaTraits<T>::modTypeType> oaBaseObserver


Public Methods

 oaObserver (oaUInt4 priorityIn, oaBoolean enabledIn=true)
virtual ~oaObserver ()
virtual void onBeginCreate (oaObject *owner, oaUInt4 scopeID)
virtual void onEndCreate (T *object, oaUInt4 scopeID)
virtual void onBeginDestroy (T *object, oaUInt4 scopeID)
virtual void onEndDestroy (oaObject *owner, oaUInt4 scopeID)

Static Public Methods

oaBoolean hasObservers ()

Detailed Description

template<class T>
class oaObserver<T, V>

This base template class can be used to derive scoped observers notifications. Scoped observer notifications span the entire range of the create() and destroy() function calls.

Note: The V template argument allows only the constant as defined by oaRevisionTraits<T>::scopedObserverRevision.

For example, consider an oaNet::destroy operation. This operation can be considered hierarchical in that a higher level call results in several side effects:

An application can use the onBeginDestroy and onEndDestroy scoped observer notifications to monitor the entire range of the destroy operation.

Authors of plug-ins that use the OpenAccess change management system to synchronize design changes from multiple processes use scoped observers to group information about hierarchical design changes.

For more information about scoped observers, refer to Scoped Observer Notifications in the OpenAccess Observers section of the Programmers Guide.


Constructor & Destructor Documentation

template<class T>
oaObserver<T, V>::oaObserver oaUInt4    priorityIn,
oaBoolean    enabledIn = true
 

This is the constructor for scoped observers.

template<class T>
oaObserver<T, V>::~oaObserver   [virtual]
 

This is the destructor for scoped observers.


Member Function Documentation

template<class T>
oaBoolean oaObserver<T, V>::hasObservers   [static]
 

Returns a boolean indicating whether or not this object has scoped observers.

Reimplemented from oaStdObserver<T, oaTraits<T>::modTypeType>.

template<class T>
void oaObserver<T, V>::onBeginCreate oaObject *    owner,
oaUInt4    scopeID
[virtual]
 

This function is called when the creation sequence for an object begins. It marks the beginning of a set of scoped changes.

Refer to Scoped Observer Notifications in the OpenAccess Observers section of the Programmers Guide for more information.

Parameters:
owner Owning object for the object being created.
scopeID Unique ID for a set of scoped changes.

template<class T>
void oaObserver<T, V>::onBeginDestroy T *    object,
oaUInt4    scopeID
[virtual]
 

This function is called when the destruction sequence for an object begins. It marks the beginning of a set of scoped changes.

Refer to Scoped Observer Notifications in the OpenAccess Observers section of the Programmers Guide for more information.

Parameters:
object Object that is being destroyed.
scopeID Unique ID for a set of scoped changes.

template<class T>
void oaObserver<T, V>::onEndCreate T *    object,
oaUInt4    scopeID
[virtual]
 

This function is called when the creation sequence for an object ends. It marks the end of a set of scoped changes.

Refer to Scoped Observer Notifications in the OpenAccess Observers section of the Programmers Guide for more information.

Parameters:
object Object that was created.
scopeID Unique ID for a set of scoped changes.

template<class T>
void oaObserver<T, V>::onEndDestroy oaObject *    owner,
oaUInt4    scopeID
[virtual]
 

This function is called when the destruction sequence for an object ends. It marks the end of a set of scoped changes.

Refer to Scoped Observer Notifications in the OpenAccess Observers section of the Programmers Guide for more information.

Parameters:
owner Owning object for the object that was destroyed.
scopeID Unique ID for a set of scoped changes.


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

Return to top of page