Changeset 130:16624d4ea776 in rrlib_logging


Ignore:
Timestamp:
11.12.2015 15:59:25 (5 years ago)
Author:
Tobias Föhst <foehst@…>
Branch:
13.10
Children:
131:d85d6bf17318, 132:013f568ceb32
Phase:
public
Message:

Adds streaming operator for rrlib::time::tDuration

File:
1 edited

Legend:

Unmodified
Added
Removed
  • messages/tStream.h

    r116 r130  
    204204   * \returns A reference to the altered stream (in this case the proxy) 
    205205   */ 
    206   inline tStream &operator << (const rrlib::time::tTimestamp& value) 
     206  inline tStream &operator << (const rrlib::time::tTimestamp &value) 
     207  { 
     208    this->stream << rrlib::time::ToIsoString(value); 
     209    return *this; 
     210  } 
     211 
     212  /*! Streaming operator for durations 
     213   * 
     214   * There are no iostream operators for the std::chrono::duration 
     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::tDuration &value) 
    207222  { 
    208223    this->stream << rrlib::time::ToIsoString(value); 
Note: See TracChangeset for help on using the changeset viewer.