OpenDaVINCI  4.16.0
odcore::serialization::QueryableNetstringsDeserializerABCF Class Reference

#include <QueryableNetstringsDeserializerABCF.h>

Inheritance diagram for odcore::serialization::QueryableNetstringsDeserializerABCF:
Inheritance graph

Public Member Functions

 QueryableNetstringsDeserializerABCF ()
 
virtual ~QueryableNetstringsDeserializerABCF ()
 
virtual void deserializeDataFrom (istream &in)
 
virtual uint32_t readValue (istream &i, Serializable &v)
 
virtual uint32_t readValue (istream &i, bool &v)
 
virtual uint32_t readValue (istream &i, char &v)
 
virtual uint32_t readValue (istream &i, unsigned char &v)
 
virtual uint32_t readValue (istream &i, int8_t &v)
 
virtual uint32_t readValue (istream &i, int16_t &v)
 
virtual uint32_t readValue (istream &i, uint16_t &v)
 
virtual uint32_t readValue (istream &i, int32_t &v)
 
virtual uint32_t readValue (istream &i, uint32_t &v)
 
virtual uint32_t readValue (istream &i, int64_t &v)
 
virtual uint32_t readValue (istream &i, uint64_t &v)
 
virtual uint32_t readValue (istream &i, float &v)
 
virtual uint32_t readValue (istream &i, double &v)
 
virtual uint32_t readValue (istream &i, string &v)
 
virtual uint32_t readValue (istream &i, void *data, const uint32_t &size)
 
virtual void read (const uint32_t &id, Serializable &s)
 
virtual void read (const uint32_t &id, bool &b)
 
virtual void read (const uint32_t &id, char &c)
 
virtual void read (const uint32_t &id, unsigned char &uc)
 
virtual void read (const uint32_t &id, int8_t &i)
 
virtual void read (const uint32_t &id, int16_t &i)
 
virtual void read (const uint32_t &id, uint16_t &ui)
 
virtual void read (const uint32_t &id, int32_t &i)
 
virtual void read (const uint32_t &id, uint32_t &ui)
 
virtual void read (const uint32_t &id, int64_t &i)
 
virtual void read (const uint32_t &id, uint64_t &ui)
 
virtual void read (const uint32_t &id, float &f)
 
virtual void read (const uint32_t &id, double &d)
 
virtual void read (const uint32_t &id, string &s)
 
virtual void read (const uint32_t &id, void *data, const uint32_t &size)
 
virtual void read (const uint32_t &id, const string &longName, const string &shortName, Serializable &s)
 
virtual void read (const uint32_t &id, const string &longName, const string &shortName, bool &b)
 
virtual void read (const uint32_t &id, const string &longName, const string &shortName, char &c)
 
virtual void read (const uint32_t &id, const string &longName, const string &shortName, unsigned char &uc)
 
virtual void read (const uint32_t &id, const string &longName, const string &shortName, int8_t &i)
 
virtual void read (const uint32_t &id, const string &longName, const string &shortName, int16_t &i)
 
virtual void read (const uint32_t &id, const string &longName, const string &shortName, uint16_t &ui)
 
virtual void read (const uint32_t &id, const string &longName, const string &shortName, int32_t &i)
 
virtual void read (const uint32_t &id, const string &longName, const string &shortName, uint32_t &ui)
 
virtual void read (const uint32_t &id, const string &longName, const string &shortName, int64_t &i)
 
virtual void read (const uint32_t &id, const string &longName, const string &shortName, uint64_t &ui)
 
virtual void read (const uint32_t &id, const string &longName, const string &shortName, float &f)
 
virtual void read (const uint32_t &id, const string &longName, const string &shortName, double &d)
 
virtual void read (const uint32_t &id, const string &longName, const string &shortName, string &s)
 
virtual void read (const uint32_t &id, const string &longName, const string &shortName, void *data, const uint32_t &size)
 

Static Public Member Functions

static uint32_t fillBuffer (istream &in, stringstream &buffer)
 
static float ntohf (float f)
 
static double ntohd (double d)
 
static uint64_t __ntohll (uint64_t ui)
 
static int64_t __ntohll (int64_t i)
 

Friends

class QueryableNetstringsDeserializer
 

Detailed Description

This class implements the interface Deserializer for queryable Netstrings. The original version (found at: http://cr.yp.to/proto/netstrings.txt ) has been modified:

'0xAB' '0xCF' 'binary length encoded as varint' 'PAYLOAD' ','

Serializable

Constructor & Destructor Documentation

odcore::serialization::QueryableNetstringsDeserializerABCF::QueryableNetstringsDeserializerABCF ( )

Default constructor. When a QueryableNetstringsDeserializerABCF is created using this constructor, the method setSerializedData(istream &in) needs to be called before any read(...) method will return meaningful data.

odcore::serialization::QueryableNetstringsDeserializerABCF::~QueryableNetstringsDeserializerABCF ( )
virtual

Member Function Documentation

uint64_t odcore::serialization::Deserializer::__ntohll ( uint64_t  ui)
staticinherited

This method converts a uint64_t from network byte order to host byte order.

Parameters
uiuint64_t to be converted.
Returns
ui in HBO.

References odcore::wrapper::IS_BIG_ENDIAN.

Referenced by odcore::serialization::LCMDeserializerVisitor::deserializeDataFrom(), and odcore::serialization::QueryableNetstringsDeserializerAACF::readValue().

int64_t odcore::serialization::Deserializer::__ntohll ( int64_t  i)
staticinherited

This method converts an int64_t from network byte order to host byte order.

Parameters
iint64_t to be converted.
Returns
i in HBO.

References odcore::wrapper::IS_BIG_ENDIAN.

void odcore::serialization::QueryableNetstringsDeserializerABCF::deserializeDataFrom ( istream &  in)
virtual

The method sets the istream from which the data shall be deserialized. Any existing deserialized data will be reset.

Parameters
inInput stream containing the data.

Implements odcore::serialization::Deserializer.

References CLOG2.

uint32_t odcore::serialization::QueryableNetstringsDeserializerABCF::fillBuffer ( istream &  in,
stringstream &  buffer 
)
static

This method copies the minimum amount of bytes that are required to successfully decode using this decoder.

Parameters
inInput stream used for reading from.
bufferBuffer to copy bytes to.
Returns
size Number of bytes read.
double odcore::serialization::Deserializer::ntohd ( double  d)
staticinherited

This method converts a double from network byte order to host byte order.

Parameters
ddouble to be converted.
Returns
d in HBO.

References odcore::wrapper::IS_BIG_ENDIAN.

Referenced by odcore::serialization::QueryableNetstringsDeserializerAACF::readValue(), and readValue().

float odcore::serialization::Deserializer::ntohf ( float  f)
staticinherited

This method converts a float from network byte order to host byte order.

Parameters
ffloat to be converted.
Returns
f in HBO.

References odcore::wrapper::IS_BIG_ENDIAN.

Referenced by odcore::serialization::QueryableNetstringsDeserializerAACF::readValue(), and readValue().

void odcore::serialization::QueryableNetstringsDeserializerABCF::read ( const uint32_t &  id,
Serializable s 
)
virtual

This method deserializes a Serializable.

Parameters
idIdentifier for the s to be deserialized.
sSerializable to be deserialized.

Implements odcore::serialization::Deserializer.

Referenced by read().

void odcore::serialization::QueryableNetstringsDeserializerABCF::read ( const uint32_t &  id,
bool &  b 
)
virtual

This method deserializes a bool.

Parameters
idIdentifier for the b to be deserialized.
bBool to be deserialized.

Implements odcore::serialization::Deserializer.

References read().

void odcore::serialization::QueryableNetstringsDeserializerABCF::read ( const uint32_t &  id,
char &  c 
)
virtual

This method deserializes a char.

Parameters
idIdentifier for the c to be deserialized.
cChar to be deserialized.

Implements odcore::serialization::Deserializer.

References read().

void odcore::serialization::QueryableNetstringsDeserializerABCF::read ( const uint32_t &  id,
unsigned char &  uc 
)
virtual

This method deserializes an unsigned char.

Parameters
idIdentifier for the uc to be deserialized.
ucUnsigned char to be deserialized.

Implements odcore::serialization::Deserializer.

References read().

void odcore::serialization::QueryableNetstringsDeserializerABCF::read ( const uint32_t &  id,
int8_t &  i 
)
virtual

This method deserializes an int.

Parameters
idIdentifier for the i to be deserialized.
iInt to be deserialized.

Implements odcore::serialization::Deserializer.

References read().

void odcore::serialization::QueryableNetstringsDeserializerABCF::read ( const uint32_t &  id,
int16_t &  i 
)
virtual

This method deserializes an int.

Parameters
idIdentifier for the i to be deserialized.
iInt to be deserialized.

Implements odcore::serialization::Deserializer.

References read().

void odcore::serialization::QueryableNetstringsDeserializerABCF::read ( const uint32_t &  id,
uint16_t &  ui 
)
virtual

This method deserializes an uint32_t.

Parameters
idIdentifier for the ui to be deserialized.
uiUnsigned int32_t to be deserialized.

Implements odcore::serialization::Deserializer.

References read().

void odcore::serialization::QueryableNetstringsDeserializerABCF::read ( const uint32_t &  id,
int32_t &  i 
)
virtual

This method deserializes an int.

Parameters
idIdentifier for the i to be deserialized.
iInt to be deserialized.

Implements odcore::serialization::Deserializer.

References read().

void odcore::serialization::QueryableNetstringsDeserializerABCF::read ( const uint32_t &  id,
uint32_t &  ui 
)
virtual

This method deserializes an uint32_t.

Parameters
idIdentifier for the ui to be deserialized.
uiUnsigned int32_t to be deserialized.

Implements odcore::serialization::Deserializer.

References read().

void odcore::serialization::QueryableNetstringsDeserializerABCF::read ( const uint32_t &  id,
int64_t &  i 
)
virtual

This method deserializes an int.

Parameters
idIdentifier for the i to be deserialized.
iInt to be deserialized.

Implements odcore::serialization::Deserializer.

References read().

void odcore::serialization::QueryableNetstringsDeserializerABCF::read ( const uint32_t &  id,
uint64_t &  ui 
)
virtual

This method deserializes an uint32_t.

Parameters
idIdentifier for the ui to be deserialized.
uiUnsigned int32_t to be deserialized.

Implements odcore::serialization::Deserializer.

References read().

void odcore::serialization::QueryableNetstringsDeserializerABCF::read ( const uint32_t &  id,
float &  f 
)
virtual

This method deserializes a float.

Parameters
idIdentifier for the f to be deserialized.
fFloat to be deserialized.

Implements odcore::serialization::Deserializer.

References read().

void odcore::serialization::QueryableNetstringsDeserializerABCF::read ( const uint32_t &  id,
double &  d 
)
virtual

This method deserializes a double.

Parameters
idIdentifier for the d to be deserialized.
dDouble to be deserialized.

Implements odcore::serialization::Deserializer.

References read().

void odcore::serialization::QueryableNetstringsDeserializerABCF::read ( const uint32_t &  id,
string &  s 
)
virtual

This method deserializes a string.

Parameters
idIdentifier for the s to be deserialized.
sString to be deserialized.

Implements odcore::serialization::Deserializer.

References read().

void odcore::serialization::QueryableNetstringsDeserializerABCF::read ( const uint32_t &  id,
void *  data,
const uint32_t &  size 
)
virtual

This method deserializes undefined data of length size.

Parameters
idIdentifier for the data to be deserialized.
dataData to be deserialized.
sizeLength of the data to be deserialized.

Implements odcore::serialization::Deserializer.

References read().

void odcore::serialization::QueryableNetstringsDeserializerABCF::read ( const uint32_t &  id,
const string &  longName,
const string &  shortName,
Serializable s 
)
virtual

This method deserializes a Serializable.

Parameters
idIdentifier for the value to be deserialized.
longNameLong string name of the field.
shortNameShort string name of the field.
sSerializable to be deserialized.

Implements odcore::serialization::Deserializer.

References readValue().

void odcore::serialization::QueryableNetstringsDeserializerABCF::read ( const uint32_t &  id,
const string &  longName,
const string &  shortName,
bool &  b 
)
virtual

This method deserializes a bool.

Parameters
idIdentifier for the value to be deserialized.
longNameLong string name of the field.
shortNameShort string name of the field.
bBool to be deserialized.

Implements odcore::serialization::Deserializer.

References readValue().

void odcore::serialization::QueryableNetstringsDeserializerABCF::read ( const uint32_t &  id,
const string &  longName,
const string &  shortName,
char &  c 
)
virtual

This method deserializes a char.

Parameters
idIdentifier for the value to be deserialized.
longNameLong string name of the field.
shortNameShort string name of the field.
cChar to be deserialized.

Implements odcore::serialization::Deserializer.

References readValue().

void odcore::serialization::QueryableNetstringsDeserializerABCF::read ( const uint32_t &  id,
const string &  longName,
const string &  shortName,
unsigned char &  uc 
)
virtual

This method deserializes an unsigned char.

Parameters
idIdentifier for the value to be deserialized.
longNameLong string name of the field.
shortNameShort string name of the field.
ucUnsigned char to be deserialized.

Implements odcore::serialization::Deserializer.

References readValue().

void odcore::serialization::QueryableNetstringsDeserializerABCF::read ( const uint32_t &  id,
const string &  longName,
const string &  shortName,
int8_t &  i 
)
virtual

This method deserializes an int.

Parameters
idIdentifier for the value to be deserialized.
longNameLong string name of the field.
shortNameShort string name of the field.
iInt to be deserialized.

Implements odcore::serialization::Deserializer.

References readValue().

void odcore::serialization::QueryableNetstringsDeserializerABCF::read ( const uint32_t &  id,
const string &  longName,
const string &  shortName,
int16_t &  i 
)
virtual

This method deserializes an int.

Parameters
idIdentifier for the value to be deserialized.
longNameLong string name of the field.
shortNameShort string name of the field.
iInt to be deserialized.

Implements odcore::serialization::Deserializer.

References readValue().

void odcore::serialization::QueryableNetstringsDeserializerABCF::read ( const uint32_t &  id,
const string &  longName,
const string &  shortName,
uint16_t &  ui 
)
virtual

This method deserializes an uint32_t.

Parameters
idIdentifier for the value to be deserialized.
longNameLong string name of the field.
shortNameShort string name of the field.
uiUnsigned int32_t to be deserialized.

Implements odcore::serialization::Deserializer.

References readValue().

void odcore::serialization::QueryableNetstringsDeserializerABCF::read ( const uint32_t &  id,
const string &  longName,
const string &  shortName,
int32_t &  i 
)
virtual

This method deserializes an int.

Parameters
idIdentifier for the value to be deserialized.
longNameLong string name of the field.
shortNameShort string name of the field.
iInt to be deserialized.

Implements odcore::serialization::Deserializer.

References readValue().

void odcore::serialization::QueryableNetstringsDeserializerABCF::read ( const uint32_t &  id,
const string &  longName,
const string &  shortName,
uint32_t &  ui 
)
virtual

This method deserializes an uint32_t.

Parameters
idIdentifier for the value to be deserialized.
longNameLong string name of the field.
shortNameShort string name of the field.
uiUnsigned int32_t to be deserialized.

Implements odcore::serialization::Deserializer.

References readValue().

void odcore::serialization::QueryableNetstringsDeserializerABCF::read ( const uint32_t &  id,
const string &  longName,
const string &  shortName,
int64_t &  i 
)
virtual

This method deserializes an int.

Parameters
idIdentifier for the value to be deserialized.
longNameLong string name of the field.
shortNameShort string name of the field.
iInt to be deserialized.

Implements odcore::serialization::Deserializer.

References readValue().

void odcore::serialization::QueryableNetstringsDeserializerABCF::read ( const uint32_t &  id,
const string &  longName,
const string &  shortName,
uint64_t &  ui 
)
virtual

This method deserializes an uint32_t.

Parameters
idIdentifier for the value to be deserialized.
longNameLong string name of the field.
shortNameShort string name of the field.
uiUnsigned int32_t to be deserialized.

Implements odcore::serialization::Deserializer.

References readValue().

void odcore::serialization::QueryableNetstringsDeserializerABCF::read ( const uint32_t &  id,
const string &  longName,
const string &  shortName,
float &  f 
)
virtual

This method deserializes a float.

Parameters
idIdentifier for the value to be deserialized.
longNameLong string name of the field.
shortNameShort string name of the field.
fFloat to be deserialized.

Implements odcore::serialization::Deserializer.

References readValue().

void odcore::serialization::QueryableNetstringsDeserializerABCF::read ( const uint32_t &  id,
const string &  longName,
const string &  shortName,
double &  d 
)
virtual

This method deserializes a double.

Parameters
idIdentifier for the value to be deserialized.
longNameLong string name of the field.
shortNameShort string name of the field.
dDouble to be deserialized.

Implements odcore::serialization::Deserializer.

References readValue().

void odcore::serialization::QueryableNetstringsDeserializerABCF::read ( const uint32_t &  id,
const string &  longName,
const string &  shortName,
string &  s 
)
virtual

This method deserializes a string.

Parameters
idIdentifier for the value to be deserialized.
longNameLong string name of the field.
shortNameShort string name of the field.
sString to be deserialized.

Implements odcore::serialization::Deserializer.

References readValue().

void odcore::serialization::QueryableNetstringsDeserializerABCF::read ( const uint32_t &  id,
const string &  longName,
const string &  shortName,
void *  data,
const uint32_t &  size 
)
virtual

This method deserializes undefined data of length size.

Parameters
idIdentifier for the value to be deserialized.
longNameLong string name of the field.
shortNameShort string name of the field.
dataData to be deserialized.
sizeLength of the data to be deserialized.

Implements odcore::serialization::Deserializer.

References readValue().

uint32_t odcore::serialization::QueryableNetstringsDeserializerABCF::readValue ( istream &  i,
Serializable v 
)
virtual

This method deserializes the raw value from the stream.

Parameters
iStream to be used for deserializing the value.
vValue to be deserialized.
Returns
Number of bytes read during the deserialization.

Implements odcore::serialization::Deserializer.

Referenced by read().

uint32_t odcore::serialization::QueryableNetstringsDeserializerABCF::readValue ( istream &  i,
bool &  v 
)
virtual

This method deserializes the raw value from the stream.

Parameters
iStream to be used for deserializing the value.
vValue to be deserialized.
Returns
Number of bytes read during the deserialization.

Implements odcore::serialization::Deserializer.

uint32_t odcore::serialization::QueryableNetstringsDeserializerABCF::readValue ( istream &  i,
char &  v 
)
virtual

This method deserializes the raw value from the stream.

Parameters
iStream to be used for deserializing the value.
vValue to be deserialized.
Returns
Number of bytes read during the deserialization.

Implements odcore::serialization::Deserializer.

uint32_t odcore::serialization::QueryableNetstringsDeserializerABCF::readValue ( istream &  i,
unsigned char &  v 
)
virtual

This method deserializes the raw value from the stream.

Parameters
iStream to be used for deserializing the value.
vValue to be deserialized.
Returns
Number of bytes read during the deserialization.

Implements odcore::serialization::Deserializer.

uint32_t odcore::serialization::QueryableNetstringsDeserializerABCF::readValue ( istream &  i,
int8_t &  v 
)
virtual

This method deserializes the raw value from the stream.

Parameters
iStream to be used for deserializing the value.
vValue to be deserialized.
Returns
Number of bytes read during the deserialization.

Implements odcore::serialization::Deserializer.

uint32_t odcore::serialization::QueryableNetstringsDeserializerABCF::readValue ( istream &  i,
int16_t &  v 
)
virtual

This method deserializes the raw value from the stream.

Parameters
iStream to be used for deserializing the value.
vValue to be deserialized.
Returns
Number of bytes read during the deserialization.

Implements odcore::serialization::Deserializer.

uint32_t odcore::serialization::QueryableNetstringsDeserializerABCF::readValue ( istream &  i,
uint16_t &  v 
)
virtual

This method deserializes the raw value from the stream.

Parameters
iStream to be used for deserializing the value.
vValue to be deserialized.
Returns
Number of bytes read during the deserialization.

Implements odcore::serialization::Deserializer.

uint32_t odcore::serialization::QueryableNetstringsDeserializerABCF::readValue ( istream &  i,
int32_t &  v 
)
virtual

This method deserializes the raw value from the stream.

Parameters
iStream to be used for deserializing the value.
vValue to be deserialized.
Returns
Number of bytes read during the deserialization.

Implements odcore::serialization::Deserializer.

uint32_t odcore::serialization::QueryableNetstringsDeserializerABCF::readValue ( istream &  i,
uint32_t &  v 
)
virtual

This method deserializes the raw value from the stream.

Parameters
iStream to be used for deserializing the value.
vValue to be deserialized.
Returns
Number of bytes read during the deserialization.

Implements odcore::serialization::Deserializer.

uint32_t odcore::serialization::QueryableNetstringsDeserializerABCF::readValue ( istream &  i,
int64_t &  v 
)
virtual

This method deserializes the raw value from the stream.

Parameters
iStream to be used for deserializing the value.
vValue to be deserialized.
Returns
Number of bytes read during the deserialization.

Implements odcore::serialization::Deserializer.

uint32_t odcore::serialization::QueryableNetstringsDeserializerABCF::readValue ( istream &  i,
uint64_t &  v 
)
virtual

This method deserializes the raw value from the stream.

Parameters
iStream to be used for deserializing the value.
vValue to be deserialized.
Returns
Number of bytes read during the deserialization.

Implements odcore::serialization::Deserializer.

uint32_t odcore::serialization::QueryableNetstringsDeserializerABCF::readValue ( istream &  i,
float &  v 
)
virtual

This method deserializes the raw value from the stream.

Parameters
iStream to be used for deserializing the value.
vValue to be deserialized.
Returns
Number of bytes read during the deserialization.

Implements odcore::serialization::Deserializer.

References odcore::serialization::Deserializer::ntohf().

uint32_t odcore::serialization::QueryableNetstringsDeserializerABCF::readValue ( istream &  i,
double &  v 
)
virtual

This method deserializes the raw value from the stream.

Parameters
iStream to be used for deserializing the value.
vValue to be deserialized.
Returns
Number of bytes read during the deserialization.

Implements odcore::serialization::Deserializer.

References odcore::serialization::Deserializer::ntohd().

uint32_t odcore::serialization::QueryableNetstringsDeserializerABCF::readValue ( istream &  i,
string &  v 
)
virtual

This method deserializes the raw value from the stream.

Parameters
iStream to be used for deserializing the value.
vValue to be deserialized.
Returns
Number of bytes read during the deserialization.

Implements odcore::serialization::Deserializer.

References OPENDAVINCI_CORE_DELETE_ARRAY.

uint32_t odcore::serialization::QueryableNetstringsDeserializerABCF::readValue ( istream &  i,
void *  data,
const uint32_t &  size 
)
virtual

This method deserializes the raw value from the stream.

Parameters
iStream to be used for deserializing the value.
dataData to be deserialized.
sizeLength of the data to be deserialized.
Returns
Number of bytes read during the deserialization.

Implements odcore::serialization::Deserializer.

Friends And Related Function Documentation

friend class QueryableNetstringsDeserializer
friend