Weakly typed data buffer that couples together a generic pointer with the size and type information of the memory it points to.
Definition at line 70 of file ChannelPacketTypes.hpp.
Public Member Functions | |
GenericData () | |
template<typename T > | |
GenericData (T *data) | |
GenericData (void *data, size_t size) | |
template<typename T > | |
T * | getData () const |
void * | getPointer () const |
size_t | size () const |
|
inline |
Default construct to point to nullptr.
Definition at line 76 of file ChannelPacketTypes.hpp.
|
inline |
Construct to point to data with only size information and no type information.
data | the pointer to the data |
size | the size of the data |
Definition at line 87 of file ChannelPacketTypes.hpp.
|
inline |
Construct to point to data of the given type.
T | the type to point to |
data | the pointer |
Definition at line 101 of file ChannelPacketTypes.hpp.
|
inline |
Get a pointer to the data with the given type.
if | the type T is incompatible with the value. |
T | the type of data |
Definition at line 130 of file ChannelPacketTypes.hpp.
|
inline |
Get the pointer to the data.
Definition at line 159 of file ChannelPacketTypes.hpp.
Referenced by dw::framework::ManagedPortInput< T >::takeOwnership().
|
inline |
Get the size of the data pointed to.
Definition at line 113 of file ChannelPacketTypes.hpp.