VTK
dox
Common
Core
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
=========================================================================*/
25
#ifndef vtkOutputWindow_h
26
#define vtkOutputWindow_h
27
28
#include "
vtkDebugLeaksManager.h
"
// Must be included before singletons
29
#include "vtkCommonCoreModule.h"
// For export macro
30
#include "
vtkObject.h
"
31
32
class
VTKCOMMONCORE_EXPORT
vtkOutputWindowCleanup
33
{
34
public
:
35
vtkOutputWindowCleanup
();
36
~
vtkOutputWindowCleanup
();
37
38
private
:
39
vtkOutputWindowCleanup
(
const
vtkOutputWindowCleanup
& other) =
delete
;
40
vtkOutputWindowCleanup
& operator=(
const
vtkOutputWindowCleanup
& rhs) =
delete
;
41
};
42
43
class
VTKCOMMONCORE_EXPORT
vtkOutputWindow
:
public
vtkObject
44
{
45
public
:
46
// Methods from vtkObject
47
vtkTypeMacro(
vtkOutputWindow
,
vtkObject
);
51
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
52
58
static
vtkOutputWindow
*
New
();
59
63
static
vtkOutputWindow
* GetInstance();
68
static
void
SetInstance(
vtkOutputWindow
*instance);
69
71
78
virtual
void
DisplayText(
const
char
*);
79
virtual
void
DisplayErrorText(
const
char
*);
80
virtual
void
DisplayWarningText(
const
char
*);
81
virtual
void
DisplayGenericWarningText(
const
char
*);
82
virtual
void
DisplayDebugText(
const
char
*);
84
86
95
vtkBooleanMacro(PromptUser,
bool
);
96
vtkSetMacro(PromptUser,
bool
);
98
100
107
vtkSetMacro(UseStdErrorForAllMessages,
bool
);
108
vtkGetMacro(UseStdErrorForAllMessages,
bool
);
109
vtkBooleanMacro(UseStdErrorForAllMessages,
bool
);
111
112
protected
:
113
vtkOutputWindow
();
114
~
vtkOutputWindow
()
override
;
115
116
enum
MessageTypes
117
{
118
MESSAGE_TYPE_TEXT
,
119
MESSAGE_TYPE_ERROR
,
120
MESSAGE_TYPE_WARNING
,
121
MESSAGE_TYPE_GENERIC_WARNING
,
122
MESSAGE_TYPE_DEBUG
123
};
124
130
vtkGetMacro(CurrentMessageType,
MessageTypes
);
131
132
bool
PromptUser
;
133
bool
UseStdErrorForAllMessages
;
134
135
private
:
136
static
vtkOutputWindow
* Instance;
137
MessageTypes
CurrentMessageType;
138
139
private
:
140
vtkOutputWindow
(
const
vtkOutputWindow
&) =
delete
;
141
void
operator=(
const
vtkOutputWindow
&) =
delete
;
142
};
143
144
// Uses schwartz counter idiom for singleton management
145
static
vtkOutputWindowCleanup
vtkOutputWindowCleanupInstance
;
146
147
148
#endif
vtkOutputWindow::MessageTypes
MessageTypes
Definition:
vtkOutputWindow.h:116
vtkObject::New
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
vtkObject
abstract base class for most VTK objects
Definition:
vtkObject.h:53
vtkOutputWindowCleanupInstance
static vtkOutputWindowCleanup vtkOutputWindowCleanupInstance
Definition:
vtkOutputWindow.h:145
vtkDebugLeaksManager.h
vtkOutputWindow::UseStdErrorForAllMessages
bool UseStdErrorForAllMessages
Definition:
vtkOutputWindow.h:133
vtkOutputWindow::MESSAGE_TYPE_ERROR
Definition:
vtkOutputWindow.h:119
vtkOutputWindow
base class for writing debug output to a console
Definition:
vtkOutputWindow.h:43
vtkIndent
a simple class to control print indentation
Definition:
vtkIndent.h:33
vtkOutputWindow::PromptUser
bool PromptUser
Definition:
vtkOutputWindow.h:130
vtkObject::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkOutputWindowCleanup
Definition:
vtkOutputWindow.h:32
vtkObject.h
vtkOutputWindow::MESSAGE_TYPE_GENERIC_WARNING
Definition:
vtkOutputWindow.h:121
vtkOutputWindow::MESSAGE_TYPE_TEXT
Definition:
vtkOutputWindow.h:118
vtkOutputWindow::MESSAGE_TYPE_WARNING
Definition:
vtkOutputWindow.h:120
Generated by
1.8.16