Medical Imaging Interaction Toolkit  2021.02.99-e55a5d2f
Medical Imaging Interaction Toolkit
berryNamedHandleObjectWithState.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 BERRYNAMEDHANDLEOBJECTWITHSTATE_H_
14 #define BERRYNAMEDHANDLEOBJECTWITHSTATE_H_
15 
17 #include "berryIObjectWithState.h"
18 
19 #include <QHash>
20 
21 namespace berry {
22 
33 
34 public:
35 
37 
38  void AddState(const QString& stateId, const SmartPointer<State>& state) override;
39 
40  QString GetDescription() const override;
41 
42  QString GetName() const override;
43 
44  SmartPointer<State> GetState(const QString& stateId) const override;
45 
46  QList<QString> GetStateIds() const override;
47 
48  void RemoveState(const QString& id) override;
49 
50 private:
51 
56  QHash<QString, SmartPointer<State> > states;
57 
58 protected:
59 
66  NamedHandleObjectWithState(const QString& id);
67 
68 };
69 
70 }
71 
72 #endif /*BERRYNAMEDHANDLEOBJECTWITHSTATE_H_*/
Implements transparent reference counting.
#define berryObjectMacro(...)
Definition: berryMacros.h:33