00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkOutputWindow.h,v $ 00005 Language: C++ 00006 Date: $Date: 2009-02-19 19:41:22 $ 00007 Version: $Revision: 1.23 $ 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 #ifndef __itkOutputWindow_h 00021 #define __itkOutputWindow_h 00022 00023 #include "itkObject.h" 00024 00025 namespace itk 00026 { 00035 class ITKCommon_EXPORT OutputWindow : public Object 00036 { 00037 public: 00039 typedef OutputWindow Self; 00040 typedef Object Superclass; 00041 typedef SmartPointer<Self> Pointer; 00042 typedef SmartPointer<const Self> ConstPointer; 00043 00045 itkTypeMacro(OutputWindow, Object); 00046 00052 static Pointer New(); 00053 00055 static Pointer GetInstance(); 00056 00059 static void SetInstance(OutputWindow *instance); 00060 00062 virtual void DisplayText(const char*); 00063 00067 virtual void DisplayErrorText(const char *t) { this->DisplayText(t); }; 00068 00072 virtual void DisplayWarningText(const char *t) { this->DisplayText(t); }; 00073 00077 virtual void DisplayGenericOutputText(const char *t) {this->DisplayText(t);} 00078 00082 virtual void DisplayDebugText(const char *t) { this->DisplayText(t); }; 00083 00087 itkSetMacro(PromptUser,bool); 00088 itkGetMacro(PromptUser,bool); 00089 itkBooleanMacro(PromptUser); 00091 00092 protected: 00093 OutputWindow(); 00094 virtual ~OutputWindow(); 00095 virtual void PrintSelf(std::ostream& os, Indent indent) const; 00096 00097 private: 00098 OutputWindow(const Self&); //purposely not implemented 00099 void operator=(const Self&); //purposely not implemented 00100 00101 bool m_PromptUser; 00102 static Pointer m_Instance; 00103 }; 00104 00105 } // end namespace itk 00106 00107 #endif 00108