Medical Imaging Interaction Toolkit  2021.02.99-c7792db0
Medical Imaging Interaction Toolkit
mitkMessage.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef mitkMessageHIncluded
14 #define mitkMessageHIncluded
15 
16 #include <functional>
17 #include <itkSimpleFastMutexLock.h>
18 #include <vector>
19 
24 #define mitkNewMessageMacro(msgHandleObject) \
25 private: \
26  ::mitk::Message<> m_##msgHandleObject##Message; \
27  \
28 public: \
29  inline void Add##msgHandleObject##Listener(const ::mitk::MessageAbstractDelegate<> &delegate) \
30  { \
31  m_##msgHandleObject##Message += delegate; \
32  } \
33  inline void Remove##msgHandleObject##Listener(const ::mitk::MessageAbstractDelegate<> &delegate) \
34  { \
35  m_##msgHandleObject##Message -= delegate; \
36  }
37 
38 #define mitkNewMessageWithReturnMacro(msgHandleObject, returnType) \
39 private: \
40  ::mitk::Message<returnType> m_##msgHandleObject##Message; \
41  \
42 public: \
43  inline void Add##msgHandleObject##Listener(const ::mitk::MessageAbstractDelegate<returnType> &delegate) \
44  { \
45  m_##msgHandleObject##Message += delegate; \
46  } \
47  inline void Remove##msgHandleObject##Listener(const ::mitk::MessageAbstractDelegate<returnType> &delegate) \
48  { \
49  m_##msgHandleObject##Message -= delegate; \
50  }
51 
52 #define mitkNewMessage1Macro(msgHandleObject, type1) \
53 private: \
54  ::mitk::Message1<type1> m_##msgHandleObject##Message; \
55  \
56 public: \
57  void Add##msgHandleObject##Listener(const ::mitk::MessageAbstractDelegate1<type1> &delegate) \
58  { \
59  m_##msgHandleObject##Message += delegate; \
60  } \
61  void Remove##msgHandleObject##Listener(const ::mitk::MessageAbstractDelegate1<type1> &delegate) \
62  { \
63  m_##msgHandleObject##Message -= delegate; \
64  }
65 
66 #define mitkNewMessage2Macro(msgHandleObject, type1, type2) \
67 private: \
68  ::mitk::Message2<type1, type2> m_##msgHandleObject##Message; \
69  \
70 public: \
71  void Add##msgHandleObject##Listener(const ::mitk::MessageAbstractDelegate2<type1, type2> &delegate) \
72  { \
73  m_##msgHandleObject##Message += delegate; \
74  } \
75  void Remove##msgHandleObject##Listener(const ::mitk::MessageAbstractDelegate2<type1, type2> &delegate) \
76  { \
77  m_##msgHandleObject##Message -= delegate; \
78  }
79 
80 namespace mitk
81 {
82  template <typename A = void>
84  {
85  public:
87  virtual A Execute() const = 0;
88  virtual bool operator==(const MessageAbstractDelegate *cmd) const = 0;
89  virtual MessageAbstractDelegate *Clone() const = 0;
90  };
91 
92  template <typename T, typename A = void>
94  {
95  public:
97  virtual A Execute(T t) const = 0;
98  virtual bool operator==(const MessageAbstractDelegate1 *cmd) const = 0;
99  virtual MessageAbstractDelegate1 *Clone() const = 0;
100  };
101 
102  template <typename T, typename U, typename A = void>
104  {
105  public:
107  virtual A Execute(T t, U u) const = 0;
108  virtual bool operator==(const MessageAbstractDelegate2 *cmd) const = 0;
109  virtual MessageAbstractDelegate2 *Clone() const = 0;
110  };
111 
112  template <typename T, typename U, typename V, typename A = void>
114  {
115  public:
117  virtual A Execute(T t, U u, V v) const = 0;
118  virtual bool operator==(const MessageAbstractDelegate3 *cmd) const = 0;
119  virtual MessageAbstractDelegate3 *Clone() const = 0;
120  };
121 
122  template <typename T, typename U, typename V, typename W, typename A = void>
124  {
125  public:
127  virtual A Execute(T t, U u, V v, W w) const = 0;
128  virtual bool operator==(const MessageAbstractDelegate4 *cmd) const = 0;
129  virtual MessageAbstractDelegate4 *Clone() const = 0;
130  };
131 
140  template <class R, typename A = void>
142  {
143  public:
144  // constructor - takes pointer to an object and pointer to a member and stores
145  // them in two private variables
146  MessageDelegate(R *object, A (R::*memberFunctionPointer)())
147  : m_Object(object), m_MemberFunctionPointer(memberFunctionPointer)
148  {
149  }
150 
151  ~MessageDelegate() override {}
152  // override function "Call"
153  A Execute() const override
154  {
155  return (m_Object->*m_MemberFunctionPointer)(); // execute member function
156  }
157 
158  bool operator==(const MessageAbstractDelegate<A> *c) const override
159  {
160  const MessageDelegate<R, A> *cmd = dynamic_cast<const MessageDelegate<R, A> *>(c);
161  if (!cmd)
162  return false;
163 
164  if ((void *)this->m_Object != (void *)cmd->m_Object)
165  return false;
166  if (this->m_MemberFunctionPointer != cmd->m_MemberFunctionPointer)
167  return false;
168  return true;
169  }
170 
171  MessageAbstractDelegate<A> *Clone() const override { return new MessageDelegate(m_Object, m_MemberFunctionPointer); }
172  private:
173  R *m_Object; // pointer to object
174  A (R::*m_MemberFunctionPointer)(); // pointer to member function
175  };
176 
188  template <class R, typename T, typename A = void>
190  {
191  public:
192  // constructor - takes pointer to an object and pointer to a member and stores
193  // them in two private variables
194  MessageDelegate1(R *object, A (R::*memberFunctionPointer)(T))
195  : m_Object(object), m_MemberFunctionPointer(memberFunctionPointer)
196  {
197  }
198 
199  ~MessageDelegate1() override {}
200  // override function "Call"
201  A Execute(T t) const override
202  {
203  return (m_Object->*m_MemberFunctionPointer)(t); // execute member function
204  }
205 
206  bool operator==(const MessageAbstractDelegate1<T, A> *c) const override
207  {
208  const MessageDelegate1<R, T, A> *cmd = dynamic_cast<const MessageDelegate1<R, T, A> *>(c);
209  if (!cmd)
210  return false;
211 
212  if ((void *)this->m_Object != (void *)cmd->m_Object)
213  return false;
214  if (this->m_MemberFunctionPointer != cmd->m_MemberFunctionPointer)
215  return false;
216  return true;
217  }
218 
219  MessageAbstractDelegate1<T, A> *Clone() const override { return new MessageDelegate1(m_Object, m_MemberFunctionPointer); }
220  private:
221  R *m_Object; // pointer to object
222  A (R::*m_MemberFunctionPointer)(T); // pointer to member function
223  };
224 
225  template <class R, typename T, typename U, typename A = void>
227  {
228  public:
229  // constructor - takes pointer to an object and pointer to a member and stores
230  // them in two private variables
231  MessageDelegate2(R *object, A (R::*memberFunctionPointer)(T, U))
232  : m_Object(object), m_MemberFunctionPointer(memberFunctionPointer)
233  {
234  }
235 
236  ~MessageDelegate2() override {}
237  // override function "Call"
238  A Execute(T t, U u) const override
239  {
240  return (m_Object->*m_MemberFunctionPointer)(t, u); // execute member function
241  }
242 
243  bool operator==(const MessageAbstractDelegate2<T, U, A> *c) const override
244  {
245  const MessageDelegate2<R, T, U, A> *cmd = dynamic_cast<const MessageDelegate2<R, T, U, A> *>(c);
246  if (!cmd)
247  return false;
248 
249  if ((void *)this->m_Object != (void *)cmd->m_Object)
250  return false;
251  if (this->m_MemberFunctionPointer != cmd->m_MemberFunctionPointer)
252  return false;
253  return true;
254  }
255 
256  MessageAbstractDelegate2<T, U, A> *Clone() const override { return new MessageDelegate2(m_Object, m_MemberFunctionPointer); }
257  private:
258  R *m_Object; // pointer to object
259  A (R::*m_MemberFunctionPointer)(T, U); // pointer to member function
260  };
261 
262  template <class R, typename T, typename U, typename V, typename A = void>
263  class MessageDelegate3 : public MessageAbstractDelegate3<T, U, V, A>
264  {
265  public:
266  // constructor - takes pointer to an object and pointer to a member and stores
267  // them in two private variables
268  MessageDelegate3(R *object, A (R::*memberFunctionPointer)(T, U, V))
269  : m_Object(object), m_MemberFunctionPointer(memberFunctionPointer)
270  {
271  }
272 
273  ~MessageDelegate3() override {}
274  // override function "Call"
275  A Execute(T t, U u, V v) const override
276  {
277  return (m_Object->*m_MemberFunctionPointer)(t, u, v); // execute member function
278  }
279 
280  bool operator==(const MessageAbstractDelegate3<T, U, V, A> *c) const override
281  {
282  const MessageDelegate3<R, T, U, V, A> *cmd = dynamic_cast<const MessageDelegate3<R, T, U, V, A> *>(c);
283  if (!cmd)
284  return false;
285 
286  if ((void *)this->m_Object != (void *)cmd->m_Object)
287  return false;
288  if (this->m_MemberFunctionPointer != cmd->m_MemberFunctionPointer)
289  return false;
290  return true;
291  }
292 
294  {
295  return new MessageDelegate3(m_Object, m_MemberFunctionPointer);
296  }
297 
298  private:
299  R *m_Object; // pointer to object
300  A (R::*m_MemberFunctionPointer)(T, U, V); // pointer to member function
301  };
302 
303  template <class R, typename T, typename U, typename V, typename W, typename A = void>
304  class MessageDelegate4 : public MessageAbstractDelegate4<T, U, V, W, A>
305  {
306  public:
307  // constructor - takes pointer to an object and pointer to a member and stores
308  // them in two private variables
309  MessageDelegate4(R *object, A (R::*memberFunctionPointer)(T, U, V, W))
310  : m_Object(object), m_MemberFunctionPointer(memberFunctionPointer)
311  {
312  }
313 
314  virtual ~MessageDelegate4() {}
315  // override function "Call"
316  virtual A Execute(T t, U u, V v, W w) const
317  {
318  return (m_Object->*m_MemberFunctionPointer)(t, u, v, w); // execute member function
319  }
320 
322  {
323  const MessageDelegate4<R, T, U, V, W, A> *cmd = dynamic_cast<const MessageDelegate4<R, T, U, V, W, A> *>(c);
324  if (!cmd)
325  return false;
326 
327  if ((void *)this->m_Object != (void *)cmd->m_Object)
328  return false;
329  if (this->m_MemberFunctionPointer != cmd->m_MemberFunctionPointer)
330  return false;
331  return true;
332  }
333 
335  {
336  return new MessageDelegate4(m_Object, m_MemberFunctionPointer);
337  }
338 
339  private:
340  R *m_Object; // pointer to object
341  A (R::*m_MemberFunctionPointer)(T, U, V, W); // pointer to member function
342  };
343 
344  template <typename AbstractDelegate>
346  {
347  public:
348  typedef std::vector<AbstractDelegate *> ListenerList;
349 
350  virtual ~MessageBase()
351  {
352  for (auto iter = m_Listeners.begin(); iter != m_Listeners.end(); ++iter)
353  {
354  delete *iter;
355  }
356  }
357 
360  {
361  for (typename ListenerList::iterator iter = o.m_Listeners.begin(); iter != o.m_Listeners.end(); ++iter)
362  {
363  m_Listeners.push_back((*iter)->Clone());
364  }
365  }
366 
368  {
369  MessageBase tmp(o);
370  std::swap(tmp.m_Listeners, this->m_Listeners);
371  return *this;
372  }
373 
374  void AddListener(const AbstractDelegate &delegate) const
375  {
376  AbstractDelegate *msgCmd = delegate.Clone();
377 
378  m_Mutex.Lock();
379  for (auto iter = m_Listeners.begin(); iter != m_Listeners.end(); ++iter)
380  {
381  if ((*iter)->operator==(msgCmd))
382  {
383  delete msgCmd;
384  m_Mutex.Unlock();
385  return;
386  }
387  }
388  m_Listeners.push_back(msgCmd);
389  m_Mutex.Unlock();
390  }
391 
392  void operator+=(const AbstractDelegate &delegate) const { this->AddListener(delegate); }
393  void RemoveListener(const AbstractDelegate &delegate) const
394  {
395  m_Mutex.Lock();
396  for (auto iter = m_Listeners.begin(); iter != m_Listeners.end(); ++iter)
397  {
398  if ((*iter)->operator==(&delegate))
399  {
400  delete *iter;
401  m_Listeners.erase(iter);
402  m_Mutex.Unlock();
403  return;
404  }
405  }
406  m_Mutex.Unlock();
407  }
408 
409  void operator-=(const AbstractDelegate &delegate) const { this->RemoveListener(delegate); }
410  const ListenerList &GetListeners() const { return m_Listeners; }
411  bool HasListeners() const { return !m_Listeners.empty(); }
412  bool IsEmpty() const { return m_Listeners.empty(); }
413  protected:
423  mutable ListenerList m_Listeners;
424  mutable itk::SimpleFastMutexLock m_Mutex;
425  };
426 
451  template <typename A = void>
452  class Message : public MessageBase<MessageAbstractDelegate<A>>
453  {
454  public:
457 
458  void Send() const
459  {
460  ListenerList listeners;
461 
462  {
463  this->m_Mutex.Lock();
464  listeners.assign(this->m_Listeners.begin(), this->m_Listeners.end());
465  this->m_Mutex.Unlock();
466  }
467 
468  for (auto iter = listeners.begin(); iter != listeners.end(); ++iter)
469  {
470  // notify each listener
471  (*iter)->Execute();
472  }
473  }
474 
475  void operator()() const { this->Send(); }
476  };
477 
478  // message with 1 parameter and return type
479  template <typename T, typename A = void>
480  class Message1 : public MessageBase<MessageAbstractDelegate1<T, A>>
481  {
482  public:
485 
486  void Send(T t) const
487  {
488  ListenerList listeners;
489 
490  {
491  this->m_Mutex.Lock();
492  listeners.assign(this->m_Listeners.begin(), this->m_Listeners.end());
493  this->m_Mutex.Unlock();
494  }
495 
496  for (auto iter = listeners.begin(); iter != listeners.end(); ++iter)
497  {
498  // notify each listener
499  (*iter)->Execute(t);
500  }
501  }
502 
503  void operator() (T t) const { this->Send(t); }
504  };
505 
506  // message with 2 parameters and return type
507  template <typename T, typename U, typename A = void>
508  class Message2 : public MessageBase<MessageAbstractDelegate2<T, U, A>>
509  {
510  public:
513 
514  void Send(T t, U u) const
515  {
516  ListenerList listeners;
517 
518  {
519  this->m_Mutex.Lock();
520  listeners.assign(this->m_Listeners.begin(), this->m_Listeners.end());
521  this->m_Mutex.Unlock();
522  }
523 
524  for (auto iter = listeners.begin(); iter != listeners.end(); ++iter)
525  {
526  // notify each listener
527  (*iter)->Execute(t, u);
528  }
529  }
530 
531  void operator()(T t, U u) const { this->Send(t, u); }
532  };
533 
534  // message with 3 parameters and return type
535  template <typename T, typename U, typename V, typename A = void>
536  class Message3 : public MessageBase<MessageAbstractDelegate3<T, U, V, A>>
537  {
538  public:
541 
542  void Send(T t, U u, V v) const
543  {
544  ListenerList listeners;
545 
546  {
547  this->m_Mutex.Lock();
548  listeners.assign(this->m_Listeners.begin(), this->m_Listeners.end());
549  this->m_Mutex.Unlock();
550  }
551 
552  for (typename ListenerList::iterator iter = listeners.begin(); iter != listeners.end(); ++iter)
553  {
554  // notify each listener
555  (*iter)->Execute(t, u, v);
556  }
557  }
558 
559  void operator()(T t, U u, V v) const { this->Send(t, u, v); }
560  };
561 
562  // message with 4 parameters and return type
563  template <typename T, typename U, typename V, typename W, typename A = void>
564  class Message4 : public MessageBase<MessageAbstractDelegate4<T, U, V, W>>
565  {
566  public:
569 
570  void Send(T t, U u, V v, W w) const
571  {
572  ListenerList listeners;
573 
574  {
575  this->m_Mutex.Lock();
576  listeners.assign(this->m_Listeners.begin(), this->m_Listeners.end());
577  this->m_Mutex.Unlock();
578  }
579 
580  for (typename ListenerList::iterator iter = listeners.begin(); iter != listeners.end(); ++iter)
581  {
582  // notify each listener
583  (*iter)->Execute(t, u, v, w);
584  }
585  }
586 
587  void operator()(T t, U u, V v, W w) const { this->Send(t, u, v, w); }
588  };
589 
590 /* Here is an example how to use the macros and templates:
591 *
592 * // An object to be send around
593 * class Law
594 * {
595 * private:
596 * std::string m_Description;
597 *
598 * public:
599 *
600 * Law(const std::string law) : m_Description(law)
601 * { }
602 *
603 * std::string GetDescription() const
604 * {
605 * return m_Description;
606 * }
607 * };
608 *
609 * // The NewtonMachine will issue specific events
610 * class NewtonMachine
611 * {
612 * mitkNewMessageMacro(AnalysisStarted);
613 * mitkNewMessage1Macro(AnalysisStopped, bool);
614 * mitkNewMessage1Macro(LawDiscovered, const Law&);
615 *
616 * public:
617 *
618 * void StartAnalysis()
619 * {
620 * // send the "started" signal
621 * m_AnalysisStartedMessage();
622 *
623 * // we found a new law of nature by creating one :-)
624 * Law massLaw("F=ma");
625 * m_LawDiscoveredMessage(massLaw);
626 * }
627 *
628 * void StopAnalysis()
629 * {
630 * // send the "stop" message with false, indicating
631 * // that no error occured
632 * m_AnalysisStoppedMessage(false);
633 * }
634 * };
635 *
636 * class Observer
637 * {
638 * private:
639 *
640 * NewtonMachine* m_Machine;
641 *
642 * public:
643 *
644 * Observer(NewtonMachine* machine) : m_Machine(machine)
645 * {
646 * // Add "observers", i.e. function pointers to the machine
647 * m_Machine->AddAnalysisStartedListener(
648 * ::mitk::MessageDelegate<Observer>(this, &Observer::MachineStarted));
649 * m_Machine->AddAnalysisStoppedListener(
650 * ::mitk::MessageDelegate1<Observer, bool>(this, &Observer::MachineStopped));
651 * m_Machine->AddLawDiscoveredListener(
652 * ::mitk::MessageDelegate1<Observer, const Law&>(this, &Observer::LawDiscovered));
653 * }
654 *
655 * ~Observer()
656 * {
657 * // Always remove your observers when finished
658 * m_Machine->RemoveAnalysisStartedListener(
659 * ::mitk::MessagDelegate<Observer>(this, &Observer::MachineStarted));
660 * m_Machine->RemoveAnalysisStoppedListener(
661 * ::mitk::MessageDelegate1<Observer, bool>(this, &Observer::MachineStopped));
662 * m_Machine->RemoveLawDiscoveredListener(
663 * ::mitk::MessageDelegate1<Observer, const Law&>(this, &Observer::LawDiscovered));
664 * }
665 *
666 * void MachineStarted()
667 * {
668 * std::cout << "Observed machine has started" << std::endl;
669 * }
670 *
671 * void MachineStopped(bool error)
672 * {
673 * std::cout << "Observed machine stopped " << (error ? "with an error" : "") << std::endl;
674 * }
675 *
676 * void LawDiscovered(const Law& law)
677 * {
678 * std::cout << "New law of nature discovered: " << law.GetDescription() << std::endl;
679 * }
680 * };
681 *
682 * NewtonMachine newtonMachine;
683 * Observer observer(&newtonMachine);
684 *
685 * // This will send two events to registered observers
686 * newtonMachine.StartAnalysis();
687 * // This will send one event to registered observers
688 * newtonMachine.StopAnalysis();
689 *
690 * Another example of how to use these message classes can be
691 * found in the directory Testing, file mitkMessageTest.cpp
692 *
693 */
694 
695 } // namespace
696 
697 #endif
Super::ListenerList ListenerList
Definition: mitkMessage.h:568
MessageAbstractDelegate1< T, A > * Clone() const override
Definition: mitkMessage.h:219
MessageDelegate(R *object, A(R::*memberFunctionPointer)())
Definition: mitkMessage.h:146
bool operator==(const MessageAbstractDelegate4< T, U, V, W, A > *c) const
Definition: mitkMessage.h:321
~MessageDelegate1() override
Definition: mitkMessage.h:199
void Send(T t) const
Definition: mitkMessage.h:486
MessageDelegate4(R *object, A(R::*memberFunctionPointer)(T, U, V, W))
Definition: mitkMessage.h:309
void Send() const
Definition: mitkMessage.h:458
Super::ListenerList ListenerList
Definition: mitkMessage.h:484
MessageDelegate2(R *object, A(R::*memberFunctionPointer)(T, U))
Definition: mitkMessage.h:231
MessageAbstractDelegate3< T, U, V, A > * Clone() const override
Definition: mitkMessage.h:293
void Send(T t, U u) const
Definition: mitkMessage.h:514
MessageBase< MessageAbstractDelegate< A > > Super
Definition: mitkMessage.h:455
DataCollection - Class to facilitate loading/accessing structured data.
A Execute(T t) const override
Definition: mitkMessage.h:201
MessageBase< MessageAbstractDelegate1< T, A > > Super
Definition: mitkMessage.h:483
bool IsEmpty() const
Definition: mitkMessage.h:412
Super::ListenerList ListenerList
Definition: mitkMessage.h:540
void Send(T t, U u, V v) const
Definition: mitkMessage.h:542
itk::SimpleFastMutexLock m_Mutex
Definition: mitkMessage.h:424
void Send(T t, U u, V v, W w) const
Definition: mitkMessage.h:570
~MessageDelegate() override
Definition: mitkMessage.h:151
A Execute(T t, U u) const override
Definition: mitkMessage.h:238
void operator()(T t, U u, V v, W w) const
Definition: mitkMessage.h:587
virtual A Execute() const =0
MessageBase< MessageAbstractDelegate2< T, U, A > > Super
Definition: mitkMessage.h:511
MessageBase & operator=(const MessageBase &o)
Definition: mitkMessage.h:367
MessageDelegate1(R *object, A(R::*memberFunctionPointer)(T))
Definition: mitkMessage.h:194
bool operator==(const MessageAbstractDelegate2< T, U, A > *c) const override
Definition: mitkMessage.h:243
virtual ~MessageDelegate4()
Definition: mitkMessage.h:314
void operator()(T t, U u, V v) const
Definition: mitkMessage.h:559
void operator()(T t, U u) const
Definition: mitkMessage.h:531
bool HasListeners() const
Definition: mitkMessage.h:411
void AddListener(const AbstractDelegate &delegate) const
Definition: mitkMessage.h:374
virtual A Execute(T t, U u, V v, W w) const
Definition: mitkMessage.h:316
const ListenerList & GetListeners() const
Definition: mitkMessage.h:410
Event/message/notification class.
Definition: mitkMessage.h:452
bool operator==(const MessageAbstractDelegate< A > *c) const override
Definition: mitkMessage.h:158
A Execute() const override
Definition: mitkMessage.h:153
void swap(CustomMimeType &l, CustomMimeType &r)
MessageDelegate3(R *object, A(R::*memberFunctionPointer)(T, U, V))
Definition: mitkMessage.h:268
~MessageDelegate3() override
Definition: mitkMessage.h:273
Super::ListenerList ListenerList
Definition: mitkMessage.h:456
MessageAbstractDelegate< A > * Clone() const override
Definition: mitkMessage.h:171
std::vector< AbstractDelegate * > ListenerList
Definition: mitkMessage.h:348
MessageBase< MessageAbstractDelegate3< T, U, V, A > > Super
Definition: mitkMessage.h:539
MessageAbstractDelegate2< T, U, A > * Clone() const override
Definition: mitkMessage.h:256
void RemoveListener(const AbstractDelegate &delegate) const
Definition: mitkMessage.h:393
void operator+=(const AbstractDelegate &delegate) const
Definition: mitkMessage.h:392
virtual ~MessageBase()
Definition: mitkMessage.h:350
MessageBase< MessageAbstractDelegate4< T, U, V, W, A > > Super
Definition: mitkMessage.h:567
void operator()() const
Definition: mitkMessage.h:475
void operator-=(const AbstractDelegate &delegate) const
Definition: mitkMessage.h:409
bool operator==(const MessageAbstractDelegate3< T, U, V, A > *c) const override
Definition: mitkMessage.h:280
Super::ListenerList ListenerList
Definition: mitkMessage.h:512
virtual MessageAbstractDelegate * Clone() const =0
ListenerList m_Listeners
List of listeners.
Definition: mitkMessage.h:423
~MessageDelegate2() override
Definition: mitkMessage.h:236
MessageAbstractDelegate4< T, U, V, W, A > * Clone() const
Definition: mitkMessage.h:334
virtual bool operator==(const MessageAbstractDelegate *cmd) const =0
MessageBase(const MessageBase &o)
Definition: mitkMessage.h:359
A Execute(T t, U u, V v) const override
Definition: mitkMessage.h:275
bool operator==(const MessageAbstractDelegate1< T, A > *c) const override
Definition: mitkMessage.h:206