ITK
4.1.0
Insight Segmentation and Registration Toolkit
|
00001 /*========================================================================= 00002 * 00003 * Copyright Insight Software Consortium 00004 * 00005 * Licensed under the Apache License, Version 2.0 (the "License"); 00006 * you may not use this file except in compliance with the License. 00007 * You may obtain a copy of the License at 00008 * 00009 * http://www.apache.org/licenses/LICENSE-2.0.txt 00010 * 00011 * Unless required by applicable law or agreed to in writing, software 00012 * distributed under the License is distributed on an "AS IS" BASIS, 00013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00014 * See the License for the specific language governing permissions and 00015 * limitations under the License. 00016 * 00017 *=========================================================================*/ 00018 #ifndef __itkMultipleLogOutput_h 00019 #define __itkMultipleLogOutput_h 00020 00021 #include "itkLogOutput.h" 00022 00023 #include <fstream> 00024 #include <set> 00025 00026 namespace itk 00027 { 00040 class ITKCommon_EXPORT MultipleLogOutput:public LogOutput 00041 { 00042 public: 00043 00044 typedef MultipleLogOutput Self; 00045 typedef LogOutput Superclass; 00046 typedef SmartPointer< Self > Pointer; 00047 typedef SmartPointer< const Self > ConstPointer; 00048 00049 typedef LogOutput OutputType; 00050 00051 itkTypeMacro(MultipleLogOutput, LogOutput); 00052 itkNewMacro(MultipleLogOutput); 00053 public: 00054 00058 void AddLogOutput(OutputType *output); 00059 00061 virtual void Flush(); 00062 00064 virtual void Write(double timestamp); 00065 00067 virtual void Write(const std::string & content); 00068 00070 virtual void Write(const std::string & content, double timestamp); 00071 00072 protected: 00074 MultipleLogOutput(); 00075 00077 virtual ~MultipleLogOutput(); 00078 private: 00079 MultipleLogOutput(const Self &); //purposely not implemented 00080 void operator=(const Self &); //purposely not implemented 00082 00083 typedef std::set< OutputType::Pointer > ContainerType; 00084 00085 ContainerType m_Output; 00086 }; 00087 } 00088 00089 #endif //__itkMultipleLogOutput_h 00090