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 
24 namespace itk
25 {
36 class OpenCLLogger : public LoggerBase
37 {
38 public:
39 
40  typedef OpenCLLogger Self;
43  typedef SmartPointer< const Self > ConstPointer;
44 
46  itkTypeMacro( OpenCLLogger, Object );
47 
53  static Pointer New();
54 
56  static Pointer GetInstance();
57 
59  void SetLogFileNamePrefix( const std::string & prefix );
60 
62  std::string GetLogFileName() const { return this->m_FileName; }
63 
65  itkSetStringMacro( OutputDirectory );
66 
69  bool IsCreated() const;
70 
72  virtual void Write( PriorityLevelType level, std::string const & content ) ITK_OVERRIDE;
73 
74 protected:
75 
77  OpenCLLogger();
78 
80  virtual ~OpenCLLogger();
81 
83  void Initialize();
84 
85 private:
86 
87  static Pointer m_Instance;
88 
89  OpenCLLogger( const Self & ); //purposely not implemented
90  void operator=( const Self & ); //purposely not implemented
91 
92  std::string m_FileName;
93  std::string m_OutputDirectory;
94 
95  itk::StdStreamLogOutput::Pointer m_Stream;
96  std::ostream * m_FileStream;
97  bool m_Created;
98 };
99 
100 } // end namespace itk
101 
102 #endif // end #ifndef __itkOpenCLLogger_h
static Pointer m_Instance
std::string m_OutputDirectory
void operator=(const Self &)
std::ostream * m_FileStream
itk::StdStreamLogOutput::Pointer m_Stream
bool IsCreated() const
std::string GetLogFileName() const
LoggerBase Superclass
virtual ~OpenCLLogger()
void SetLogFileNamePrefix(const std::string &prefix)
SmartPointer< const Self > ConstPointer
virtual void Write(PriorityLevelType level, std::string const &content) ITK_OVERRIDE
SmartPointer< Self > Pointer
std::string m_FileName
static Pointer GetInstance()
OpenCLLogger Self
Used for logging OpenCL compiler errors during a run.
static Pointer New()


Generated on 04-09-2015 for elastix by doxygen 1.8.9.1 elastix logo