class mola::MockLogModule
Overview
class MockLogModule: public mola::ExecutableBase { public: // fields mrpt::system::COutputLogger child_; // methods virtual void initialize(const mrpt::containers::yaml& cfg); virtual void spinOnce(); virtual std::vector<std::pair<ChildLoggerName, mrpt::system::COutputLogger*>> child_loggers() const; };
Inherited Members
public: // structs struct DiagnosticsOutput; // methods virtual void initialize(const Yaml& cfg) = 0; virtual void spinOnce() = 0; ExecutableBase& operator = (const ExecutableBase&); ExecutableBase& operator = (ExecutableBase&&);
Methods
virtual void initialize(const mrpt::containers::yaml& cfg)
This must be implemented to read all the required parameters
This should be reimplemented to read all the required parameters
virtual void spinOnce()
Runs any required action on a timely manner
virtual std::vector<std::pair<ChildLoggerName, mrpt::system::COutputLogger*>> child_loggers() const
Additional loggers owned by this module that are not this ExecutableBase itself, e.g. a library engine run on a background thread with its own mrpt::system::COutputLogger. Overriding this lets generic log consumers (like a GUI console window) capture their output the same way they already do for the module itself, without the module having to relay each message through its own logger. Each entry pairs a short name identifying the sub-logger with a pointer to it; the pointer must stay valid for as long as it may be returned here.
See also: