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
26namespace itk
27{
40class ITKCommon_EXPORT MultipleLogOutput : public LogOutput
41{
42public:
43 ITK_DISALLOW_COPY_AND_MOVE(MultipleLogOutput);
44
49
51
52 itkOverrideGetNameOfClassMacro(MultipleLogOutput);
53 itkNewMacro(MultipleLogOutput);
54
55public:
59 void
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
78protected:
81
84
85private:
86 std::set<OutputType::Pointer> m_Output{};
87};
88} // namespace itk
89
90#endif // itkMultipleLogOutput_h
Light weight base class for most itk classes.
Represents an output stream.
Definition: itkLogOutput.h:40
Allows writing simultaneously to multiple streams. Note that the class derives from std::streambuf an...
void AddLogOutput(OutputType *output)
void Write(const std::string &content) override
void Write(double timestamp) override
void Write(const std::string &content, double timestamp) override
~MultipleLogOutput() override
void Flush() override
Base class for most ITK classes.
Definition: itkObject.h:62
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....