OGS
VtkConsoleOutputWindow.cpp
Go to the documentation of this file.
1
11
#include "
VtkConsoleOutputWindow.h
"
12
13
#include <ostream>
14
#include <string>
15
16
#include "vtkObjectFactory.h"
17
#ifdef WIN32
18
#include "vtkWindows.h"
19
#endif
20
21
vtkStandardNewMacro
(
VtkConsoleOutputWindow
);
22
23
//----------------------------------------------------------------------------
24
VtkConsoleOutputWindow::VtkConsoleOutputWindow
() =
default
;
25
26
//----------------------------------------------------------------------------
27
VtkConsoleOutputWindow::~VtkConsoleOutputWindow
() =
default
;
28
29
//----------------------------------------------------------------------------
30
// Display text in the window, and translate the \n to \r\n.
31
//
32
void
VtkConsoleOutputWindow::DisplayText
(
const
char
* someText)
33
{
34
if
(!someText)
35
{
36
return
;
37
}
38
39
// Disable warnings
40
std::string someTextString(someText);
41
if
((someTextString.find(
42
"This is very expensive for vtkMappedDataArray subclasses, since "
43
"the scalar array must be generated for each call."
) !=
44
std::string::npos) ||
45
(someTextString.find(
"Invalid framebuffer operation"
) !=
46
std::string::npos))
47
{
48
return
;
49
}
50
51
#ifdef WIN32
52
OutputDebugString(someTextString.c_str());
53
#endif
54
std::cerr << someText;
55
}
56
57
//----------------------------------------------------------------------------
58
void
VtkConsoleOutputWindow::PrintSelf
(ostream& os, vtkIndent indent)
59
{
60
this->Superclass::PrintSelf(os, indent);
61
}
vtkStandardNewMacro
vtkStandardNewMacro(VtkConsoleOutputWindow)
VtkConsoleOutputWindow.h
VtkWin32ConsoleOutputWindow is used to suppress message boxes on Windows.
VtkConsoleOutputWindow
Definition
VtkConsoleOutputWindow.h:22
VtkConsoleOutputWindow::DisplayText
void DisplayText(const char *) override
Definition
VtkConsoleOutputWindow.cpp:32
VtkConsoleOutputWindow::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Definition
VtkConsoleOutputWindow.cpp:58
VtkConsoleOutputWindow::VtkConsoleOutputWindow
VtkConsoleOutputWindow()
VtkConsoleOutputWindow::~VtkConsoleOutputWindow
~VtkConsoleOutputWindow() override
Applications
DataExplorer
VtkVis
VtkConsoleOutputWindow.cpp
Generated by
1.11.0