ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkBuildInformation.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
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_ASSIGN(BuildInformation);
53 
58  using MapKeyType = std::string;
59  using MapValueType = std::string;
61 
62 private:
70  {
71  public:
74  };
75 public:
76 
78  using MapType = std::map<MapKeyType, MapStorageType >;
79 
81  itkTypeMacro(BuildInformation, Object);
82 
84  static Pointer New();
85 
87  static Pointer GetInstance();
88  static const MapType & GetMap();
89  static const MapValueType GetValue(const MapKeyType &&);
90  static const MapValueDescriptionType GetDescription(const MapKeyType &&);
91  static const std::vector< MapKeyType > GetAllKeys();
93 
94 private:
96 
97  itkGetGlobalDeclarationMacro(BuildInformationGlobals, PimplGlobals);
98  static BuildInformationGlobals * m_PimplGlobals;
99 
100 }; // end of class
101 } // end namespace itk
102 #endif
MapValueType MapValueDescriptionType
static BuildInformationGlobals * m_PimplGlobals
Static information about this build.
std::map< MapKeyType, MapStorageType > MapType
#define itkGetGlobalDeclarationMacro(Type, VarName)
const MapValueDescriptionType m_Description
Base class for most ITK classes.
Definition: itkObject.h:60