OGS
VtkConsoleOutputWindow.cpp
Go to the documentation of this file.
1
12
13#include <ostream>
14#include <string>
15
16#include "vtkObjectFactory.h"
17#ifdef WIN32
18#include "vtkWindows.h"
19#endif
20
22
23//----------------------------------------------------------------------------
25
26//----------------------------------------------------------------------------
28
29//----------------------------------------------------------------------------
30// Display text in the window, and translate the \n to \r\n.
31//
32void 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//----------------------------------------------------------------------------
58void VtkConsoleOutputWindow::PrintSelf(ostream& os, vtkIndent indent)
59{
60 this->Superclass::PrintSelf(os, indent);
61}
vtkStandardNewMacro(VtkConsoleOutputWindow)
VtkWin32ConsoleOutputWindow is used to suppress message boxes on Windows.
void DisplayText(const char *) override
void PrintSelf(ostream &os, vtkIndent indent) override
~VtkConsoleOutputWindow() override