SUMMARY:  INNER | FIELD | CONSTR | METHOD | FRIEND DETAIL:  FIELD | CONSTR | METHOD | FRIEND


Platform::Io
Class IDeserializer

NonCopyableType
   |
   +-IDeserializer

Implemented in:
Platform.Io.IDeserializer.h
Direct Known Subclasses:
FileDeserializer, MemoryDeserializer, NullDeserializer

abstract class IDeserializer:
private NonCopyableType

A deserializer interface.

See Also:
ISerializer

Field Summarycollapse
protected Int byteCount
          The number of bytes deserialized by this stream.

Constructor Summarycollapse
IDeserializer()
          Constructor.
~IDeserializer() = 0
          Destructor.

Method Summarycollapse
Void close()
          Closes the deserializer.
Int count() const
          Retrieves the number of bytes deserialized so far by this deserializer.
protected Void deserialize(Byte& value)
          Deserializes a single byte of data.
protected Void deserialize(Void* buffer, Int size)
          Deserializes an array of bytes in a byte-order independent manner.
template <typename Type>
IDeserializer&
deserializeAsByte(Type& value)
          Deserializes a value of a given type as a byte.
template <typename Type>
IDeserializer&
deserializeAsInt(Type& value)
          Deserializes a value of a given type as a 32-bit integer.
IDeserializer& deserializeBytes(Void* buffer, Int size)
          Deserializes an array of bytes.
Void skip(Int bytes)
          Skips over the specified number of bytes in the deserialized stream.

Friend Summarycollapse
friend IDeserializer& operator>>(IDeserializer& deserializer, Bool& value)
          Deserializes a value of type Bool.
friend IDeserializer& operator>>(IDeserializer& deserializer, Double& value)
          Deserializes a value of type Double.
friend IDeserializer& operator>>(IDeserializer& deserializer, Float& value)
          Deserializes a value of type Float.
friend IDeserializer& operator>>(IDeserializer& deserializer, Int& value)
          Deserializes a value of type Int.
friend IDeserializer& operator>>(IDeserializer& deserializer, LatinChar& value)
          Deserializes a value of type LatinChar.
friend IDeserializer& operator>>(IDeserializer& deserializer, Long& value)
          Deserializes a value of type Long.
friend IDeserializer& operator>>(IDeserializer& deserializer, Short& value)
          Deserializes a value of type Short.
friend IDeserializer& operator>>(IDeserializer& deserializer, Small& value)
          Deserializes a value of type Small.
friend IDeserializer& operator>>(IDeserializer& deserializer, UInt& value)
          Deserializes a value of type UInt.
friend IDeserializer& operator>>(IDeserializer& deserializer, ULong& value)
          Deserializes a value of type ULong.
friend IDeserializer& operator>>(IDeserializer& deserializer, UniChar& value)
          Deserializes a value of type UniChar.
friend IDeserializer& operator>>(IDeserializer& deserializer, UShort& value)
          Deserializes a value of type UShort.
friend IDeserializer& operator>>(IDeserializer& deserializer, USmall& value)
          Deserializes a value of type USmall.

 

Field Detail

byteCount

protected Int byteCount

The number of bytes deserialized by this stream.

 

Constructor Detail

IDeserializer[inline]

IDeserializer()

Constructor.


~IDeserializer[abstract, inline]

~IDeserializer() = 0

Destructor.

 

Method Detail

close[virtual, inline]

Void close()

Closes the deserializer. No further deserialization must be made by a closed deserializer.


count[virtual, inline]

Int count() const

Retrieves the number of bytes deserialized so far by this deserializer.

Returns:
number of bytes deserialized

deserialize[virtual, inline]

protected Void deserialize(Byte& value)

Deserializes a single byte of data.

Parameters:
value - a byte

deserialize[virtual, inline]

protected Void deserialize(Void* buffer, Int size)

Deserializes an array of bytes in a byte-order independent manner.

Parameters:
buffer - pointer to the array data
size - the size of the array in bytes

deserializeAsByte[inline]

template <typename Type>
IDeserializer& deserializeAsByte(Type& value)

Deserializes a value of a given type as a byte. A conversion between Type and Byte types must be defined. Can be used for deserialization of e.g. enumerated types.

Parameters:
value - a value to deserialize
Returns:
reference to the deserializer

deserializeAsInt[inline]

template <typename Type>
IDeserializer& deserializeAsInt(Type& value)

Deserializes a value of a given type as a 32-bit integer. A conversion between Type and Int types must be defined. Can be used for deserialization of e.g. enumerated types.

Parameters:
value - a value to deserialize
Returns:
reference to the deserializer

deserializeBytes[inline]

IDeserializer& deserializeBytes(Void* buffer, Int size)

Deserializes an array of bytes. The bytes are deserialized in order they appear in the deserialization stream (e.g. no endian conversion). Can be used for deserialization of e.g. raw memory data.

Parameters:
buffer - pointer to the array data
size - the size of the array in bytes
Returns:
reference to the deserializer

skip[virtual, inline]

Void skip(Int bytes)

Skips over the specified number of bytes in the deserialized stream.

Parameters:
bytes - number of bytes to skip over

 

Friend Detail

operator>>[inline]

friend IDeserializer& operator>>(IDeserializer& deserializer, Bool& value)

Deserializes a value of type Bool.

Parameters:
deserializer - a deserializer to retrieve the data from
value - reference to value to receive deserialized data
Returns:
reference to the deserializer

operator>>[inline]

friend IDeserializer& operator>>(IDeserializer& deserializer, Double& value)

Deserializes a value of type Double.

Parameters:
deserializer - a deserializer to retrieve the data from
value - reference to value to receive deserialized data
Returns:
reference to the deserializer

operator>>[inline]

friend IDeserializer& operator>>(IDeserializer& deserializer, Float& value)

Deserializes a value of type Float.

Parameters:
deserializer - a deserializer to retrieve the data from
value - reference to value to receive deserialized data
Returns:
reference to the deserializer

operator>>[inline]

friend IDeserializer& operator>>(IDeserializer& deserializer, Int& value)

Deserializes a value of type Int.

Parameters:
deserializer - a deserializer to retrieve the data from
value - reference to value to receive deserialized data
Returns:
reference to the deserializer

operator>>[inline]

friend IDeserializer& operator>>(IDeserializer& deserializer, LatinChar& value)

Deserializes a value of type LatinChar.

Parameters:
deserializer - a deserializer to retrieve the data from
value - reference to value to receive deserialized data
Returns:
reference to the deserializer

operator>>[inline]

friend IDeserializer& operator>>(IDeserializer& deserializer, Long& value)

Deserializes a value of type Long.

Parameters:
deserializer - a deserializer to retrieve the data from
value - reference to value to receive deserialized data
Returns:
reference to the deserializer

operator>>[inline]

friend IDeserializer& operator>>(IDeserializer& deserializer, Short& value)

Deserializes a value of type Short.

Parameters:
deserializer - a deserializer to retrieve the data from
value - reference to value to receive deserialized data
Returns:
reference to the deserializer

operator>>[inline]

friend IDeserializer& operator>>(IDeserializer& deserializer, Small& value)

Deserializes a value of type Small.

Parameters:
deserializer - a deserializer to retrieve the data from
value - reference to value to receive deserialized data
Returns:
reference to the deserializer

operator>>[inline]

friend IDeserializer& operator>>(IDeserializer& deserializer, UInt& value)

Deserializes a value of type UInt.

Parameters:
deserializer - a deserializer to retrieve the data from
value - reference to value to receive deserialized data
Returns:
reference to the deserializer

operator>>[inline]

friend IDeserializer& operator>>(IDeserializer& deserializer, ULong& value)

Deserializes a value of type ULong.

Parameters:
deserializer - a deserializer to retrieve the data from
value - reference to value to receive deserialized data
Returns:
reference to the deserializer

operator>>[inline]

friend IDeserializer& operator>>(IDeserializer& deserializer, UniChar& value)

Deserializes a value of type UniChar.

Parameters:
deserializer - a deserializer to retrieve the data from
value - reference to value to receive deserialized data
Returns:
reference to the deserializer

operator>>[inline]

friend IDeserializer& operator>>(IDeserializer& deserializer, UShort& value)

Deserializes a value of type UShort.

Parameters:
deserializer - a deserializer to retrieve the data from
value - reference to value to receive deserialized data
Returns:
reference to the deserializer

operator>>[inline]

friend IDeserializer& operator>>(IDeserializer& deserializer, USmall& value)

Deserializes a value of type USmall.

Parameters:
deserializer - a deserializer to retrieve the data from
value - reference to value to receive deserialized data
Returns:
reference to the deserializer


SUMMARY:  INNER | FIELD | CONSTR | METHOD | FRIEND DETAIL:  FIELD | CONSTR | METHOD | FRIEND