1 #ifndef __XBOT_MATLOGGER2_APPENDER_H__ 2 #define __XBOT_MATLOGGER2_APPENDER_H__ 24 class MatAppender :
public std::enable_shared_from_this<MatAppender>
29 typedef std::weak_ptr<MatAppender>
WeakPtr;
30 typedef std::shared_ptr<MatAppender>
Ptr;
45 bool add_logger(std::shared_ptr<MatLogger2> logger);
75 std::unique_ptr<Impl> _impl;
~MatAppender()
Destructor will join with the flusher thread if it was spawned by the user.
The MatAppender class allows to flush data to disk from multiple MatLogger2 loggers at once...
bool add_logger(std::shared_ptr< MatLogger2 > logger)
Register a MAT-logger to the appender.
std::weak_ptr< MatAppender > WeakPtr
static Ptr MakeInstance()
Returns a shared pointer to a new MatAppender object.
std::shared_ptr< MatAppender > Ptr
int flush_available_data()
Flush buffers from all registered loggers to disk.
void start_flush_thread()
Spawn a thread that will automatically flush data to disk whenever enough data is available...