VTK
dox/Common/Core/vtkOutputWindow.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkOutputWindow.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00030 #ifndef __vtkOutputWindow_h
00031 #define __vtkOutputWindow_h
00032 
00033 #include "vtkCommonCoreModule.h" // For export macro
00034 #include "vtkObject.h"
00035 
00036 //BTX
00037 class VTKCOMMONCORE_EXPORT vtkOutputWindowCleanup
00038 {
00039 public:
00040   vtkOutputWindowCleanup();
00041   ~vtkOutputWindowCleanup();
00042 
00043 private:
00044   vtkOutputWindowCleanup(const vtkOutputWindowCleanup& other); // no copy constructor
00045   vtkOutputWindowCleanup& operator=(const vtkOutputWindowCleanup& rhs); // no copy assignment
00046 };
00047 //ETX
00048 
00049 class VTKCOMMONCORE_EXPORT vtkOutputWindow : public vtkObject
00050 {
00051 public:
00052 // Methods from vtkObject
00053   vtkTypeMacro(vtkOutputWindow,vtkObject);
00055   virtual void PrintSelf(ostream& os, vtkIndent indent);
00056 
00061   static vtkOutputWindow* New();
00063   static vtkOutputWindow* GetInstance();
00066   static void SetInstance(vtkOutputWindow *instance);
00068 
00071   virtual void DisplayText(const char*);
00072   virtual void DisplayErrorText(const char*);
00073   virtual void DisplayWarningText(const char*);
00074   virtual void DisplayGenericWarningText(const char*);
00076 
00077   virtual void DisplayDebugText(const char*);
00079 
00081   vtkBooleanMacro(PromptUser,int);
00082   vtkSetMacro(PromptUser, int);
00083 //BTX
00084   // use this as a way of memory management when the
00085   // program exits the SmartPointer will be deleted which
00086   // will delete the Instance singleton
00087   static vtkOutputWindowCleanup Cleanup;
00088 //ETX
00089 protected:
00090   vtkOutputWindow();
00091   virtual ~vtkOutputWindow();
00092   int PromptUser;
00093 private:
00094   static vtkOutputWindow* Instance;
00095 private:
00096   vtkOutputWindow(const vtkOutputWindow&);  // Not implemented.
00097   void operator=(const vtkOutputWindow&);  // Not implemented.
00098 };
00100 
00101 #endif