![]() |
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
|
inlineexplicit |
printFn: callback function that will be called by this wrapper this callback function shall display the received QString somewhere
|
inline |
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 |
Referenced by ccConsoleOutput::write(), and ListWidgetConsole::write().