MIRA
Public Types | Public Member Functions | Public Attributes | List of all members
StampedPrimitive< T > Class Template Reference

Stamped class for primitive types like int, float, etc. More...

#include <utils/Stamped.h>

Inheritance diagram for StampedPrimitive< T >:
Inheritance graph
[legend]

Public Types

typedef T value_type
 

Public Member Functions

 StampedPrimitive ()
 Default constructor, that does not initializes anything. More...
 
 StampedPrimitive (const T &iData, const Time &iTimestamp, uint32 iSequenceID=0)
 Constructs the Stamped data from its time stamp and the actual data. More...
 
 StampedPrimitive (const T &iData, const Time &iTimestamp, const std::string &iFrameID, uint32 iSequenceID=0)
 Constructs the Stamped data from its time stamp, the frame id and the actual data. More...
 
template<typename Reflector >
void reflect (Reflector &r)
 
T & value ()
 Returns a read-write reference to the underlying data. More...
 
const T & value () const
 Returns a read-only reference to the underlying data. More...
 
 operator const T & () const
 Cast operator that casts this into T. More...
 
 operator T & ()
 Cast operator that casts this into T. More...
 
const T & operator= (const T &iValue)
 Assignment operator that can assign T to this. More...
 
T & internalValueRep ()
 Returns a read-write reference to the underlying data representation. More...
 
const T & internalValueRep () const
 Returns a read-only reference to the underlying data representation. More...
 

Public Attributes

Time timestamp
 The time stamp when the data was obtained. More...
 
std::string frameID
 The unique id of the transform frame that this data is assigned to (if any, otherwise empty) More...
 
uint32 sequenceID
 A user defined sequence ID. More...
 

Detailed Description

template<typename T>
class mira::StampedPrimitive< T >

Stamped class for primitive types like int, float, etc.

You should never use this class directly. Use Stamped instead and specify the primitive type as template parameter, e.g.

Stamped<int> myStampedInt;
myStampedInt = 123;
cout << myStampedInt.value;
cout << (int)myStampedInt;
See also
Stamped

Member Typedef Documentation

◆ value_type

typedef T value_type

Constructor & Destructor Documentation

◆ StampedPrimitive() [1/3]

StampedPrimitive ( )
inline

Default constructor, that does not initializes anything.

◆ StampedPrimitive() [2/3]

StampedPrimitive ( const T &  iData,
const Time iTimestamp,
uint32  iSequenceID = 0 
)
inline

Constructs the Stamped data from its time stamp and the actual data.

◆ StampedPrimitive() [3/3]

StampedPrimitive ( const T &  iData,
const Time iTimestamp,
const std::string &  iFrameID,
uint32  iSequenceID = 0 
)
inline

Constructs the Stamped data from its time stamp, the frame id and the actual data.

Member Function Documentation

◆ reflect()

void reflect ( Reflector &  r)
inline

◆ value() [1/2]

T& value ( )
inline

Returns a read-write reference to the underlying data.

◆ value() [2/2]

const T& value ( ) const
inline

Returns a read-only reference to the underlying data.

◆ operator const T &()

operator const T & ( ) const
inline

Cast operator that casts this into T.

◆ operator T &()

operator T& ( )
inline

Cast operator that casts this into T.

◆ operator=()

const T& operator= ( const T &  iValue)
inline

Assignment operator that can assign T to this.

◆ internalValueRep() [1/2]

T& internalValueRep ( )
inline

Returns a read-write reference to the underlying data representation.

◆ internalValueRep() [2/2]

const T& internalValueRep ( ) const
inline

Returns a read-only reference to the underlying data representation.

Member Data Documentation

◆ timestamp

Time timestamp
inherited

The time stamp when the data was obtained.

◆ frameID

std::string frameID
inherited

The unique id of the transform frame that this data is assigned to (if any, otherwise empty)

◆ sequenceID

uint32 sequenceID
inherited

A user defined sequence ID.


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