ITK  5.2.0
Insight Toolkit
itkBuildInformation.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef itkBuildInformation_h
19 #define itkBuildInformation_h
20 
21 #include "itkMacro.h"
22 #include "itkObject.h"
23 #include <mutex>
24 #include "itkSingletonMacro.h"
25 
26 namespace itk
27 {
45 struct BuildInformationGlobals;
46 
47 class ITKCommon_EXPORT BuildInformation final : public Object
48 {
49 public:
50  // Using the `rule of zero` to this aggregate type
51  // C++20 changes the definition of aggregate such that classes with any user-declared ctors are no longer aggregates.
52  ITK_DISALLOW_COPY_AND_MOVE(BuildInformation);
53 
58  using MapKeyType = std::string;
59  using MapValueType = std::string;
61 
62 private:
70  {
71  public:
74  };
75 
76 public:
78  using MapType = std::map<MapKeyType, MapStorageType>;
79 
81  itkTypeMacro(BuildInformation, Object);
82 
84  static Pointer
85  New();
86 
88  static Pointer
89  GetInstance();
90  static const MapType &
91  GetMap();
92  static const MapValueType
93  GetValue(const MapKeyType &&);
94  static const MapValueDescriptionType
95  GetDescription(const MapKeyType &&);
96  static const std::vector<MapKeyType>
97  GetAllKeys();
99 
100 private:
102 
103  itkGetGlobalDeclarationMacro(BuildInformationGlobals, PimplGlobals);
104  static BuildInformationGlobals * m_PimplGlobals;
105 
106 }; // end of class
107 } // end namespace itk
108 #endif
itk::BuildInformation::m_PimplGlobals
static BuildInformationGlobals * m_PimplGlobals
Definition: itkBuildInformation.h:104
itk::BuildInformation::InformationValueType::m_Value
const MapValueType m_Value
Definition: itkBuildInformation.h:72
itk::BuildInformation::MapType
std::map< MapKeyType, MapStorageType > MapType
Definition: itkBuildInformation.h:78
itkSingletonMacro.h
itk::SmartPointer< Self >
itk::BuildInformation::MapKeyType
std::string MapKeyType
Definition: itkBuildInformation.h:58
itk::BuildInformation::MapValueType
std::string MapValueType
Definition: itkBuildInformation.h:59
itk::BuildInformation
Static information about this build.
Definition: itkBuildInformation.h:47
itkMacro.h
itk::BuildInformation::InformationValueType::m_Description
const MapValueDescriptionType m_Description
Definition: itkBuildInformation.h:73
itk::BuildInformation::MapValueDescriptionType
MapValueType MapValueDescriptionType
Definition: itkBuildInformation.h:60
itkObject.h
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itkGetGlobalDeclarationMacro
#define itkGetGlobalDeclarationMacro(Type, VarName)
Definition: itkSingletonMacro.h:35
itk::Object
Base class for most ITK classes.
Definition: itkObject.h:62
itk::BuildInformation::InformationValueType
Definition: itkBuildInformation.h:69