Changeset 91:b2cee6111559 in rrlib_logging


Ignore:
Timestamp:
24.06.2012 19:02:03 (8 years ago)
Author:
Max Reichardt <mreichardt@…>
Branch:
default
Phase:
public
Transplant:
bd75583c9b42eae37d60dfdec0ea5c0052c95994
Message:

Added stream operator for rrlib_time timestamps to log stream.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • messages/tStream.h

    r87 r91  
    6363#include <boost/type_traits/is_base_of.hpp> 
    6464#include <boost/utility/enable_if.hpp> 
     65#include "rrlib/time/time.h" 
    6566 
    6667//---------------------------------------------------------------------- 
     
    209210  } 
    210211 
     212  /*! Streaming operator for timestamps 
     213   * 
     214   * There are no iostream operators for the std::chrono::time_point 
     215   * template. Therefore, we need an operator implementation here. 
     216   * 
     217   * \param value   The duration value to put into the stream. 
     218   * 
     219   * \returns A reference to the altered stream (in this case the proxy) 
     220   */ 
     221  inline tStream &operator << (const rrlib::time::tTimestamp& value) 
     222  { 
     223    this->stream << rrlib::time::ToIsoString(value); 
     224    return *this; 
     225  } 
     226 
    211227  /*! Streaming operator for pointers 
    212228   * 
Note: See TracChangeset for help on using the changeset viewer.