Common/vtkOutputWindow.h Source File

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

# 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 =========================================================================*/
    00044 #ifndef __vtkOutputWindow_h
    00045 #define __vtkOutputWindow_h
    00046
    00047 #include "vtkObject.h"
    00048
    00049 //BTX
    00050
    00051 class VTK_COMMON_EXPORT vtkOutputWindow;
    00052
    00053 class VTK_COMMON_EXPORT vtkOutputWindowCleanup
    00054 {
    00055 public:
    00056   vtkOutputWindowCleanup();
    00057   ~vtkOutputWindowCleanup();
    00058 };
    00059 //ETX
    00060
    00061 class VTK_COMMON_EXPORT vtkOutputWindow : public vtkObject
    00062 {
    00063 public:
    00064 // Methods from vtkObject
    00065   vtkTypeRevisionMacro(vtkOutputWindow,vtkObject);
    00067   virtual void PrintSelf(ostream& os, vtkIndent indent);
    00068
    00070
    00074   static vtkOutputWindow* New();
    00075   // Description:
    00076   // Return the singleton instance with no reference counting.
    00077   static vtkOutputWindow* GetInstance();
    00078   // Description:
    00079   // Supply a user defined output window. Call ->Delete() on the supplied
    00080   // instance after setting it.
    00081   static void SetInstance(vtkOutputWindow *instance);
    00082   // Description:
    00083   // Display the text. Four virtual methods exist, depending on the type of
    00084   // message to display. This allows redirection or reformatting of the
    00085   // messages. The default implementation uses DisplayText for all.
    00086   virtual void DisplayText(const char*);
    00087   virtual void DisplayErrorText(const char*);
    00088   virtual void DisplayWarningText(const char*);
    00089   virtual void DisplayGenericWarningText(const char*);
    00091
    00092   virtual void DisplayDebugText(const char*);
    00094
    00096   vtkBooleanMacro(PromptUser,int);
    00097   vtkSetMacro(PromptUser, int);
    00099 //BTX
    00100   // use this as a way of memory management when the
    00101   // program exits the SmartPointer will be deleted which
    00102   // will delete the Instance singleton
    00103   static vtkOutputWindowCleanup Cleanup;
    00104 //ETX
    00105 protected:
    00106   vtkOutputWindow();
    00107   virtual ~vtkOutputWindow();
    00108   int PromptUser;
    00109 private:
    00110   static vtkOutputWindow* Instance;
    00111 private:
    00112   vtkOutputWindow(const vtkOutputWindow&);  // Not implemented.
    00113   void operator=(const vtkOutputWindow&);  // Not implemented.
    00114 };
    00115
    00116 #endif