logger_impl.cpp
Go to the documentation of this file.
1 #include "logger_impl.h"
2 
4 
5 namespace python
6 {
7  namespace pointmatchersupport
8  {
9  void pybindLoggerImpl(py::module& p_module)
10  {
11  using NullLogger = pms::NullLogger;
12  py::class_<pms::NullLogger, std::shared_ptr<NullLogger>, Logger>(p_module, "NullLogger")
13  .def_static("description", &NullLogger::description)
14 
15  .def(py::init<>());
16 
17  using FileLogger = pms::FileLogger;
18  py::class_<FileLogger, std::shared_ptr<FileLogger>, Logger>(p_module, "FileLogger")
19  .def_static("description", &FileLogger::description)
20  .def_static("availableParameters", &FileLogger::availableParameters)
21 
22  .def_readonly("infoFileName", &FileLogger::infoFileName)
23  .def_readonly("warningFileName", &FileLogger::warningFileName)
24  .def_readonly("displayLocation", &FileLogger::displayLocation)
25 
26  .def(py::init<const Parameters&>(), py::arg("params") = Parameters())
27 
28  .def("hasInfoChannel", &FileLogger::hasInfoChannel, "Return whether this logger provides the info channel")
29  .def("beginInfoEntry", &FileLogger::beginInfoEntry, py::arg("file"), py::arg("line"), py::arg("func"), "Start a new entry into the info channel")
30 // .def("infoStream", &FileLogger::infoStream, py::return_value_policy::reference, "Return the info stream, 0 if hasInfoChannel() returns false") // FIXME
31  .def("finishInfoEntry", &FileLogger::finishInfoEntry, "Finish the entry into the info channel")
32  .def("hasWarningChannel", &FileLogger::hasWarningChannel, "Return whether this logger provides the warning channel")
33  .def("beginWarningEntry", &FileLogger::beginWarningEntry, "Start a new entry into the warning channel")
34 // .def("warningStream", &FileLogger::warningStream, py::return_value_policy::reference, "Return the warning stream, 0 if hasWarningChannel() returns false") // FIXME
35  .def("finishWarningEntry", &FileLogger::finishWarningEntry, "Finish the entry into the warning channel");
36  }
37  }
38 }
PointMatcherSupport::FileLogger
Definition: LoggerImpl.h:55
LoggerImpl.h
Parameters
PM::Parameters Parameters
Definition: filterProfiler.cpp:20
python::pointmatchersupport::pybindLoggerImpl
void pybindLoggerImpl(py::module &p_module)
Definition: logger_impl.cpp:9
PointMatcherSupport::Logger
The logger interface, used to output warnings and informations.
Definition: PointMatcher.h:104
python
Definition: add_descriptor.cpp:5
logger_impl.h
PointMatcherSupport::NullLogger
Definition: LoggerImpl.h:44


libpointmatcher
Author(s):
autogenerated on Mon Jan 1 2024 03:24:43