![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
#include <Consoles.h>
Public Member Functions | |
| ConsoleWrapper (std::function< void(const QString &)> printFn) | |
| void | write (const char *messagePart) |
| void | flush () const |
Class implementing 'write' and flush to be able to act like a Python file object in order to be able to output messages from Python's print to the ACloudViewer console instead of ACloudViewer's stdout & stderr
Definition at line 22 of file Consoles.h.
|
inlineexplicit |
printFn: callback function that will be called by this wrapper this callback function shall display the received QString somewhere
Definition at line 27 of file Consoles.h.
|
inline |
Definition at line 65 of file Consoles.h.
Referenced by ccConsoleOutput::flush(), and ListWidgetConsole::flush().
|
inline |
Method called by the Python interpreter when something is written. This function will in turn call the printFn callback given to the constructor
This function splits the messagePart given by the Python interpreter using the newline ('
') character and call the printFn on each of these splits.
The goal of this is to ensure that each '
'-separated lines appears one one line on ACloudViewer's console output
| messagePart | the message that the Python interpreter sends us |
Definition at line 43 of file Consoles.h.
Referenced by ccConsoleOutput::write(), and ListWidgetConsole::write().