VTK
vtkOutputWindow.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkOutputWindow.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
28#ifndef vtkOutputWindow_h
29#define vtkOutputWindow_h
30
31#include "vtkDebugLeaksManager.h" // Must be included before singletons
32#include "vtkCommonCoreModule.h" // For export macro
33#include "vtkObject.h"
34
35class VTKCOMMONCORE_EXPORT vtkOutputWindowCleanup
36{
37public:
40
41private:
42 vtkOutputWindowCleanup(const vtkOutputWindowCleanup& other) VTK_DELETE_FUNCTION;
43 vtkOutputWindowCleanup& operator=(const vtkOutputWindowCleanup& rhs) VTK_DELETE_FUNCTION;
44};
45
46class VTKCOMMONCORE_EXPORT vtkOutputWindow : public vtkObject
47{
48public:
49// Methods from vtkObject
54 void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
55
72 static void SetInstance(vtkOutputWindow *instance);
74
79 virtual void DisplayText(const char*);
80 virtual void DisplayErrorText(const char*);
81 virtual void DisplayWarningText(const char*);
82 virtual void DisplayGenericWarningText(const char*);
84
85 virtual void DisplayDebugText(const char*);
87
92 vtkBooleanMacro(PromptUser,int);
93 vtkSetMacro(PromptUser, int);
95
96protected:
98 ~vtkOutputWindow() VTK_OVERRIDE;
99 int PromptUser;
100private:
101 static vtkOutputWindow* Instance;
102private:
103 vtkOutputWindow(const vtkOutputWindow&) VTK_DELETE_FUNCTION;
104 void operator=(const vtkOutputWindow&) VTK_DELETE_FUNCTION;
105};
106
107// Uses schwartz counter idiom for singleton management
109
110
111#endif
a simple class to control print indentation
Definition: vtkIndent.h:40
abstract base class for most VTK objects
Definition: vtkObject.h:60
base class for writing debug output to a console
virtual void DisplayGenericWarningText(const char *)
void PrintSelf(ostream &os, vtkIndent indent) override
Print ObjectFactor to stream.
static vtkOutputWindow * GetInstance()
Return the singleton instance with no reference counting.
static vtkOutputWindow * New()
This is a singleton pattern New.
~vtkOutputWindow() override
virtual void DisplayDebugText(const char *)
static void SetInstance(vtkOutputWindow *instance)
Supply a user defined output window.
virtual void DisplayWarningText(const char *)
virtual void DisplayText(const char *)
Display the text.
virtual void DisplayErrorText(const char *)
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
static vtkOutputWindowCleanup vtkOutputWindowCleanupInstance