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
=========================================================================*/
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
35
class
VTKCOMMONCORE_EXPORT
vtkOutputWindowCleanup
36
{
37
public
:
38
vtkOutputWindowCleanup
();
39
~
vtkOutputWindowCleanup
();
40
41
private
:
42
vtkOutputWindowCleanup
(
const
vtkOutputWindowCleanup
& other) =
delete
;
43
vtkOutputWindowCleanup
& operator=(
const
vtkOutputWindowCleanup
& rhs) =
delete
;
44
};
45
46
class
VTKCOMMONCORE_EXPORT
vtkOutputWindow
:
public
vtkObject
47
{
48
public
:
49
// Methods from vtkObject
50
vtkTypeMacro(
vtkOutputWindow
,
vtkObject
);
54
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
55
61
static
vtkOutputWindow
*
New
();
62
66
static
vtkOutputWindow
* GetInstance();
71
static
void
SetInstance(
vtkOutputWindow
*instance);
72
74
81
virtual
void
DisplayText(
const
char
*);
82
virtual
void
DisplayErrorText(
const
char
*);
83
virtual
void
DisplayWarningText(
const
char
*);
84
virtual
void
DisplayGenericWarningText(
const
char
*);
85
virtual
void
DisplayDebugText(
const
char
*);
87
89
98
vtkBooleanMacro(PromptUser,
bool
);
99
vtkSetMacro(PromptUser,
bool
);
101
103
110
vtkSetMacro(UseStdErrorForAllMessages,
bool
);
111
vtkGetMacro(UseStdErrorForAllMessages,
bool
);
112
vtkBooleanMacro(UseStdErrorForAllMessages,
bool
);
114
115
protected
:
116
vtkOutputWindow
();
117
~
vtkOutputWindow
()
override
;
118
119
enum
MessageTypes
120
{
121
MESSAGE_TYPE_TEXT
,
122
MESSAGE_TYPE_ERROR
,
123
MESSAGE_TYPE_WARNING
,
124
MESSAGE_TYPE_GENERIC_WARNING
,
125
MESSAGE_TYPE_DEBUG
126
};
127
133
vtkGetMacro(CurrentMessageType,
MessageTypes
);
134
135
bool
PromptUser
;
136
bool
UseStdErrorForAllMessages
;
137
138
private
:
139
static
vtkOutputWindow
* Instance;
140
MessageTypes
CurrentMessageType;
141
142
private
:
143
vtkOutputWindow
(
const
vtkOutputWindow
&) =
delete
;
144
void
operator=(
const
vtkOutputWindow
&) =
delete
;
145
};
146
147
// Uses schwartz counter idiom for singleton management
148
static
vtkOutputWindowCleanup
vtkOutputWindowCleanupInstance
;
149
150
151
#endif
vtkOutputWindow::MessageTypes
MessageTypes
Definition:
vtkOutputWindow.h:119
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:59
vtkOutputWindowCleanupInstance
static vtkOutputWindowCleanup vtkOutputWindowCleanupInstance
Definition:
vtkOutputWindow.h:148
vtkDebugLeaksManager.h
vtkOutputWindow::UseStdErrorForAllMessages
bool UseStdErrorForAllMessages
Definition:
vtkOutputWindow.h:136
vtkOutputWindow::MESSAGE_TYPE_ERROR
Definition:
vtkOutputWindow.h:122
vtkOutputWindow
base class for writing debug output to a console
Definition:
vtkOutputWindow.h:46
vtkIndent
a simple class to control print indentation
Definition:
vtkIndent.h:39
vtkOutputWindow::PromptUser
bool PromptUser
Definition:
vtkOutputWindow.h:133
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:35
vtkObject.h
vtkOutputWindow::MESSAGE_TYPE_GENERIC_WARNING
Definition:
vtkOutputWindow.h:124
vtkOutputWindow::MESSAGE_TYPE_TEXT
Definition:
vtkOutputWindow.h:121
vtkOutputWindow::MESSAGE_TYPE_WARNING
Definition:
vtkOutputWindow.h:123
Generated by
1.8.16