MIRA
|
Stamped class specialization for polymorphic pointers. More...
#include <utils/Stamped.h>
Public Types | |
typedef T * | value_type |
Public Member Functions | |
Stamped () | |
Default constructor, no time is set and data pointer is null. More... | |
Stamped (T *iData, const Time &iTimestamp, uint32 iSequenceID=0) | |
Constructs the Stamped data from its time stamp and the actual data. More... | |
Stamped (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 the underlying pointer. More... | |
const T * | value () const |
Returns the underlying pointer as constant pointer. More... | |
operator const T * () const | |
Cast operator that casts this into T. More... | |
operator T* () | |
Cast operator that casts this into T. More... | |
T * | operator= (T *iValue) |
Assignment operator that can assign T to this. More... | |
boost::shared_ptr< Object > & | internalValueRep () |
Returns a read-write reference to the underlying data representation. More... | |
const boost::shared_ptr< Object > & | internalValueRep () const |
Returns a read-only reference to the underlying data representation. More... | |
template<typename U > | |
operator const Stamped< U * > & () const | |
Cast operator that can cast any Stamped<T*> into another Stamped<U*> More... | |
template<typename U > | |
operator Stamped< U * > & () | |
Cast operator that can cast any Stamped<T*> into another Stamped<U*> 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... | |
Stamped class specialization for polymorphic pointers.
This specialization can only be used for pointers of polymorphic classes that are derived from mira::Object. The reason is, that this class internally stores a pointer to mira::Object only and performs a dynamic_cast when the concrete pointer T* is requested. This is necessary to be able to cast a Stamped<Object*> class to any other Stamped<T*> class.
Internally, this class uses a boost::shared_ptr to store the pointer, hence after assigning a pointer to Stamped<T*> it will take ownership of it and handles its destruction.
typedef T* value_type |
|
inline |
Default constructor, no time is set and data pointer is null.
Constructs the Stamped data from its time stamp and the actual data.
|
inline |
Constructs the Stamped data from its time stamp, the frame id and the actual data.
|
inline |
|
inline |
Returns the underlying pointer.
|
inline |
Returns the underlying pointer as constant pointer.
|
inline |
Cast operator that casts this into T.
|
inline |
Cast operator that casts this into T.
|
inline |
Assignment operator that can assign T to this.
|
inline |
Returns a read-write reference to the underlying data representation.
|
inline |
Returns a read-only reference to the underlying data representation.
|
inline |
Cast operator that can cast any Stamped<T*> into another Stamped<U*>
|
inline |
Cast operator that can cast any Stamped<T*> into another Stamped<U*>
|
inherited |
The time stamp when the data was obtained.
|
inherited |
The unique id of the transform frame that this data is assigned to (if any, otherwise empty)
|
inherited |
A user defined sequence ID.