Medical Imaging Interaction Toolkit  2021.02.99-e55a5d2f
Medical Imaging Interaction Toolkit
berryAbstractHandlerWithState.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 BERRYABSTRACTHANDLERWITHSTATE_H
14 #define BERRYABSTRACTHANDLERWITHSTATE_H
15 
16 #include "berryAbstractHandler.h"
17 #include "berryIObjectWithState.h"
18 #include "berryIStateListener.h"
19 
21 
22 namespace berry {
23 
24 class State;
25 
39  protected IStateListener
40 {
41 
42 private:
43 
48  QHash<QString,SmartPointer<State> > states;
49 
50 public:
51 
53 
71  void AddState(const QString& stateId, const SmartPointer<State>& state) override;
72 
73  SmartPointer<State> GetState(const QString& stateId) const override;
74 
75  QList<QString> GetStateIds() const override;
76 
92  void RemoveState(const QString& stateId) override;
93 };
94 
95 }
96 
97 #endif // BERRYABSTRACTHANDLERWITHSTATE_H
Implements transparent reference counting.
#define berryObjectMacro(...)
Definition: berryMacros.h:33