Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
berryNamedHandleObjectWithState.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 BERRYNAMEDHANDLEOBJECTWITHSTATE_H_
18 #define BERRYNAMEDHANDLEOBJECTWITHSTATE_H_
19 
21 #include "berryIObjectWithState.h"
22 
23 #include <QHash>
24 
25 namespace berry {
26 
37 
38 public:
39 
41 
42  void AddState(const QString& stateId, const SmartPointer<State>& state) override;
43 
44  QString GetDescription() const override;
45 
46  QString GetName() const override;
47 
48  SmartPointer<State> GetState(const QString& stateId) const override;
49 
50  QList<QString> GetStateIds() const override;
51 
52  void RemoveState(const QString& id) override;
53 
54 private:
55 
60  QHash<QString, SmartPointer<State> > states;
61 
62 protected:
63 
70  NamedHandleObjectWithState(const QString& id);
71 
72 };
73 
74 }
75 
76 #endif /*BERRYNAMEDHANDLEOBJECTWITHSTATE_H_*/
Implements transparent reference counting.
#define berryObjectMacro(...)
Definition: berryMacros.h:37
static std::string GetName(std::string fileName, std::string suffix)