ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
PyPrintLogger.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #pragma once
9 #include <CVLog.h>
10 
11 #undef slots
12 #include <pybind11/pybind11.h>
13 
14 #include <mutex>
15 
16 namespace py = pybind11;
17 
25 class PyPrintLogger : public CVLog
26 {
27  public:
28  PyPrintLogger() = default;
29 
30  ~PyPrintLogger() override = default;
31 
32  void logMessage(const QString &message, int level) override;
33 
34  private:
35  std::mutex m_lock;
36 };
define_qcc_db
void define_qcc_db(py::module &)
Definition: qcc_db.cpp:70
PyPrintLogger
Definition: PyPrintLogger.h:25
PYBIND11_EMBEDDED_MODULE
PYBIND11_EMBEDDED_MODULE(ccinternals, m)
Definition: Runtime.cpp:117
guessPlatlibdir
QString guessPlatlibdir()
Definition: load_plugins.cpp:58
CVLog
Main log interface.
Definition: CVLog.h:25
NULL
#define NULL
Definition: UVUnwrapping.cpp:40
PYBIND11_MODULE
PYBIND11_MODULE(pycc, m)
Definition: pycc.cpp:189
define_someQtThings
void define_someQtThings(py::module &m)
Definition: pycc.cpp:104
define_qcc_io
void define_qcc_io(py::module &)
Definition: qcc_io.cpp:63
CVLog.h
width
int width
Definition: FileIOFactory.cpp:142
casters.h
PyPrintLogger::PyPrintLogger
PyPrintLogger()=default
getPluginsWrappersPath
QString getPluginsWrappersPath()
Definition: load_plugins.cpp:71
height
int height
Definition: FileIOFactory.cpp:143
observer_ptr
std::unique_ptr< T, py::nodelete > observer_ptr
A unique_ptr that never free its ptr.
Definition: wrappers.h:24
load_pluginWrappers
void load_pluginWrappers(py::module_ &m)
Definition: load_plugins.cpp:93
e
const double * e
Definition: essential_matrix_poly.h:10
define_scalar_type
std::enable_if< std::is_same< T, double >::value, void >::type define_scalar_type(py::module &m)
Definition: pycc.cpp:43
InitQApplication
void InitQApplication()
Definition: pycc.cpp:64
FileIOFilter.h
import_pyccRuntime
void import_pyccRuntime(py::module &m)
Definition: pycc.cpp:88
CVTypes.h
PyPrintLogger.h
PyPrintLogger::~PyPrintLogger
~PyPrintLogger() override=default
CVLog::Warning
static bool Warning(const char *format,...)
Prints out a formatted warning message in console.
Definition: CVLog.cpp:133
define_pycc
void define_pycc(py::module &m)
Definition: pycc.cpp:133
pybind11
Definition: ccGuiPythonInstance.h:15
CVLog::RegisterInstance
static void RegisterInstance(CVLog *logInstance)
Registers a unique instance.
Definition: CVLog.cpp:81
load_pluginWrappers
void load_pluginWrappers(py::module &)
Utils::module
static double module(T *vector)
Definition: utils.h:105
PyPrintLogger::logMessage
void logMessage(const QString &message, int level) override
Generic message logging method.
Definition: PyPrintLogger.cpp:10
MODULE_EXTENSION
const char * MODULE_EXTENSION
Definition: load_plugins.cpp:56
QApplication
Definition: gui.h:16
patch::to_string
std::string to_string(const T &n)
Definition: Common.h:20
type
char type
Definition: FileIOFactory.cpp:131