Medical Imaging Interaction Toolkit  2018.4.99-a3d2e8fb
Medical Imaging Interaction Toolkit
berryIStateListener.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 
13 #include "berryIStateListener.h"
14 
15 #include "berryState.h"
16 
17 namespace berry {
18 
19 void
22 {
23  if (l == nullptr) return;
24 
25  stateChanged += Delegate(l, &IStateListener::HandleStateChange);
26 }
27 
28 void
31 {
32  if (l == nullptr) return;
33 
34  stateChanged -= Delegate(l, &IStateListener::HandleStateChange);
35 }
36 
38 {
39 }
40 
41 }
void RemoveListener(IStateListener *listener)
virtual void HandleStateChange(const SmartPointer< State > &state, const SmartPointer< Object > &oldValue)=0
void AddListener(IStateListener *listener)