oaObserver<oaLibDefList> Class Template Reference

Inheritance diagram for oaObserver<oaLibDefList>:

oaBaseObserver


Public Methods

 oaObserver (oaUInt4 priorityIn, oaBoolean enabledIn=true)
virtual ~oaObserver ()
virtual oaBoolean onPreOpenLibs (oaLibDefList *defList)
virtual void onPostOpenLibs (oaLibDefList *defList)
virtual oaBoolean onLoadWarnings (oaLibDefList *defList, const oaString &msg, oaLibDefListWarningTypeEnum type)
virtual void onPostCreate (oaLibDefList *defList)
virtual void onPreDestroy (oaLibDefList *defList)
virtual void onPreSave (oaLibDefList *defList)
virtual void onPostSave (oaLibDefList *defList)
virtual void onPreSaveAs (oaLibDefList *defList, const oaString &name)
virtual void onPostSaveAs (oaLibDefList *defList, const oaString &name)

Static Public Methods

oaBoolean hasObservers ()

Detailed Description

template<>
class oaObserver<oaLibDefList>

This base template class can be used to derive observers for oaLibDefList objects. It supports the following event notifications:

Scoped observers are also available for oaLibDefList objects.

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


Constructor & Destructor Documentation

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

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

oaObserver<oaLibDefList>::~oaObserver   [virtual]
 

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


Member Function Documentation

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

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

oaBoolean oaObserver<oaLibDefList>::onLoadWarnings oaLibDefList *    defLst,
const oaString &    msg,
oaLibDefListWarningTypeEnum    type
[virtual]
 

This function returns a warning message in msg and an oaLibDefFileWarningTypeEnum in type if there is an error when trying load or parse the oaLibDefList pointed to by defList or when trying to open the libraries defined or included in the oaLibDefList object pointed to by defList. This observer is notified during the oaLibDefList::openLibs() operation.

Note: For historical reasons, this observer has a return value that can be set by the user, but its value has no effect on the OpenAccess calling (notification) code.

Parameters:
defLst A pointer to the oaLibDefList object that triggered the load warnings. Note that a NULL pointer is passed to defList if the default library definition file cannot be found or opened (when oaLibDefListWarningTypeEnum = oacNoDefaultLibDefListWarning || oacCannotOpenDefaultLibDefListWarning).
msg Warning message.
type An oaLibDefListWarningTypeEnum value.

void oaObserver<oaLibDefList>::onPostCreate oaLibDefList *    defList [virtual]
 

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

Parameters:
defList A pointer to the oaLibDefList object that was created.

void oaObserver<oaLibDefList>::onPostOpenLibs oaLibDefList *    defList [virtual]
 

This function is called after an oaLibDefList::openLibs or oaLibDefList::open call. The application's derived observer class should implement this function to receive notification after either of these calls.

Parameters:
defList A pointer to the oaLibDefList object on which the openLibs() or open() was invoked.

void oaObserver<oaLibDefList>::onPostSave oaLibDefList *    defList [virtual]
 

This function is called after an attempt to save an oaLibDefList object to disk. The application's derived class should implement this function to receive notification when a save has been attempted on an oaLibDefList object.

Parameters:
defList A pointer to the oaLibDefList object to be saved.

void oaObserver<oaLibDefList>::onPostSaveAs oaLibDefList *    defList,
const oaString &    name
[virtual]
 

This function is called after an attempt has been made to save an oaLibDefList object to disk under a different name. The application's derived class should implement this function to receive notification when an attempt has been made to save an oaLibDefList object under a different name.

Parameters:
defList A pointer to the oaLibDefList that was saved.
name New name for the oaLibDefList object.

void oaObserver<oaLibDefList>::onPreDestroy oaLibDefList *    defList [virtual]
 

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

Parameters:
defList A pointer to the oaLibDefList object to be destroyed.

oaBoolean oaObserver<oaLibDefList>::onPreOpenLibs oaLibDefList *    defList [virtual]
 

This function is called before an oaLibDefList::openLibs or oaLibDefList::open call. The application's derived observer class should implement this function to receive notification when either of these calls are about to be invoked. If the return value provided by the user derived observer is false, the operation is aborted.

Parameters:
defList A pointer to the oaLibDefList object on which the openLibs() or open() call is about to be invoked.

void oaObserver<oaLibDefList>::onPreSave oaLibDefList *    defList [virtual]
 

This function is called just before an oaLibDefList object is saved to disk. The application's derived class should implement this function to receive notification when an oaLibDefList object is about to be saved.

Parameters:
defList A pointer to the oaLibDefList object to be saved.

void oaObserver<oaLibDefList>::onPreSaveAs oaLibDefList *    defList,
const oaString &    name
[virtual]
 

This function is called just before an oaLibDefList object is saved to disk under a different name. The application's derived class should implement this function to receive notification when an oaLibDefList object is about to be saved with a different name.

Parameters:
defList A pointer to the oaLibDefList object to be saved.
name New name for the oaLibDefList object.


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

Return to top of page