TimestampVariant Class Reference

#include <ArmarXCore/observers/variant/TimestampVariant.h>

+ Inheritance diagram for TimestampVariant:

Public Member Functions

VariantDataClassPtr clone (const Ice::Current &c=Ice::emptyCurrent) const override
 
void deserialize (const armarx::ObjectSerializerBasePtr &serializer, const ::Ice::Current &=Ice::emptyCurrent) override
 
long getTimestamp ()
 return timestamp in microseconds since the Unix Epoch. More...
 
VariantTypeId getType (const Ice::Current &c=Ice::emptyCurrent) const override
 
Ice::ObjectPtr ice_clone () const override
 
std::string output (const Ice::Current &c=Ice::emptyCurrent) const override
 
void serialize (const armarx::ObjectSerializerBasePtr &serializer, const ::Ice::Current &=Ice::emptyCurrent) const override
 
 TimestampVariant ()
 
 TimestampVariant (IceUtil::Time time)
 
 TimestampVariant (long timestamp)
 Construct a timestamp Variant from an initialization value. More...
 
template<class... Ts>
 TimestampVariant (std::chrono::duration< Ts... > duration)
 
template<class... Ts>
 TimestampVariant (std::chrono::time_point< Ts... > timepoint)
 
IceUtil::Time toTime ()
 
bool validate (const Ice::Current &c=Ice::emptyCurrent) override
 

Static Public Member Functions

static TimestampVariantPtr nowPtr ()
 

Friends

std::ostream & operator<< (std::ostream &stream, const TimestampVariant &rhs)
 

Detailed Description

Implements a Variant type for timestamps. The timestamp value is interpreted as microseconds since the Unix Epoch. Internally the class bases on the IceUtil::Time functionality of Ice.

For information on how to use this type, refer to Variant.

Definition at line 54 of file TimestampVariant.h.

Constructor & Destructor Documentation

◆ TimestampVariant() [1/5]

Definition at line 31 of file TimestampVariant.cpp.

◆ TimestampVariant() [2/5]

TimestampVariant ( long  timestamp)

Construct a timestamp Variant from an initialization value.

Parameters
timestampInitialization timestamp in microseconds since the Unix Epoch

Definition at line 35 of file TimestampVariant.cpp.

◆ TimestampVariant() [3/5]

TimestampVariant ( IceUtil::Time  time)

Definition at line 40 of file TimestampVariant.cpp.

◆ TimestampVariant() [4/5]

TimestampVariant ( std::chrono::duration< Ts... >  duration)
inline

Definition at line 67 of file TimestampVariant.h.

◆ TimestampVariant() [5/5]

TimestampVariant ( std::chrono::time_point< Ts... >  timepoint)
inline

Definition at line 71 of file TimestampVariant.h.

Member Function Documentation

◆ clone()

VariantDataClassPtr clone ( const Ice::Current &  c = Ice::emptyCurrent) const
inlineoverride

Definition at line 86 of file TimestampVariant.h.

◆ deserialize()

void deserialize ( const armarx::ObjectSerializerBasePtr &  serializer,
const ::Ice::Current &  = Ice::emptyCurrent 
)
override

Definition at line 57 of file TimestampVariant.cpp.

◆ getTimestamp()

long getTimestamp ( )

return timestamp in microseconds since the Unix Epoch.

Definition at line 45 of file TimestampVariant.cpp.

◆ getType()

VariantTypeId getType ( const Ice::Current &  c = Ice::emptyCurrent) const
inlineoverride

Definition at line 96 of file TimestampVariant.h.

◆ ice_clone()

Ice::ObjectPtr ice_clone ( ) const
inlineoverride

Definition at line 82 of file TimestampVariant.h.

◆ nowPtr()

static TimestampVariantPtr nowPtr ( )
inlinestatic

Definition at line 111 of file TimestampVariant.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ output()

std::string output ( const Ice::Current &  c = Ice::emptyCurrent) const
inlineoverride

Definition at line 90 of file TimestampVariant.h.

+ Here is the call graph for this function:

◆ serialize()

void serialize ( const armarx::ObjectSerializerBasePtr &  serializer,
const ::Ice::Current &  = Ice::emptyCurrent 
) const
override

Definition at line 50 of file TimestampVariant.cpp.

◆ toTime()

IceUtil::Time toTime ( )
inline

Definition at line 116 of file TimestampVariant.h.

+ Here is the caller graph for this function:

◆ validate()

bool validate ( const Ice::Current &  c = Ice::emptyCurrent)
inlineoverride

Definition at line 100 of file TimestampVariant.h.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  stream,
const TimestampVariant rhs 
)
friend

Definition at line 105 of file TimestampVariant.h.


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