Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
berryIDebugObjectListener.cpp
Go to the documentation of this file.
1 /*===================================================================
2 
3 BlueBerry Platform
4 
5 Copyright (c) German Cancer Research Center,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
18 
19 namespace berry {
20 
22 {
23  if (l == nullptr) return;
24 
25  Types t = l->GetEventTypes();
26 
31  if (t & SMARTPOINTER_CREATED) spDestroyedEvent += SPDelegate(l, &IDebugObjectListener::SmartPointerDestroyed);
32 }
33 
35 {
36  if (l == nullptr) return;
37 
38  objCreatedEvent -= ObjDelegate(l, &IDebugObjectListener::ObjectCreated);
39  objDestroyedEvent -= ObjDelegate(l, &IDebugObjectListener::ObjectDestroyed);
43 }
44 
46 {
47 }
48 
49 }
virtual void ObjectCreated(const Object *)
void AddListener(IDebugObjectListener *listener)
virtual void SmartPointerDestroyed(unsigned int, const Object *)
virtual void ObjectTracingChanged(unsigned int, bool=true, const Object *=nullptr)
MessageDelegate3< IDebugObjectListener, unsigned int, bool, const Object * > TraceDelegate
virtual void SmartPointerCreated(unsigned int, const Object *)
MessageDelegate1< IDebugObjectListener, const Object * > ObjDelegate
MessageDelegate2< IDebugObjectListener, unsigned int, const Object * > SPDelegate
virtual void ObjectDestroyed(const Object *)
virtual Events::Types GetEventTypes() const =0
void RemoveListener(IDebugObjectListener *listener)