GAMS  1.4.0
gams::pose::Stamped< Impl > Class Template Reference

Internal class implementing coordinates stamped with timestamp. More...

#include <Stamped.h>

Inheritance diagram for gams::pose::Stamped< Impl >:

Public Types

using derived_type = typename Impl::derived_type
 

Public Member Functions

 Stamped ()=default
 Default Constructor. More...
 
template<typename... Args>
 Stamped (Args &&... args)
 Construct without a TimeStamp object. More...
 
 Stamped (TimeValue time)
 Construct using a TimeValue object. More...
 
template<typename... Args>
 Stamped (TimeValue time, Args &&... args)
 Construct with a timestamp. More...
 
uint64_t nanos () const
 Get time as nanos since std::steady_clock epoch. More...
 
uint64_t nanos (uint64_t v)
 Set time as nanos since std::steady_clock epoch. More...
 
double secs () const
 Get time as seconds since std::steady_clock epoch. More...
 
double secs (double v)
 Set time as seconds since std::steady_clock epoch. More...
 
TimeValue time () const
 Get time as std::chrono based TimeValue. More...
 
TimeValue time (TimeValue v)
 Set time from std::chrono based TimeValue. More...
 

Private Attributes

TimeValue time_
 

Detailed Description

template<typename Impl>
class gams::pose::Stamped< Impl >

Internal class implementing coordinates stamped with timestamp.

Do not use directly.

Definition at line 102 of file Stamped.h.

Member Typedef Documentation

◆ derived_type

template<typename Impl >
using gams::pose::Stamped< Impl >::derived_type = typename Impl::derived_type

Definition at line 107 of file Stamped.h.

Constructor & Destructor Documentation

◆ Stamped() [1/4]

template<typename Impl >
gams::pose::Stamped< Impl >::Stamped ( )
default

Default Constructor.

Initializes timestamp to zero

◆ Stamped() [2/4]

template<typename Impl >
template<typename... Args>
gams::pose::Stamped< Impl >::Stamped ( Args &&...  args)

Construct without a TimeStamp object.

Initializes time as zero, unless at least one argument is a type which includes a timestamp, in which case that time will become the stamp of this pose. If multiple do, the first such argument will be used.

This overload only participates if the first argument isn't TimeValue

Parameters
argsarguments to pass through to base type

◆ Stamped() [3/4]

template<typename Impl >
gams::pose::Stamped< Impl >::Stamped ( TimeValue  time)
inlineexplicit

Construct using a TimeValue object.

Parameters
timethe time to stamp with

Definition at line 147 of file Stamped.h.

◆ Stamped() [4/4]

template<typename Impl >
template<typename... Args>
gams::pose::Stamped< Impl >::Stamped ( TimeValue  time,
Args &&...  args 
)

Construct with a timestamp.

Parameters
timethe timestamp to use
argsarguments to pass through to base constructor

Member Function Documentation

◆ nanos() [1/2]

template<typename Impl >
uint64_t gams::pose::Stamped< Impl >::nanos ( ) const
inline

Get time as nanos since std::steady_clock epoch.

Definition at line 174 of file Stamped.h.

◆ nanos() [2/2]

template<typename Impl >
uint64_t gams::pose::Stamped< Impl >::nanos ( uint64_t  v)
inline

Set time as nanos since std::steady_clock epoch.

Definition at line 181 of file Stamped.h.

◆ secs() [1/2]

template<typename Impl >
double gams::pose::Stamped< Impl >::secs ( ) const
inline

Get time as seconds since std::steady_clock epoch.

Definition at line 188 of file Stamped.h.

◆ secs() [2/2]

template<typename Impl >
double gams::pose::Stamped< Impl >::secs ( double  v)
inline

Set time as seconds since std::steady_clock epoch.

Definition at line 195 of file Stamped.h.

◆ time() [1/2]

template<typename Impl >
TimeValue gams::pose::Stamped< Impl >::time ( ) const
inline

Get time as std::chrono based TimeValue.

Definition at line 167 of file Stamped.h.

◆ time() [2/2]

template<typename Impl >
TimeValue gams::pose::Stamped< Impl >::time ( TimeValue  v)
inline

Set time from std::chrono based TimeValue.

Returns
the new time

Definition at line 171 of file Stamped.h.

Member Data Documentation

◆ time_

template<typename Impl >
TimeValue gams::pose::Stamped< Impl >::time_
private

Definition at line 204 of file Stamped.h.


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