Medical Imaging Interaction Toolkit  2024.06.00
Medical Imaging Interaction Toolkit
mitkConfigurationHolder.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 
14 #ifndef mitkConfigurationHolder_h
15 #define mitkConfigurationHolder_h
16 
17 #include <MitkCLCoreExports.h>
18 
19 //#include <mitkBaseData.h>
20 
21 // STD Includes
22 #include <string>
23 #include <map>
24 #include <vector>
25 
26 namespace mitk
27 {
28  class MITKCLCORE_EXPORT ConfigurationHolder // : public BaseData
29  {
30  public:
31  enum ValueType
32  {
39  DT_GROUP
40  };
42 
43 
44  void SetBool(bool value);
45  void SetUnsignedInt(unsigned int value);
46  void SetInt(int value);
47  void SetDouble(double value);
48  void SetString(std::string value);
49 
50  void ClearGroup();
51  void AddToGroup(std::string id, const ConfigurationHolder &value);
52 
53  bool AsBool();
54  unsigned int AsUnsignedInt();
55  int AsInt();
56  double AsDouble();
57  std::string AsString();
58 
59  bool AsBool(bool value);
60  unsigned int AsUnsignedInt(unsigned int value);
61  int AsInt(int value);
62  double AsDouble(double value);
63  std::string AsString(std::string value);
64 
65  std::vector<std::string> AsStringVector();
66 
67  ConfigurationHolder& At(std::string id);
68 
69  private:
70  bool m_BoolValue;
71  unsigned int m_UIntValue;
72  int m_IntValue;
73  double m_DoubleValue;
74  std::string m_StringValue;
75 
76  std::map<std::string, ConfigurationHolder> m_GroupValue;
77 
78  ValueType m_ValueType;
79  };
80 }
81 
82 #endif
mitk::ConfigurationHolder::DT_DOUBLE
@ DT_DOUBLE
Definition: mitkConfigurationHolder.h:37
mitk::ConfigurationHolder::ValueType
ValueType
Definition: mitkConfigurationHolder.h:31
mitk::ConfigurationHolder::DT_UINT
@ DT_UINT
Definition: mitkConfigurationHolder.h:35
mitk::ConfigurationHolder::DT_STRING
@ DT_STRING
Definition: mitkConfigurationHolder.h:38
MITKCLCORE_EXPORT
#define MITKCLCORE_EXPORT
Definition: MitkCLCoreExports.h:15
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitk::ConfigurationHolder::DT_UNINIZIALIZED
@ DT_UNINIZIALIZED
Definition: mitkConfigurationHolder.h:33
MitkCLCoreExports.h
mitk::ConfigurationHolder::DT_BOOL
@ DT_BOOL
Definition: mitkConfigurationHolder.h:34
mitk::ConfigurationHolder::DT_INT
@ DT_INT
Definition: mitkConfigurationHolder.h:36
mitk::ConfigurationHolder
Definition: mitkConfigurationHolder.h:28