Medical Imaging Interaction Toolkit  2024.12.99-0da743f6
Medical Imaging Interaction Toolkit
mitk::MessageBase< AbstractDelegate > Class Template Reference

#include <mitkMessage.h>

Inheritance diagram for mitk::MessageBase< AbstractDelegate >:
Collaboration diagram for mitk::MessageBase< AbstractDelegate >:

Public Types

typedef std::vector< AbstractDelegate * > ListenerList
 

Public Member Functions

virtual ~MessageBase ()
 
 MessageBase ()
 
 MessageBase (const MessageBase &o)
 
MessageBaseoperator= (const MessageBase &o)
 
void AddListener (const AbstractDelegate &delegate) const
 
void operator+= (const AbstractDelegate &delegate) const
 
void RemoveListener (const AbstractDelegate &delegate) const
 
void operator-= (const AbstractDelegate &delegate) const
 
const ListenerListGetListeners () const
 
bool HasListeners () const
 
bool IsEmpty () const
 

Protected Attributes

ListenerList m_Listeners
 List of listeners. More...
 
std::mutex m_Mutex
 

Detailed Description

template<typename AbstractDelegate>
class mitk::MessageBase< AbstractDelegate >

Definition at line 345 of file mitkMessage.h.

Member Typedef Documentation

◆ ListenerList

template<typename AbstractDelegate >
typedef std::vector<AbstractDelegate *> mitk::MessageBase< AbstractDelegate >::ListenerList

Definition at line 348 of file mitkMessage.h.

Constructor & Destructor Documentation

◆ ~MessageBase()

template<typename AbstractDelegate >
virtual mitk::MessageBase< AbstractDelegate >::~MessageBase ( )
inlinevirtual

Definition at line 350 of file mitkMessage.h.

◆ MessageBase() [1/2]

template<typename AbstractDelegate >
mitk::MessageBase< AbstractDelegate >::MessageBase ( )
inline

Definition at line 358 of file mitkMessage.h.

◆ MessageBase() [2/2]

template<typename AbstractDelegate >
mitk::MessageBase< AbstractDelegate >::MessageBase ( const MessageBase< AbstractDelegate > &  o)
inline

Definition at line 359 of file mitkMessage.h.

Member Function Documentation

◆ AddListener()

template<typename AbstractDelegate >
void mitk::MessageBase< AbstractDelegate >::AddListener ( const AbstractDelegate &  delegate) const
inline

◆ GetListeners()

template<typename AbstractDelegate >
const ListenerList& mitk::MessageBase< AbstractDelegate >::GetListeners ( ) const
inline

Definition at line 410 of file mitkMessage.h.

◆ HasListeners()

template<typename AbstractDelegate >
bool mitk::MessageBase< AbstractDelegate >::HasListeners ( ) const
inline

Definition at line 411 of file mitkMessage.h.

◆ IsEmpty()

template<typename AbstractDelegate >
bool mitk::MessageBase< AbstractDelegate >::IsEmpty ( ) const
inline

Definition at line 412 of file mitkMessage.h.

◆ operator+=()

template<typename AbstractDelegate >
void mitk::MessageBase< AbstractDelegate >::operator+= ( const AbstractDelegate &  delegate) const
inline

Definition at line 392 of file mitkMessage.h.

◆ operator-=()

template<typename AbstractDelegate >
void mitk::MessageBase< AbstractDelegate >::operator-= ( const AbstractDelegate &  delegate) const
inline

Definition at line 409 of file mitkMessage.h.

◆ operator=()

template<typename AbstractDelegate >
MessageBase& mitk::MessageBase< AbstractDelegate >::operator= ( const MessageBase< AbstractDelegate > &  o)
inline

Definition at line 367 of file mitkMessage.h.

◆ RemoveListener()

template<typename AbstractDelegate >
void mitk::MessageBase< AbstractDelegate >::RemoveListener ( const AbstractDelegate &  delegate) const
inline

Member Data Documentation

◆ m_Listeners

template<typename AbstractDelegate >
ListenerList mitk::MessageBase< AbstractDelegate >::m_Listeners
mutableprotected

List of listeners.

This is declared mutable for a reason: Imagine an object that sends out notifications and someone gets a const Database object, because he/she should not write to the database. He/she should anyway be able to register for notifications about changes in the database – this is why AddListener and RemoveListener are declared const. m_Listeners must be mutable so that AddListener and RemoveListener can modify it regardless of the object's constness.

Definition at line 423 of file mitkMessage.h.

Referenced by mitk::MessageBase< MessageAbstractDelegate3< double, double, bool, void > >::AddListener(), mitk::MessageBase< MessageAbstractDelegate3< double, double, bool, void > >::GetListeners(), mitk::MessageBase< MessageAbstractDelegate3< double, double, bool, void > >::HasListeners(), mitk::MessageBase< MessageAbstractDelegate3< double, double, bool, void > >::IsEmpty(), mitk::MessageBase< MessageAbstractDelegate3< double, double, bool, void > >::MessageBase(), mitk::MessageBase< MessageAbstractDelegate3< double, double, bool, void > >::operator=(), mitk::MessageBase< MessageAbstractDelegate3< double, double, bool, void > >::RemoveListener(), and mitk::MessageBase< MessageAbstractDelegate3< double, double, bool, void > >::~MessageBase().

◆ m_Mutex

template<typename AbstractDelegate >
std::mutex mitk::MessageBase< AbstractDelegate >::m_Mutex
mutableprotected

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