go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkOpenCLLogger.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright UMC Utrecht and contributors
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 itkOpenCLLogger_h
19#define itkOpenCLLogger_h
20
21#include "itkLoggerBase.h"
22#include "itkStdStreamLogOutput.h"
23
24namespace itk
25{
37{
38public:
40
43 using Pointer = SmartPointer<Self>;
44 using ConstPointer = SmartPointer<const Self>;
45
47 itkTypeMacro(OpenCLLogger, Object);
48
54 static Pointer
55 New();
56
58 static Pointer
60
62 void
63 SetLogFileNamePrefix(const std::string & prefix);
64
66 std::string
68 {
69 return this->m_FileName;
70 }
71
73 itkSetStringMacro(OutputDirectory);
74
77 bool
78 IsCreated() const;
79
81 void
82 Write(PriorityLevelEnum level, std::string const & content) override;
83
84protected:
87
89 ~OpenCLLogger() override;
90
92 void
94
95private:
97
98 std::string m_FileName{};
99 std::string m_OutputDirectory{};
100
101 itk::StdStreamLogOutput::Pointer m_Stream{};
102 std::ostream * m_FileStream{};
103 bool m_Created{};
104};
105
106} // end namespace itk
107
108#endif // end #ifndef itkOpenCLLogger_h
Used for logging OpenCL compiler errors during a run.
static Pointer New()
static Pointer m_Instance
std::string m_FileName
static Pointer GetInstance()
ITK_DISALLOW_COPY_AND_MOVE(OpenCLLogger)
std::string m_OutputDirectory
itk::StdStreamLogOutput::Pointer m_Stream
void SetLogFileNamePrefix(const std::string &prefix)
void Write(PriorityLevelEnum level, std::string const &content) override
SmartPointer< const Self > ConstPointer
~OpenCLLogger() override
std::string GetLogFileName() const
std::ostream * m_FileStream
bool IsCreated() const


Generated on 2024-07-17 for elastix by doxygen 1.11.0 (9b424b03c9833626cd435af22a444888fbbb192d) elastix logo