ITK  6.0.0
Insight Toolkit
itkMultipleLogOutput.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 itkMultipleLogOutput_h
19 #define itkMultipleLogOutput_h
20 
21 #include "itkLogOutput.h"
22 
23 #include <fstream>
24 #include <set>
25 
26 namespace itk
27 {
40 class ITKCommon_EXPORT MultipleLogOutput : public LogOutput
41 {
42 public:
43  ITK_DISALLOW_COPY_AND_MOVE(MultipleLogOutput);
44 
49 
51 
52  itkOverrideGetNameOfClassMacro(MultipleLogOutput);
53  itkNewMacro(MultipleLogOutput);
54 
55 public:
59  void
60  AddLogOutput(OutputType * output);
61 
63  void
64  Flush() override;
65 
67  void
68  Write(double timestamp) override;
69 
71  void
72  Write(const std::string & content) override;
73 
75  void
76  Write(const std::string & content, double timestamp) override;
77 
78 protected:
81 
83  ~MultipleLogOutput() override;
84 
85 private:
86  std::set<OutputType::Pointer> m_Output{};
87 };
88 } // namespace itk
89 
90 #endif // itkMultipleLogOutput_h
itkLogOutput.h
itk::MultipleLogOutput
Allows writing simultaneously to multiple streams. Note that the class derives from std::streambuf an...
Definition: itkMultipleLogOutput.h:40
itk::SmartPointer< Self >
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:55
itk::LogOutput
Represents an output stream.
Definition: itkLogOutput.h:39
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnatomicalOrientation.h:29
itk::Object
Base class for most ITK classes.
Definition: itkObject.h:61