Unique identifier for a written data sample in the form of a sequence of bytes.
More...
#include <rti/core/Cookie.hpp>
Public Member Functions |
| Cookie () |
| Creates an empty cookie.
|
|
template<typename ByteContainer > |
| Cookie (const ByteContainer &bytes) |
| Creates a new cookie with the bytes inside a container.
|
|
dds::core::vector< uint8_t > & | value () |
| Retrieves a reference to the vector of bytes.
|
|
const dds::core::vector
< uint8_t > & | value () const |
| Retrieves a const reference to the vector of bytes.
|
|
template<typename T > |
T * | to_pointer () const |
| Converts a cookie into a pointer.
|
|
Detailed Description
Unique identifier for a written data sample in the form of a sequence of bytes.
- See Also
- dds::pub::DataWriter::write(const T&, rti::pub::WriteParams&)
Constructor & Destructor Documentation
rti::core::Cookie::Cookie |
( |
| ) |
|
|
inline |
template<typename ByteContainer >
rti::core::Cookie::Cookie |
( |
const ByteContainer & |
bytes | ) |
|
|
inlineexplicit |
Creates a new cookie with the bytes inside a container.
Member Function Documentation
Retrieves a reference to the vector of bytes.
Retrieves a const reference to the vector of bytes.
template<typename T >
T* rti::core::Cookie::to_pointer |
( |
| ) |
const |
|
inline |
Converts a cookie into a pointer.
Utility function that allows retrieving a pointer stored in a cookie.
- Precondition
- The cookie's value was filled with a pointer, otherwise the value returned may not be a valid memory address.
- Template Parameters
-
- Returns
- The pointer this cookie represents
Friends And Related Function Documentation
std::ostream & operator<< |
( |
std::ostream & |
out, |
|
|
const Cookie & |
cookie |
|
) |
| |
|
related |
Prints a Cookie to an output stream.