|
MeVisLab Toolbox Reference
|
Class for all CSO events. More...
#include <CSOEvent.h>
Public Member Functions | |
| CSOEvent () | |
| Standard constructor. | |
| CSOEvent (CSOEventType eventTypeArg, bool isPostCommandArg=true) | |
| Constructor taking an event type and whether it is a pre/post command. | |
| CSOEvent & | operator= (const CSOEvent &event) |
| Assignment operator. | |
| bool | hasCSOIds () const |
| Returns whether CSO IDs are registered with this event. | |
| bool | hasGroupIds () const |
| Returns whether CSOGroup IDs are registered with this event. | |
| void | addCSOId (unsigned int id) |
| Adds a CSO ID if id is not INVALID_CSO_ID. | |
| void | addGroupId (unsigned int id) |
| Adds a CSOGroup ID if id is not INVALID_CSO_ID. | |
| void | addCSOIds (const CSOIdVector &csoIds) |
| Adds all given CSO IDs if an ID is not INVALID_CSO_ID. | |
| void | addGroupIds (const CSOIdVector &groupIds) |
| Adds all given CSOGroup IDs if an ID is not INVALID_CSO_ID. | |
| const CSOIdVector & | csoIds () const |
| Returns the vector with CSO IDs. | |
| const CSOIdVector & | groupIds () const |
| Returns the vector with CSOGroup IDs. | |
| CSOEventType | eventType () const |
| Returns the event type. | |
| void | setEventType (CSOEventType eventTypeArg) |
| Sets the event type. | |
| bool | isPostCommand () const |
| Returns whether the event is a post command. | |
| bool | isPreCommand () const |
| Returns whether the event is a pre command. | |
| void | setIsPostCommand (bool flag) |
| Sets whether the event is a pre or post command. | |
| void | setSenderType (const std::string &senderTypeArg) |
| Sets the sender type string. This is typically the module type from where the event is sent. | |
| std::string | senderType () const |
| Returns the sender type string. This is typically the module type from where the event is sent. | |
| void | setSenderName (const std::string &senderNameArg) |
| Sets the sender name string. This is typically the module instance name from where the event is sent. | |
| std::string | senderName () const |
| Returns the sender name string. This is typically the module instance name from where the event is sent. | |
| void | setCustomMessage (const std::string &customMessageArg) |
| Sets the custom message string. | |
| std::string | customMessage () const |
| Returns the custom message string. | |
| void | setModuleEventGroupId (MLuint64 id) |
| Sets a unique event ID. This is done by the module CSOGroup scope class. No need to temper with it. | |
| MLuint64 | moduleEventGroupId () const |
| Returns a unique module CSOGroup event ID. | |
| ML_CLASS_HEADER (CSOEvent) | |
Public Member Functions inherited from ml::BaseEvent | |
| BaseEvent () | |
| virtual | ~BaseEvent () |
| EventSource * | source () const |
| Returns the Base object emitting this event. | |
Static Public Member Functions | |
| static std::string | getEventTypeName (CSOEventType eventType) |
| Maps event types to strings with their name. | |
Protected Attributes | |
| CSOIdVector | _csoIds |
| Vector of CSO IDs. | |
| CSOIdVector | _groupIds |
| Vector of CSOGroup IDs. | |
| CSOEventType | _eventType |
| The event type. | |
| bool | _isPostCommand |
| Whether it is a pre or post command. | |
| 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 47 of file CSOEvent.h.
|
inline |
Standard constructor.
Definition at line 108 of file CSOEvent.h.
|
inline |
Constructor taking an event type and whether it is a pre/post command.
Definition at line 116 of file CSOEvent.h.
References mlrange_cast().
| void ml::CSOEvent::addCSOIds | ( | const CSOIdVector & | csoIds | ) |
Adds all given CSO IDs if an 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 148 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 219 of file CSOEvent.h.
|
inline |
Returns the event type.
Definition at line 159 of file CSOEvent.h.
|
static |
Maps event types to strings with their name.
|
inline |
Returns the vector with CSOGroup IDs.
Definition at line 153 of file CSOEvent.h.
|
inline |
Returns whether CSO IDs are registered with this event.
Definition at line 127 of file CSOEvent.h.
|
inline |
Returns whether CSOGroup IDs are registered with this event.
Definition at line 132 of file CSOEvent.h.
|
inline |
Returns whether the event is a post command.
Definition at line 174 of file CSOEvent.h.
|
inline |
Returns whether the event is a pre command.
Definition at line 179 of file CSOEvent.h.
| ml::CSOEvent::ML_CLASS_HEADER | ( | CSOEvent | ) |
|
inline |
Returns a unique module CSOGroup event ID.
Definition at line 230 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 206 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 195 of file CSOEvent.h.
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 213 of file CSOEvent.h.
References mlrange_cast().
|
inline |
Sets whether the event is a pre or post command.
Definition at line 184 of file CSOEvent.h.
References mlrange_cast().
Sets a unique event ID. This is done by the module CSOGroup scope class. No need to temper with it.
Definition at line 225 of file CSOEvent.h.
Sets the sender name string. This is typically the module instance name from where the event is sent.
Definition at line 201 of file CSOEvent.h.
References mlrange_cast().
Sets the sender type string. This is typically the module type from where the event is sent.
Definition at line 190 of file CSOEvent.h.
References mlrange_cast().
|
protected |
Vector of CSO IDs.
Definition at line 239 of file CSOEvent.h.
|
protected |
Definition at line 252 of file CSOEvent.h.
|
protected |
The event type.
Definition at line 243 of file CSOEvent.h.
|
protected |
Vector of CSOGroup IDs.
Definition at line 241 of file CSOEvent.h.
|
protected |
Whether it is a pre or post command.
Definition at line 245 of file CSOEvent.h.
|
protected |
Definition at line 254 of file CSOEvent.h.
|
protected |
Definition at line 250 of file CSOEvent.h.
|
protected |
Definition at line 248 of file CSOEvent.h.