Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
berryAbstractHandlerWithState.h
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 
17 #ifndef BERRYABSTRACTHANDLERWITHSTATE_H
18 #define BERRYABSTRACTHANDLERWITHSTATE_H
19 
20 #include "berryAbstractHandler.h"
21 #include "berryIObjectWithState.h"
22 #include "berryIStateListener.h"
23 
25 
26 namespace berry {
27 
28 class State;
29 
43  protected IStateListener
44 {
45 
46 private:
47 
52  QHash<QString,SmartPointer<State> > states;
53 
54 public:
55 
57 
58 
75  void AddState(const QString& stateId, const SmartPointer<State>& state) override;
76 
77  SmartPointer<State> GetState(const QString& stateId) const override;
78 
79  QList<QString> GetStateIds() const override;
80 
96  void RemoveState(const QString& stateId) override;
97 };
98 
99 }
100 
101 #endif // BERRYABSTRACTHANDLERWITHSTATE_H
Implements transparent reference counting.
#define berryObjectMacro(...)
Definition: berryMacros.h:37