ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkFloatingPointExceptions.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 * https://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 itkFloatingPointExceptions_h
19#define itkFloatingPointExceptions_h
20
21#include <cstdint>
22
23#include "itkMacro.h" // for ITKCommon_EXPORT
24#include "itkSingletonMacro.h"
25
26namespace itk
27{
33{
34public:
38 enum class ExceptionAction : uint8_t
39 {
42 };
43};
44// Define how to print enumeration
45extern ITKCommon_EXPORT std::ostream &
46 operator<<(std::ostream & out, const FloatingPointExceptionsEnums::ExceptionAction value);
47
54
55struct ExceptionGlobals;
56
57class ITKCommon_EXPORT FloatingPointExceptions
58{
59public:
60 ITK_DISALLOW_COPY_AND_MOVE(FloatingPointExceptions);
61 // default constructor required for wrapping to succeed
63 virtual ~FloatingPointExceptions() = default;
64
66#if !defined(ITK_LEGACY_REMOVE)
68 using ExceptionAction = ExceptionActionEnum;
69 static constexpr ExceptionActionEnum ABORT = ExceptionActionEnum::ABORT;
70 static constexpr ExceptionActionEnum EXIT = ExceptionActionEnum::EXIT;
71#endif
72
84 static void
86
91 static void
93
95 static bool
97
102 static void
103 SetEnabled(bool val);
104
106 static void
108
112
114 static bool
116
117private:
118 itkGetGlobalDeclarationMacro(ExceptionGlobals, PimplGlobals);
120 static ExceptionGlobals * m_PimplGlobals;
121};
122} // namespace itk
123
124#endif
Contains all enum classes used by FloatingPointExceptions class.
static ExceptionGlobals * m_PimplGlobals
itkGetGlobalDeclarationMacro(ExceptionGlobals, PimplGlobals)
static ExceptionActionEnum GetExceptionAction()
virtual ~FloatingPointExceptions()=default
static bool HasFloatingPointExceptionsSupport()
FloatingPointExceptionsEnums::ExceptionAction ExceptionActionEnum
static void SetExceptionAction(ExceptionActionEnum a)
static void SetEnabled(bool val)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
ITKCommon_EXPORT std::ostream & operator<<(std::ostream &out, typename AnatomicalOrientation::CoordinateEnum value)