Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
us::ModuleEvent Class Reference

#include <usModuleEvent.h>

Public Types

enum  Type { LOADED, UNLOADED, LOADING, UNLOADING }
 

Public Member Functions

 ModuleEvent ()
 
 ~ModuleEvent ()
 
bool IsNull () const
 
 ModuleEvent (Type type, Module *module)
 
 ModuleEvent (const ModuleEvent &other)
 
ModuleEventoperator= (const ModuleEvent &other)
 
ModuleGetModule () const
 
Type GetType () const
 

Detailed Description

An event from the Micro Services framework describing a module lifecycle change.

ModuleEvent objects are delivered to listeners connected via ModuleContext::AddModuleListener() when a change occurs in a modules's lifecycle. A type code is used to identify the event type for future extendability.

See also
ModuleContext::AddModuleListener

Definition at line 51 of file usModuleEvent.h.

Constructor & Destructor Documentation

us::ModuleEvent::ModuleEvent ( )

Creates an invalid instance.

Definition at line 53 of file usModuleEvent.cpp.

us::ModuleEvent::~ModuleEvent ( )

Definition at line 59 of file usModuleEvent.cpp.

us::ModuleEvent::ModuleEvent ( Type  type,
Module module 
)

Creates a module event of the specified type.

Parameters
typeThe event type.
moduleThe module which had a lifecycle change.

Definition at line 69 of file usModuleEvent.cpp.

us::ModuleEvent::ModuleEvent ( const ModuleEvent other)

Definition at line 75 of file usModuleEvent.cpp.

Member Function Documentation

Module * us::ModuleEvent::GetModule ( ) const

Returns the module which had a lifecycle change.

Returns
The module that had a change occur in its lifecycle.

Definition at line 87 of file usModuleEvent.cpp.

ModuleEvent::Type us::ModuleEvent::GetType ( ) const

Returns the type of lifecyle event. The type values are:

Returns
The type of lifecycle event.

Definition at line 92 of file usModuleEvent.cpp.

bool us::ModuleEvent::IsNull ( ) const

Can be used to check if this ModuleEvent instance is valid, or if it has been constructed using the default constructor.

Returns
true if this event object is valid, false otherwise.

Definition at line 64 of file usModuleEvent.cpp.

Referenced by us::operator<<().

ModuleEvent & us::ModuleEvent::operator= ( const ModuleEvent other)

Definition at line 81 of file usModuleEvent.cpp.


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