#include <source/ariba/utility/serialization/Data.hpp>
Public Member Functions | |
finline | DataTpl () |
finline | DataTpl (const DataTpl< T, DataModel > ©) |
finline | DataTpl (const DataModel &_model) |
finline | DataTpl (const T *buffer, size_t length) |
finline | DataTpl (T *buffer, size_t length) |
finline | DataTpl (size_t length) |
finline T * | getBuffer () const |
finline size_t | getLength () const |
void | setLength (size_t new_length) |
finline void | ensureLength (size_t neededLength) |
finline DataManipulator | operator[] (size_t index) |
finline const DataManipulator | operator[] (size_t index) const |
_Data | sub (size_t index, size_t length=~0) |
_Data | clone (size_t index, size_t length) const |
_Data | clone () const |
finline bool | isEmpty () const |
finline bool | isUnspecified () const |
finline void | release () |
template<typename X> | |
_Data & | operator= (const DataTpl< X > &source) |
template<typename X> | |
finline bool | operator== (DataTpl< X > &data) |
finline _Data & | operator &= (_Data &data) |
finline _Data & | operator|= (_Data &data) |
finline _Data & | operator^= (_Data &data) |
finline _Data | operator & (_Data &data) |
finline _Data | operator| (_Data &data) |
finline _Data | operator^ (_Data &data) |
Static Public Attributes | |
static const size_t | word_width = sizeof(T) * 8 |
static const Data | UNSPECIFIED |
Protected Types | |
typedef DataTpl< T, DataModel > | _Data |
Protected Attributes | |
DataModel | model |
Classes | |
class | DataManipulator |
Two versions of binaries are supported: static, non-resizeable binaries and dynamic, resizeable ones. Please note, this class does not manage memory, reference counting etc. you have to take care about memory management yourself! However you can use the release()
to delete the underlaying array.
Definition at line 75 of file Data.hpp.
finline T* DataTpl< T, DataModel >::getBuffer | ( | ) | const [inline] |
Returns the internal buffer of the data.
Definition at line 176 of file Data.hpp.
Referenced by DataStreamTpl< __mode, __variant, T >::add(), DataStreamTpl< __mode, __variant, T >::getRemainingData(), DataStreamTpl< __mode, __variant, T >::remove(), ariba::communication::AribaOmnetModule::sendMessage(), and ariba::communication::AribaOmnetModule::socketDataArrived().
finline size_t DataTpl< T, DataModel >::getLength | ( | ) | const [inline] |
Returns the length of the data in bits
Definition at line 183 of file Data.hpp.
Referenced by DataStreamTpl< __mode, __variant, T >::getRemainingLength(), and ariba::communication::AribaOmnetModule::sendMessage().
void DataTpl< T, DataModel >::setLength | ( | size_t | new_length | ) | [inline] |
Sets the length of the data in bits
Definition at line 189 of file Data.hpp.
Referenced by DataStreamTpl< __mode, __variant, T >::getData().
finline void DataTpl< T, DataModel >::ensureLength | ( | size_t | neededLength | ) | [inline] |
Ensures that the buffer pointer has the given number of bits of memory reserved.
neededLength | The minimum data length required. |
Definition at line 199 of file Data.hpp.
Referenced by DataStreamTpl< __mode, __variant, T >::ensureLength().
finline DataManipulator DataTpl< T, DataModel >::operator[] | ( | size_t | index | ) | [inline] |
finline const DataManipulator DataTpl< T, DataModel >::operator[] | ( | size_t | index | ) | const [inline] |
_Data DataTpl< T, DataModel >::clone | ( | size_t | index, | |
size_t | length | |||
) | const [inline] |
Returns a copy of the specified bit range.
index | The first bit to copy | |
length | The length of the bit range |
Definition at line 235 of file Data.hpp.
Referenced by Message::Message().
Returns a copy of the data.
Definition at line 245 of file Data.hpp.
Referenced by DataTpl< T >::operator &(), DataTpl< T >::operator^(), and DataTpl< T >::operator|().
finline bool DataTpl< T, DataModel >::isEmpty | ( | ) | const [inline] |
finline bool DataTpl< T, DataModel >::isUnspecified | ( | ) | const [inline] |
Returns true, if the data buffer is unspecified. In this case no memory is associated with this data object.
Definition at line 265 of file Data.hpp.
Referenced by Message::decapsulate(), Message::encapsulate(), and Message::PayloadSerializer::sznMethodBegin().
finline void DataTpl< T, DataModel >::release | ( | ) | [inline] |
This method frees the memory associated with this data object and sets this object into an unspecified state.
Definition at line 274 of file Data.hpp.
Referenced by DataStreamTpl< __mode, __variant, T >::add(), Message::dropPayload(), and ariba::communication::AribaOmnetModule::sendMessage().
Definition at line 78 of file Data.hpp.
Referenced by DataTpl< T >::clone(), DataTpl< T >::DataTpl(), DataTpl< T >::ensureLength(), DataTpl< T >::getBuffer(), DataTpl< T >::getLength(), DataTpl< T >::isEmpty(), DataTpl< T >::isUnspecified(), DataTpl< T >::operator=(), DataTpl< T >::operator==(), DataTpl< T >::operator[](), DataTpl< T >::release(), DataTpl< T >::setLength(), and DataTpl< T >::sub().
const size_t DataTpl< T, DataModel >::word_width = sizeof(T) * 8 [static] |
Definition at line 81 of file Data.hpp.
Referenced by DataStreamTpl< __mode, __variant, T >::getRemainingData().
const Data DataTpl< T, DataModel >::UNSPECIFIED [inline, static] |