Medical Imaging Interaction Toolkit  2018.4.99-4c24e3cb
Medical Imaging Interaction Toolkit
berryISaveablesLifecycleListener.cpp
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 
14 
15 namespace berry {
16 
17 void
18 ISaveablesLifecycleListener::Events
19 ::AddListener(ISaveablesLifecycleListener* listener)
20 {
21  if (listener == nullptr) return;
22 
23  this->lifecycleChange += Delegate(listener, &ISaveablesLifecycleListener::HandleLifecycleEvent);
24 }
25 
26 void
27 ISaveablesLifecycleListener::Events
28 ::RemoveListener(ISaveablesLifecycleListener* listener)
29 {
30  if (listener == nullptr) return;
31 
32  this->lifecycleChange -= Delegate(listener, &ISaveablesLifecycleListener::HandleLifecycleEvent);
33 }
34 
36 {
37 }
38 
39 }
virtual void HandleLifecycleEvent(const SaveablesLifecycleEvent::Pointer &event)=0