Vanetza
 
Loading...
Searching...
No Matches
vanetza::geonet::Timestamp Class Reference
Inheritance diagram for vanetza::geonet::Timestamp:

Public Types

typedef uint32_t value_type
 
typedef boost::units::make_scaled_unit< boost::units::si::time, boost::units::scale< 10, boost::units::static_rational<-3 > > >::type unit_type
 
typedef boost::units::absolute< unit_type > absolute_unit_type
 
typedef boost::units::quantity< absolute_unit_type, value_type > time_type
 
typedef boost::units::quantity< unit_type, value_type > duration_type
 

Public Member Functions

 Timestamp (time_type t)
 
 Timestamp (const Clock::time_point &)
 
 Timestamp (const boost::posix_time::ptime &)
 
value_type raw () const
 
time_type quantity () const
 
Timestampoperator+= (duration_type)
 
Timestampoperator-= (duration_type)
 
bool before (const Timestamp &other) const
 
bool after (const Timestamp &other) const
 

Static Public Member Functions

static unit_type millisecond ()
 
static boost::posix_time::ptime start_time ()
 

Private Attributes

time_type m_timestamp
 

Detailed Description

Definition at line 19 of file timestamp.hpp.

Member Typedef Documentation

◆ absolute_unit_type

typedef boost::units::absolute<unit_type> vanetza::geonet::Timestamp::absolute_unit_type

Definition at line 27 of file timestamp.hpp.

◆ duration_type

typedef boost::units::quantity<unit_type, value_type> vanetza::geonet::Timestamp::duration_type

Definition at line 29 of file timestamp.hpp.

◆ time_type

typedef boost::units::quantity<absolute_unit_type, value_type> vanetza::geonet::Timestamp::time_type

Definition at line 28 of file timestamp.hpp.

◆ unit_type

typedef boost::units::make_scaled_unit<boost::units::si::time,boost::units::scale<10,boost::units::static_rational<-3>>>::type vanetza::geonet::Timestamp::unit_type

Definition at line 26 of file timestamp.hpp.

◆ value_type

typedef uint32_t vanetza::geonet::Timestamp::value_type

Definition at line 22 of file timestamp.hpp.

Constructor & Destructor Documentation

◆ Timestamp() [1/4]

vanetza::geonet::Timestamp::Timestamp ( )
inline

Definition at line 34 of file timestamp.hpp.

◆ Timestamp() [2/4]

vanetza::geonet::Timestamp::Timestamp ( time_type  t)
inline

Definition at line 35 of file timestamp.hpp.

◆ Timestamp() [3/4]

vanetza::geonet::Timestamp::Timestamp ( const Clock::time_point &  time)

Definition at line 27 of file timestamp.cpp.

◆ Timestamp() [4/4]

vanetza::geonet::Timestamp::Timestamp ( const boost::posix_time::ptime &  time)

Definition at line 35 of file timestamp.cpp.

Member Function Documentation

◆ after()

bool vanetza::geonet::Timestamp::after ( const Timestamp other) const

Timestamp is after other one

Parameters
othertime stamp
Returns
true is other timestamp is before

Definition at line 76 of file timestamp.cpp.

◆ before()

bool vanetza::geonet::Timestamp::before ( const Timestamp other) const

Timestamp is before other one

Parameters
othertime stamp
Returns
true if other timestamp is later

Definition at line 71 of file timestamp.cpp.

◆ millisecond()

Timestamp::unit_type vanetza::geonet::Timestamp::millisecond ( )
static

Definition at line 13 of file timestamp.cpp.

◆ operator+=()

Timestamp & vanetza::geonet::Timestamp::operator+= ( duration_type  rhs)

Definition at line 42 of file timestamp.cpp.

◆ operator-=()

Timestamp & vanetza::geonet::Timestamp::operator-= ( duration_type  rhs)

Definition at line 48 of file timestamp.cpp.

◆ quantity()

time_type vanetza::geonet::Timestamp::quantity ( ) const
inline

Definition at line 39 of file timestamp.hpp.

◆ raw()

value_type vanetza::geonet::Timestamp::raw ( ) const
inline

Definition at line 38 of file timestamp.hpp.

◆ start_time()

boost::posix_time::ptime vanetza::geonet::Timestamp::start_time ( )
static

Definition at line 18 of file timestamp.cpp.

Member Data Documentation

◆ m_timestamp

time_type vanetza::geonet::Timestamp::m_timestamp
private

Definition at line 58 of file timestamp.hpp.


The documentation for this class was generated from the following files: