dynamic-graph  4.4.3
Dynamic graph library
real-time-logger.h
1 // -*- mode: c++ -*-
2 // Copyright 2018, Joseph Mirabel LAAS-CNRS
3 //
4 
5 #ifndef DYNAMIC_GRAPH_LOGGER_REAL_TIME_H
6 #define DYNAMIC_GRAPH_LOGGER_REAL_TIME_H
7 
8 #ifdef ENABLE_RT_LOG
9 #define dgADD_OSTREAM_TO_RTLOG(ostr) \
10  ::dynamicgraph::RealTimeLogger::instance().addOutputStream( \
11  ::dynamicgraph::LoggerStreamPtr_t( \
12  new ::dynamicgraph::LoggerIOStream(ostr)))
13 
14 #define dgRTLOG() ::dynamicgraph::RealTimeLogger::instance().front()
15 #else // ENABLE_RT_LOG
16 #define dgADD_OSTREAM_TO_RTLOG(ostr) struct __end_with_semicolon
17 #define dgRTLOG() \
18  if (1) \
19  ; \
20  else \
21  __null_stream()
22 #endif
23 
24 #include <dynamic-graph/real-time-logger-def.h>
25 
26 #endif