Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkLoggerOutput.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkLoggerOutput.h,v $
00005   Language:  C++
00006   Date:      $Date: 2005/08/10 18:24:24 $
00007   Version:   $Revision: 1.4 $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012   Portions of this code are covered under the VTK copyright.
00013   See VTKCopyright.txt or http://www.kitware.com/VTKCopyright.htm for details.
00014 
00015      This software is distributed WITHOUT ANY WARRANTY; without even 
00016      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00017      PURPOSE.  See the above copyright notices for more information.
00018 
00019 =========================================================================*/
00020 
00021 #ifndef __itkLoggerOutput_h
00022 #define __itkLoggerOutput_h
00023 
00024 #include "itkOutputWindow.h"
00025 #include "itkLogger.h"
00026 
00027 
00028 namespace itk
00029 {
00043 class ITKCommon_EXPORT LoggerOutput : public OutputWindow 
00044 {
00045 public:
00047   typedef LoggerOutput        Self;
00048   typedef OutputWindow  Superclass;
00049   typedef SmartPointer<Self>  Pointer;
00050   typedef SmartPointer<const Self>  ConstPointer;
00051 
00053   itkTypeMacro(LoggerOutput, OutputWindow);
00054 
00055   itkNewMacro(LoggerOutput);
00056 
00057   typedef Logger*   LoggerType;
00058 
00060   virtual void DisplayText(const char* t);
00061 
00065   virtual void DisplayErrorText(const char *t);
00066 
00070   virtual void DisplayWarningText(const char *t);
00071 
00075   virtual void DisplayGenericOutputText(const char *t);
00076 
00080   virtual void DisplayDebugText(const char *t);
00081 
00082   itkSetMacro(Logger, LoggerType);
00083 
00084   itkGetMacro(Logger, LoggerType);
00085 
00086   virtual void OverrideITKWindow() 
00087   {
00088     itk::OutputWindow::SetInstance(this);
00089   }
00090  
00091 protected:
00092   LoggerOutput():m_Logger(0) {}
00093   virtual ~LoggerOutput() {}
00094   virtual void PrintSelf(std::ostream& os, Indent indent) const;
00095 
00096 private:
00097   Logger* m_Logger;
00098 };
00099   
00100 } // end namespace itk
00101 
00102 
00103 #endif  // __itkLoggerOutput_h
00104 

Generated at Tue Jul 29 21:08:04 2008 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000