OGS
VtkConsoleOutputWindow.cpp
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: Copyright (c) OpenGeoSys Community (opengeosys.org)
2
// SPDX-License-Identifier: BSD-3-Clause
3
4
#include "
VtkConsoleOutputWindow.h
"
5
6
#include <ostream>
7
#include <string>
8
9
#include "vtkObjectFactory.h"
10
#ifdef WIN32
11
#include "vtkWindows.h"
12
#endif
13
14
vtkStandardNewMacro
(
VtkConsoleOutputWindow
);
15
16
//----------------------------------------------------------------------------
17
VtkConsoleOutputWindow::VtkConsoleOutputWindow
() =
default
;
18
19
//----------------------------------------------------------------------------
20
VtkConsoleOutputWindow::~VtkConsoleOutputWindow
() =
default
;
21
22
//----------------------------------------------------------------------------
23
// Display text in the window, and translate the \n to \r\n.
24
//
25
void
VtkConsoleOutputWindow::DisplayText
(
const
char
* someText)
26
{
27
if
(!someText)
28
{
29
return
;
30
}
31
32
// Disable warnings
33
std::string someTextString(someText);
34
if
((someTextString.find(
35
"This is very expensive for vtkMappedDataArray subclasses, since "
36
"the scalar array must be generated for each call."
) !=
37
std::string::npos) ||
38
(someTextString.find(
"Invalid framebuffer operation"
) !=
39
std::string::npos))
40
{
41
return
;
42
}
43
44
#ifdef WIN32
45
OutputDebugString(someTextString.c_str());
46
#endif
47
std::cerr << someText;
48
}
49
50
//----------------------------------------------------------------------------
51
void
VtkConsoleOutputWindow::PrintSelf
(ostream& os, vtkIndent indent)
52
{
53
this->Superclass::PrintSelf(os, indent);
54
}
vtkStandardNewMacro
vtkStandardNewMacro(VtkConsoleOutputWindow)
VtkConsoleOutputWindow.h
VtkConsoleOutputWindow
Definition
VtkConsoleOutputWindow.h:12
VtkConsoleOutputWindow::DisplayText
void DisplayText(const char *) override
Definition
VtkConsoleOutputWindow.cpp:25
VtkConsoleOutputWindow::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Definition
VtkConsoleOutputWindow.cpp:51
VtkConsoleOutputWindow::VtkConsoleOutputWindow
VtkConsoleOutputWindow()
VtkConsoleOutputWindow::~VtkConsoleOutputWindow
~VtkConsoleOutputWindow() override
Applications
DataExplorer
VtkVis
VtkConsoleOutputWindow.cpp
Generated by
1.14.0