#include <source/ariba/utility/serialization/DataStream.hpp>
Public Member Functions | |
finline | DataStreamTpl () |
finline | DataStreamTpl (Data &binary) |
finline | DataStreamTpl (_DataStream &stream) |
finline Mode | getMode () const |
finline bool | isMeasure () |
finline bool | isSerializer () |
finline bool | isDeserializer () |
finline int | getVariant () const |
finline size_t | getRemainingLength () const |
finline Data | getRemainingData (size_t length) |
finline size_t | getCurrentLength () const |
finline void | reset (Mode mode=UNDEFINED) |
finline size_t | mark () const |
finline void | seek (size_t idx) |
finline void | ensureLength (size_t size) |
finline Data | getData () |
template<typename X> | |
finline _DataStream & | operator && (X &obj) |
template<typename X> | |
finline _DataStream & | operator && (const X &obj) |
template<typename X> | |
finline _DataStream & | operator && (X *obj) |
template<typename X> | |
finline _DataStream & | operator && (const X *obj) |
Private Types | |
typedef DataStreamTpl< __mode, __variant, T > | _DataStream |
Private Member Functions | |
template<class X> | |
finline void | add (const X &ser, if_is_base_of(ExplicitSerializer, X)) |
template<class X> | |
finline void | remove (const X &ser, if_is_base_of(ExplicitSerializer, X)) |
template<class X> | |
finline void | add (X &obj, if_is_base_of(Serializeable, X)) |
template<class X> | |
finline void | add (const X &obj, if_is_base_of(Serializeable, X)) |
template<class X> | |
finline void | remove (X &obj, if_is_base_of(Serializeable, X)) |
template<typename X> | |
finline void | add (X &obj, if_uint(X)) |
template<typename X> | |
finline void | remove (X &obj, if_uint(X)) |
template<typename X> | |
finline void | add (X &sobj, if_int(X)) |
template<typename X> | |
finline void | remove (X &sobj, if_int(X)) |
finline void | add (bool &obj) |
finline void | remove (bool &obj) |
finline void | add (const VSerializeable *obj) |
finline void | remove (VSerializeable *obj) |
finline void | remove (const VSerializeable *obj) |
Private Attributes | |
size_t | index |
DataTpl< T > | bits |
Friends | |
class | SERIALIZATION_NS_INT::ITpl |
class | SERIALIZATION_NS_INT::cI |
class | SERIALIZATION_NS_INT::T |
class | SERIALIZATION_NS_INT::cT |
template<Mode _a, int _b, typename _c> | |
std::ostream & | operator<< (std::ostream &, DataStreamTpl< _a, _b, _c > &) |
Definition at line 102 of file DataStream.hpp.
typedef DataStreamTpl<__mode, __variant, T> DataStreamTpl< __mode, __variant, T >::_DataStream [private] |
Definition at line 211 of file DataStream.hpp.
finline DataStreamTpl< __mode, __variant, T >::DataStreamTpl | ( | ) | [inline] |
Definition at line 215 of file DataStream.hpp.
finline DataStreamTpl< __mode, __variant, T >::DataStreamTpl | ( | Data & | binary | ) | [inline] |
Definition at line 219 of file DataStream.hpp.
finline DataStreamTpl< __mode, __variant, T >::DataStreamTpl | ( | _DataStream & | stream | ) | [inline] |
Definition at line 223 of file DataStream.hpp.
finline void DataStreamTpl< __mode, __variant, T >::add | ( | const X & | ser, | |
if_is_base_of(ExplicitSerializer, X) | ||||
) | [inline, private] |
Definition at line 122 of file DataStream.hpp.
finline void DataStreamTpl< __mode, __variant, T >::remove | ( | const X & | ser, | |
if_is_base_of(ExplicitSerializer, X) | ||||
) | [inline, private] |
Definition at line 127 of file DataStream.hpp.
finline void DataStreamTpl< __mode, __variant, T >::add | ( | X & | obj, | |
if_is_base_of(Serializeable, X) | ||||
) | [inline, private] |
finline void DataStreamTpl< __mode, __variant, T >::add | ( | const X & | obj, | |
if_is_base_of(Serializeable, X) | ||||
) | [inline, private] |
Definition at line 138 of file DataStream.hpp.
finline void DataStreamTpl< __mode, __variant, T >::remove | ( | X & | obj, | |
if_is_base_of(Serializeable, X) | ||||
) | [inline, private] |
finline void DataStreamTpl< __mode, __variant, T >::add | ( | X & | obj, | |
if_uint(X) | ||||
) | [inline, private] |
Definition at line 149 of file DataStream.hpp.
References bitcpy(), and DataTpl< T, DataModel >::getBuffer().
finline void DataStreamTpl< __mode, __variant, T >::remove | ( | X & | obj, | |
if_uint(X) | ||||
) | [inline, private] |
Definition at line 156 of file DataStream.hpp.
finline void DataStreamTpl< __mode, __variant, T >::add | ( | X & | sobj, | |
if_int(X) | ||||
) | [inline, private] |
Definition at line 163 of file DataStream.hpp.
References bitcpy(), and DataTpl< T, DataModel >::getBuffer().
finline void DataStreamTpl< __mode, __variant, T >::remove | ( | X & | sobj, | |
if_int(X) | ||||
) | [inline, private] |
Definition at line 172 of file DataStream.hpp.
finline void DataStreamTpl< __mode, __variant, T >::add | ( | bool & | obj | ) | [inline, private] |
Definition at line 180 of file DataStream.hpp.
finline void DataStreamTpl< __mode, __variant, T >::remove | ( | bool & | obj | ) | [inline, private] |
Definition at line 185 of file DataStream.hpp.
finline void DataStreamTpl< __mode, __variant, T >::add | ( | const VSerializeable * | obj | ) | [inline, private] |
Definition at line 191 of file DataStream.hpp.
References data_length(), data_serialize(), and DataTpl< T, DataModel >::release().
finline void DataStreamTpl< __mode, __variant, T >::remove | ( | VSerializeable * | obj | ) | [inline, private] |
finline void DataStreamTpl< __mode, __variant, T >::remove | ( | const VSerializeable * | obj | ) | [inline, private] |
Definition at line 206 of file DataStream.hpp.
finline Mode DataStreamTpl< __mode, __variant, T >::getMode | ( | ) | const [inline] |
Returns the current mode of the data stream
Definition at line 232 of file DataStream.hpp.
finline bool DataStreamTpl< __mode, __variant, T >::isMeasure | ( | ) | [inline] |
Returns true, if this is a measure of data length
Definition at line 241 of file DataStream.hpp.
References MEASURE.
finline bool DataStreamTpl< __mode, __variant, T >::isSerializer | ( | ) | [inline] |
finline bool DataStreamTpl< __mode, __variant, T >::isDeserializer | ( | ) | [inline] |
finline int DataStreamTpl< __mode, __variant, T >::getVariant | ( | ) | const [inline] |
Returns the variants that are used.
Definition at line 258 of file DataStream.hpp.
finline size_t DataStreamTpl< __mode, __variant, T >::getRemainingLength | ( | ) | const [inline] |
Returns the remaining length. This method is only applicable in deserialize mode.
Definition at line 268 of file DataStream.hpp.
References DataTpl< T, DataModel >::getLength().
finline Data DataStreamTpl< __mode, __variant, T >::getRemainingData | ( | size_t | length | ) | [inline] |
Returns the remaining data in the data buffer. This method is only applicable in deserialize mode.
Definition at line 278 of file DataStream.hpp.
References DataTpl< T, DataModel >::getBuffer(), and DataTpl< T, DataModel >::word_width.
finline size_t DataStreamTpl< __mode, __variant, T >::getCurrentLength | ( | ) | const [inline] |
Returns the current length of the stream. This method is only applicable in serialize mode.
Definition at line 290 of file DataStream.hpp.
finline void DataStreamTpl< __mode, __variant, T >::reset | ( | Mode | mode = UNDEFINED |
) | [inline] |
Resets the index of the stream
Definition at line 297 of file DataStream.hpp.
finline size_t DataStreamTpl< __mode, __variant, T >::mark | ( | ) | const [inline] |
Returns a mark of the current position in the stream
Definition at line 305 of file DataStream.hpp.
finline void DataStreamTpl< __mode, __variant, T >::seek | ( | size_t | idx | ) | [inline] |
Seeks to the given position
Definition at line 312 of file DataStream.hpp.
finline void DataStreamTpl< __mode, __variant, T >::ensureLength | ( | size_t | size | ) | [inline] |
Assures that the given length is available in the buffer.
Definition at line 320 of file DataStream.hpp.
References DataTpl< T, DataModel >::ensureLength().
Referenced by data_serialization_v().
finline Data DataStreamTpl< __mode, __variant, T >::getData | ( | ) | [inline] |
Returns a binary object, of the current stream content
Definition at line 327 of file DataStream.hpp.
References DataTpl< T, DataModel >::setLength().
finline _DataStream& DataStreamTpl< __mode, __variant, T >::operator && | ( | X & | obj | ) | [inline] |
deserialises or serializes an object depending on the bit-streams mode
Definition at line 336 of file DataStream.hpp.
finline _DataStream& DataStreamTpl< __mode, __variant, T >::operator && | ( | const X & | obj | ) | [inline] |
Definition at line 342 of file DataStream.hpp.
finline _DataStream& DataStreamTpl< __mode, __variant, T >::operator && | ( | X * | obj | ) | [inline] |
Definition at line 348 of file DataStream.hpp.
finline _DataStream& DataStreamTpl< __mode, __variant, T >::operator && | ( | const X * | obj | ) | [inline] |
Definition at line 354 of file DataStream.hpp.
friend class SERIALIZATION_NS_INT::ITpl [friend] |
Definition at line 105 of file DataStream.hpp.
friend class SERIALIZATION_NS_INT::cI [friend] |
Definition at line 106 of file DataStream.hpp.
friend class SERIALIZATION_NS_INT::T [friend] |
Definition at line 107 of file DataStream.hpp.
friend class SERIALIZATION_NS_INT::cT [friend] |
Definition at line 108 of file DataStream.hpp.
std::ostream& operator<< | ( | std::ostream & | stream, | |
DataStreamTpl< _a, _b, _c > & | binaryStream | |||
) | [friend] |
Definition at line 363 of file DataStream.hpp.
size_t DataStreamTpl< __mode, __variant, T >::index [private] |
Definition at line 115 of file DataStream.hpp.
DataTpl<T> DataStreamTpl< __mode, __variant, T >::bits [private] |