|
Medical Imaging Interaction Toolkit
2026.06.00
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 |
| Add a listener delegate. Duplicates are silently ignored. More... | |
| void | operator+= (const MessageAbstractDelegate< void > &delegate) const |
| Shorthand for AddListener(). More... | |
| void | RemoveListener (const MessageAbstractDelegate< void > &delegate) const |
| Remove a listener delegate. If not found, nothing happens. More... | |
| void | operator-= (const MessageAbstractDelegate< void > &delegate) const |
| Shorthand for RemoveListener(). More... | |
| const ListenerList & | GetListeners () const |
| Get the list of currently registered listeners. More... | |
| bool | HasListeners () const |
| Check whether any listeners are registered. More... | |
| bool | IsEmpty () const |
| Check whether the listener list is empty. More... | |
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 520 of file mitkMessage.h.
| typedef Super::ListenerList mitk::Message< A >::ListenerList |
Definition at line 524 of file mitkMessage.h.
| typedef MessageBase<MessageAbstractDelegate<A> > mitk::Message< A >::Super |
Definition at line 523 of file mitkMessage.h.
|
inline |
Definition at line 543 of file mitkMessage.h.
References mitk::Message< A >::Send().
|
inline |
Definition at line 526 of file mitkMessage.h.
References mitk::MessageBase< MessageAbstractDelegate< void > >::m_Listeners, and mitk::MessageBase< MessageAbstractDelegate< void > >::m_Mutex.
Referenced by mitk::Message< A >::operator()().