Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

dox/Common/vtkOutputWindow.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkOutputWindow.h,v $ 00005 Language: C++ 00006 00007 Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 00008 All rights reserved. 00009 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00010 00011 This software is distributed WITHOUT ANY WARRANTY; without even 00012 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00013 PURPOSE. See the above copyright notice for more information. 00014 00015 =========================================================================*/ 00031 #ifndef __vtkOutputWindow_h 00032 #define __vtkOutputWindow_h 00033 00034 #include "vtkObject.h" 00035 00036 //BTX 00037 00038 class VTK_COMMON_EXPORT vtkOutputWindow; 00039 00040 class VTK_COMMON_EXPORT vtkOutputWindowCleanup 00041 { 00042 public: 00043 vtkOutputWindowCleanup(); 00044 ~vtkOutputWindowCleanup(); 00045 }; 00046 //ETX 00047 00048 class VTK_COMMON_EXPORT vtkOutputWindow : public vtkObject 00049 { 00050 public: 00051 // Methods from vtkObject 00052 vtkTypeRevisionMacro(vtkOutputWindow,vtkObject); 00054 virtual void PrintSelf(ostream& os, vtkIndent indent); 00055 00057 00061 static vtkOutputWindow* New(); 00062 // Description: 00063 // Return the singleton instance with no reference counting. 00064 static vtkOutputWindow* GetInstance(); 00065 // Description: 00066 // Supply a user defined output window. Call ->Delete() on the supplied 00067 // instance after setting it. 00068 static void SetInstance(vtkOutputWindow *instance); 00069 // Description: 00070 // Display the text. Four virtual methods exist, depending on the type of 00071 // message to display. This allows redirection or reformatting of the 00072 // messages. The default implementation uses DisplayText for all. 00073 virtual void DisplayText(const char*); 00074 virtual void DisplayErrorText(const char*); 00075 virtual void DisplayWarningText(const char*); 00076 virtual void DisplayGenericWarningText(const char*); 00078 00079 virtual void DisplayDebugText(const char*); 00081 00083 vtkBooleanMacro(PromptUser,int); 00084 vtkSetMacro(PromptUser, int); 00086 //BTX 00087 // use this as a way of memory management when the 00088 // program exits the SmartPointer will be deleted which 00089 // will delete the Instance singleton 00090 static vtkOutputWindowCleanup Cleanup; 00091 //ETX 00092 protected: 00093 vtkOutputWindow(); 00094 virtual ~vtkOutputWindow(); 00095 int PromptUser; 00096 private: 00097 static vtkOutputWindow* Instance; 00098 private: 00099 vtkOutputWindow(const vtkOutputWindow&); // Not implemented. 00100 void operator=(const vtkOutputWindow&); // Not implemented. 00101 }; 00102 00103 #endif