Medical Imaging Interaction Toolkit
2024.12.99-0da743f6
Medical Imaging Interaction Toolkit
|
Event/message/notification class. More...
#include <mitkMessage.h>
Public Types | |
typedef MessageBase< MessageAbstractDelegate< A > > | Super |
typedef Super::ListenerList | ListenerList |
Public Types inherited from mitk::MessageBase< MessageAbstractDelegate< void > > | |
typedef std::vector< MessageAbstractDelegate< void > * > | ListenerList |
Public Member Functions | |
void | Send () const |
void | operator() () const |
Public Member Functions inherited from mitk::MessageBase< MessageAbstractDelegate< void > > | |
virtual | ~MessageBase () |
MessageBase () | |
MessageBase (const MessageBase &o) | |
MessageBase & | operator= (const MessageBase &o) |
void | AddListener (const MessageAbstractDelegate< void > &delegate) const |
void | operator+= (const MessageAbstractDelegate< void > &delegate) const |
void | RemoveListener (const MessageAbstractDelegate< void > &delegate) const |
void | operator-= (const MessageAbstractDelegate< void > &delegate) const |
const ListenerList & | GetListeners () const |
bool | HasListeners () const |
bool | IsEmpty () const |
Additional Inherited Members | |
Protected Attributes inherited from mitk::MessageBase< MessageAbstractDelegate< void > > | |
ListenerList | m_Listeners |
List of listeners. More... | |
std::mutex | m_Mutex |
Event/message/notification class.
This totally ITK, Qt, VTK, whatever toolkit independent class allows one class to send out messages and another class to receive these message. This class is templated over the return type (A) of the callback functions. There are variations of this class (Message1, Message2, etc.) for sending one, two or more parameters along with the messages.
This is an implementation of the Observer pattern.
To conveniently add methods for registering/unregistering observers to Message variables of your class, you can use the mitkNewMessageMacro macros.
Definition at line 452 of file mitkMessage.h.
typedef Super::ListenerList mitk::Message< A >::ListenerList |
Definition at line 456 of file mitkMessage.h.
typedef MessageBase<MessageAbstractDelegate<A> > mitk::Message< A >::Super |
Definition at line 455 of file mitkMessage.h.
|
inline |
Definition at line 475 of file mitkMessage.h.
References mitk::Message< A >::Send().
|
inline |
Definition at line 458 of file mitkMessage.h.
References mitk::MessageBase< MessageAbstractDelegate< void > >::m_Listeners, and mitk::MessageBase< MessageAbstractDelegate< void > >::m_Mutex.
Referenced by mitk::Message< A >::operator()().