XDRDecoder Class Reference

A decoder for XDR, the eXternal Data Representation format. More...

#include <XDRDecoder.h++>

Collaboration diagram for XDRDecoder:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 XDRDecoder (DataReader &reader)
 Construct a new XDRDecoder that will decode values from the given DataReader.
 ~XDRDecoder () throw ()
 Destructor.
XDRDecoderdecode (bool &v) throw (IOException)
 Decode a boolean value.
XDRDecoderdecode (byte_t &v) throw (IOException)
 Decode a byte value.
XDRDecoderdecode (char &v) throw (IOException)
 Decode a char value.
XDRDecoderdecode (int16_t &v) throw (IOException)
 Decode a signed 16-bit integer value.
XDRDecoderdecode (uint16_t &v) throw (IOException)
 Decode an unsigned 16-bit integer value.
XDRDecoderdecode (int32_t &v) throw (IOException)
 Decode a signed 32-bit integer value.
XDRDecoderdecode (uint32_t &v) throw (IOException)
 Decode an unsigned 32-bit integer value.
XDRDecoderdecode (int64_t &v) throw (IOException)
 Decode a signed 64-bit integer value.
XDRDecoderdecode (uint64_t &v) throw (IOException)
 Decode an unsigned 64-bit integer value.
XDRDecoderdecode (float &v) throw (IOException)
 Decode a floating point value.
XDRDecoderdecode (double &v) throw (IOException)
 Decode a double precision floating point value.
XDRDecoderdecode (char *s, size_t maxlen=0) throw (IOException)
 Decode a string.
XDRDecoderdecode (String &s, size_t maxlen=0) throw (IOException)
 Decode a string.
XDRDecoderdecode (byte_t *v, size_t len) throw (IOException)
 Decode a block of opaque data.
XDRDecoderdecode (Variant &v) throw (IOException)
 Decode an arbitrary value into a Variant.

Detailed Description

A decoder for XDR, the eXternal Data Representation format.

XDR is a scheme for encoding primitive datatypes in a platform-independent manner. For more information, see RFC 1832.

Author:
Mark Lindner

Constructor & Destructor Documentation

XDRDecoder ( DataReader reader  ) 

Construct a new XDRDecoder that will decode values from the given DataReader.

Parameters:
reader The DataReader.
~XDRDecoder (  )  throw ()

Destructor.


Member Function Documentation

XDRDecoder & decode ( Variant v  )  throw (IOException)

Decode an arbitrary value into a Variant.

Parameters:
v The Variant to decode into.
Returns:
The XDRDecoder.
Exceptions:
IOException If an I/O error occcurs.
XDRDecoder & decode ( byte_t v,
size_t  len 
) throw (IOException)

Decode a block of opaque data.

Parameters:
v The byte array to decode into.
len The number of bytes to decode.
Returns:
The XDRDecoder.
Exceptions:
IOException If an I/O error occcurs.
XDRDecoder & decode ( String s,
size_t  maxlen = 0 
) throw (IOException)

Decode a string.

Parameters:
s The String to decode into.
maxlen The maximum length of the string to decode. If the encoded string is longer than this length, an IOException will be thrown.
Returns:
The XDRDecoder.
Exceptions:
IOException If an I/O error occcurs.
XDRDecoder & decode ( char *  s,
size_t  maxlen = 0 
) throw (IOException)

Decode a string.

Parameters:
s The character array to decode into.
maxlen The maximum length of the string to decode. If the encoded string is longer than this length, an IOException will be thrown.
Returns:
The XDRDecoder.
Exceptions:
IOException If an I/O error occcurs.
XDRDecoder& decode ( double &  v  )  throw (IOException) [inline]

Decode a double precision floating point value.

Parameters:
v The value to decode into.
Returns:
The XDRDecoder.
Exceptions:
IOException If an I/O error occcurs.
XDRDecoder& decode ( float &  v  )  throw (IOException) [inline]

Decode a floating point value.

Parameters:
v The value to decode into.
Returns:
The XDRDecoder.
Exceptions:
IOException If an I/O error occcurs.
XDRDecoder& decode ( uint64_t &  v  )  throw (IOException) [inline]

Decode an unsigned 64-bit integer value.

Parameters:
v The value to decode into.
Returns:
The XDRDecoder.
Exceptions:
IOException If an I/O error occcurs.
XDRDecoder& decode ( int64_t &  v  )  throw (IOException) [inline]

Decode a signed 64-bit integer value.

Parameters:
v The value to decode into.
Returns:
The XDRDecoder.
Exceptions:
IOException If an I/O error occcurs.
XDRDecoder& decode ( uint32_t &  v  )  throw (IOException) [inline]

Decode an unsigned 32-bit integer value.

Parameters:
v The value to decode into.
Returns:
The XDRDecoder.
Exceptions:
IOException If an I/O error occcurs.
XDRDecoder& decode ( int32_t &  v  )  throw (IOException) [inline]

Decode a signed 32-bit integer value.

Parameters:
v The value to decode into.
Returns:
The XDRDecoder.
Exceptions:
IOException If an I/O error occcurs.
XDRDecoder& decode ( uint16_t &  v  )  throw (IOException) [inline]

Decode an unsigned 16-bit integer value.

Parameters:
v The value to decode into.
Returns:
The XDRDecoder.
Exceptions:
IOException If an I/O error occcurs.
XDRDecoder& decode ( int16_t &  v  )  throw (IOException) [inline]

Decode a signed 16-bit integer value.

Parameters:
v The value to decode into.
Returns:
The XDRDecoder.
Exceptions:
IOException If an I/O error occcurs.
XDRDecoder& decode ( char &  v  )  throw (IOException) [inline]

Decode a char value.

Parameters:
v The value to decode into.
Returns:
The XDRDecoder.
Exceptions:
IOException If an I/O error occcurs.
XDRDecoder& decode ( byte_t v  )  throw (IOException) [inline]

Decode a byte value.

Parameters:
v The value to decode into.
Returns:
The XDRDecoder.
Exceptions:
IOException If an I/O error occcurs.
XDRDecoder& decode ( bool &  v  )  throw (IOException) [inline]

Decode a boolean value.

Parameters:
v The value to decode into.
Returns:
The XDRDecoder.
Exceptions:
IOException If an I/O error occcurs.

The documentation for this class was generated from the following files:
Generated on Fri Sep 3 23:49:37 2010 for libcommonc++ by  doxygen 1.6.3