MeVisLab Toolbox Reference
|
Class for all CSO events. More...
#include <CSOEvent.h>
Public Member Functions | |
CSOEvent () | |
Standard constructor. More... | |
CSOEvent (CSOEventType eventTypeArg, bool isPostCommandArg=true) | |
Constructor taking an event type and whether it is a pre/post command. More... | |
CSOEvent & | operator= (const CSOEvent &event) |
Assignment operator. More... | |
bool | hasCSOIds () const |
Returns whether CSO ids are registered with this event. More... | |
bool | hasGroupIds () const |
Returns whether CSOGroup ids are registered with this event. More... | |
void | addCSOId (unsigned int id) |
Adds a CSO id if id is not INVALID_CSO_ID. More... | |
void | addGroupId (unsigned int id) |
Adds a CSOGroup id if id is not INVALID_CSO_ID. More... | |
void | addCSOIds (const CSOIdVector &csoIds) |
Adds all given CSO ids if an id is not INVALID_CSO_ID. More... | |
void | addGroupIds (const CSOIdVector &groupIds) |
Adds all given CSOGroup ids if an id is not INVALID_CSO_ID. More... | |
const CSOIdVector & | csoIds () const |
Returns the vector with CSO ids. More... | |
const CSOIdVector & | groupIds () const |
Returns the vector with CSOGroup ids. More... | |
CSOEventType | eventType () const |
Returns the event type. More... | |
void | setEventType (CSOEventType eventTypeArg) |
Sets the event type. More... | |
bool | isPostCommand () const |
Returns whether the event is a post command. More... | |
bool | isPreCommand () const |
Returns whether the event is a pre command. More... | |
void | setIsPostCommand (bool flag) |
Sets whether the event is a pre or post command. More... | |
void | setSenderType (const std::string &senderTypeArg) |
Sets the sender type string. This is typically the module type from where the event is sent. More... | |
std::string | senderType () const |
Returns the sender type string. This is typically the module type from where the event is sent. More... | |
void | setSenderName (const std::string &senderNameArg) |
Sets the sender name string. This is typically the module instance name from where the event is sent. More... | |
std::string | senderName () const |
Returns the sender name string. This is typically the module instance name from where the event is sent. More... | |
void | setCustomMessage (const std::string &customMessageArg) |
Sets the custom message string. This can be used to identify the method or the subroutine from where the event is sent. More... | |
std::string | customMessage () const |
Returns the custom message string. This can be used to identify the method or the subroutine from where the event is sent. More... | |
void | setModuleEventGroupId (MLuint64 id) |
Sets a unique event id. This is done by the module group scope class. No need to temper with it. More... | |
MLuint64 | moduleEventGroupId () const |
Returns a unique module group event id. More... | |
ML_CLASS_HEADER (CSOEvent) | |
![]() | |
BaseEvent () | |
virtual | ~BaseEvent () |
EventSource * | source () const |
Returns the Base object emitting this event. More... | |
Static Public Member Functions | |
static std::string | getEventTypeName (CSOEventType eventType) |
Maps event types to strings with their name. More... | |
Protected Attributes | |
CSOIdVector | _csoIds |
Vector of CSO ids. More... | |
CSOIdVector | _groupIds |
Vector of CSOGroup ids. More... | |
CSOEventType | _eventType |
The event type. More... | |
bool | _isPostCommand |
Whether it is a pre or post command. More... | |
std::string | _senderType |
std::string | _senderName |
std::string | _customMessage |
MLuint64 | _moduleEventGroupId |
Class for all CSO events.
An event carries an event type, information about CSO / CSOGroup ids (if available), as well as a number of strings to identify the event source. Those strings are set only by modules, if the event is sent by a basic method in CSOList, CSO, or CSOGroup, those strings are left empty. If the event is sent by a module, it also has a unique identifier to make it easy to match open/close event pairs. Application events are once send before something happens, and after something has happened. So there is a pre-event and a post-event, distinguishable by the 'isPostCommand' flag.
Definition at line 38 of file CSOEvent.h.
Enumeration for specifying the exact type of event.
Definition at line 48 of file CSOEvent.h.
|
inline |
Standard constructor.
Definition at line 110 of file CSOEvent.h.
|
inline |
Constructor taking an event type and whether it is a pre/post command.
Definition at line 118 of file CSOEvent.h.
void ml::CSOEvent::addCSOId | ( | unsigned int | id | ) |
Adds a CSO id if id is not INVALID_CSO_ID.
void ml::CSOEvent::addCSOIds | ( | const CSOIdVector & | csoIds | ) |
Adds all given CSO ids if an id is not INVALID_CSO_ID.
void ml::CSOEvent::addGroupId | ( | unsigned int | id | ) |
Adds a CSOGroup id if id is not INVALID_CSO_ID.
void ml::CSOEvent::addGroupIds | ( | const CSOIdVector & | groupIds | ) |
Adds all given CSOGroup ids if an id is not INVALID_CSO_ID.
|
inline |
Returns the vector with CSO ids.
Definition at line 144 of file CSOEvent.h.
|
inline |
Returns the custom message string. This can be used to identify the method or the subroutine from where the event is sent.
Definition at line 177 of file CSOEvent.h.
|
inline |
Returns the event type.
Definition at line 149 of file CSOEvent.h.
|
static |
Maps event types to strings with their name.
|
inline |
Returns the vector with CSOGroup ids.
Definition at line 146 of file CSOEvent.h.
|
inline |
Returns whether CSO ids are registered with this event.
Definition at line 129 of file CSOEvent.h.
|
inline |
Returns whether CSOGroup ids are registered with this event.
Definition at line 131 of file CSOEvent.h.
|
inline |
Returns whether the event is a post command.
Definition at line 158 of file CSOEvent.h.
|
inline |
Returns whether the event is a pre command.
Definition at line 160 of file CSOEvent.h.
ml::CSOEvent::ML_CLASS_HEADER | ( | CSOEvent | ) |
|
inline |
Returns a unique module group event id.
Definition at line 182 of file CSOEvent.h.
|
inline |
Returns the sender name string. This is typically the module instance name from where the event is sent.
Definition at line 172 of file CSOEvent.h.
|
inline |
Returns the sender type string. This is typically the module type from where the event is sent.
Definition at line 167 of file CSOEvent.h.
|
inline |
Sets the custom message string. This can be used to identify the method or the subroutine from where the event is sent.
Definition at line 175 of file CSOEvent.h.
|
inline |
Sets the event type.
Definition at line 155 of file CSOEvent.h.
|
inline |
Sets whether the event is a pre or post command.
Definition at line 162 of file CSOEvent.h.
|
inline |
Sets a unique event id. This is done by the module group scope class. No need to temper with it.
Definition at line 180 of file CSOEvent.h.
|
inline |
Sets the sender name string. This is typically the module instance name from where the event is sent.
Definition at line 170 of file CSOEvent.h.
|
inline |
Sets the sender type string. This is typically the module type from where the event is sent.
Definition at line 165 of file CSOEvent.h.
|
protected |
Vector of CSO ids.
Definition at line 189 of file CSOEvent.h.
|
protected |
Definition at line 202 of file CSOEvent.h.
|
protected |
The event type.
Definition at line 193 of file CSOEvent.h.
|
protected |
Vector of CSOGroup ids.
Definition at line 191 of file CSOEvent.h.
|
protected |
Whether it is a pre or post command.
Definition at line 195 of file CSOEvent.h.
|
protected |
Definition at line 204 of file CSOEvent.h.
|
protected |
Definition at line 200 of file CSOEvent.h.
|
protected |
Definition at line 198 of file CSOEvent.h.