ITK  5.2.0
Insight Toolkit
itkFileOutputWindow.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 itkFileOutputWindow_h
19 #define itkFileOutputWindow_h
20 
21 #include "itkOutputWindow.h"
22 #include "itkObjectFactory.h"
23 #include <fstream>
24 
25 namespace itk
26 {
42 class ITKCommon_EXPORT FileOutputWindow : public OutputWindow
43 {
44 public:
45  ITK_DISALLOW_COPY_AND_MOVE(FileOutputWindow);
46 
52 
54  itkNewMacro(Self);
55 
57  itkTypeMacro(FileOutputWindow, OutputWindow);
58 
60  void
61  DisplayText(const char *) override;
62 
64  itkSetStringMacro(FileName);
65 
67  itkGetStringMacro(FileName);
68 
70  itkSetMacro(Flush, bool);
71  itkGetConstMacro(Flush, bool);
72  itkBooleanMacro(Flush);
74 
79  itkSetMacro(Append, bool);
80  itkGetConstMacro(Append, bool);
81  itkBooleanMacro(Append);
83 
84 protected:
86  ~FileOutputWindow() override;
87  void
88  PrintSelf(std::ostream & os, Indent indent) const override;
89 
90  void
91  Initialize();
92 
93  std::ofstream * m_Stream;
94 
95  std::string m_FileName;
96 
97  bool m_Flush;
98  bool m_Append;
99 };
100 } // end namespace itk
101 
102 #endif
itkObjectFactory.h
itkOutputWindow.h
itk::FileOutputWindow::m_FileName
std::string m_FileName
Definition: itkFileOutputWindow.h:95
itk::FileOutputWindow
Messages sent from the system are sent to a file.
Definition: itkFileOutputWindow.h:42
itk::OutputWindow
Messages sent from the system are collected by this object.
Definition: itkOutputWindow.h:48
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::FileOutputWindow::m_Flush
bool m_Flush
Definition: itkFileOutputWindow.h:97
itk::FileOutputWindow::m_Append
bool m_Append
Definition: itkFileOutputWindow.h:98
itk::FileOutputWindow::m_Stream
std::ofstream * m_Stream
Definition: itkFileOutputWindow.h:93
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24