freesecs::secstwo::binary_deserializer_t Class Reference

Data item deserialiser from SEMI E5 format Deserialises a (one) given data item from SEMI E5 to FREESECS representation from given binary data array (memory pool). Deserialization is done recursively for list data items. More...

#include <secstwo_serialize.h>

List of all members.

Public Types

typedef uint8_t data_t
 Binary data type define.

Public Member Functions

 binary_deserializer_t (data_t *begin, data_t *end)
 Binary deserializer ctor Ctor throws an empty exception if deserialization goes wrong. Data passed to the ctor must remain valid until the type cast operator is called and thus actual deserialization is done.
pdata_item_t operator() (data_t **next_item)
 Deserialization operator. Deserializes exactly one item from the data array. If there's more items to deserialize and.


Detailed Description

Data item deserialiser from SEMI E5 format Deserialises a (one) given data item from SEMI E5 to FREESECS representation from given binary data array (memory pool). Deserialization is done recursively for list data items.

See also:
data_item_t

Definition at line 43 of file secstwo_serialize.h.


Constructor & Destructor Documentation

binary_deserializer_t::binary_deserializer_t ( data_t begin,
data_t end 
)

Binary deserializer ctor Ctor throws an empty exception if deserialization goes wrong. Data passed to the ctor must remain valid until the type cast operator is called and thus actual deserialization is done.

See also:
operator()
Parameters:
begin Start address of binary data
end The byte after the last data byte

Definition at line 86 of file secstwo_serialize.cpp.


Member Function Documentation

pdata_item_t binary_deserializer_t::operator() ( data_t **  next_item  ) 

Deserialization operator. Deserializes exactly one item from the data array. If there's more items to deserialize and.

See also:
next_item is not NULL, it is filled with the ptr to the start of the next item, so one could continue deserialization by creating a new deserializer instance by providing (next, end) arguments to it's ctor:
while(next && next < end) { binary_deserializer bs(next, end); pdata_tem_t pitem = bs(&next); }

Returns:
Pointer to deserialised value Empty pointer (ptr.get() == NULL) if failed to deserialize data.
Return values:
Non-empty pointer (pter.get() != NULL) if deserialization went OK.
Parameters:
next_item Ptr to the start byte of the next data item in binary data array.

Definition at line 163 of file secstwo_serialize.cpp.

References freesecs::secstwo::list_item_t::_data.


The documentation for this class was generated from the following files:

Generated on Sun Jun 20 08:10:08 2010 for FREESECS secstwo by  doxygen 1.5.6