XDREncoder Class Reference

An encoder for XDR, the eXternal Data Representation format. More...

#include <XDREncoder.h++>

List of all members.

Public Member Functions

 XDREncoder (DataWriter &writer)
 Construct a new XDREncoder that will encode values to the given DataWriter.
 ~XDREncoder () throw ()
 Destructor.
XDREncoderencode (bool v) throw (IOException)
 Encode a boolean value.
XDREncoderencode (byte_t v) throw (IOException)
 Encode a byte value.
XDREncoderencode (char v) throw (IOException)
 Encode a char value.
XDREncoderencode (int16_t v) throw (IOException)
 Encode a signed 16-bit integer value.
XDREncoderencode (uint16_t v) throw (IOException)
 Encode an unsigned 16-bit integer value.
XDREncoderencode (int32_t v) throw (IOException)
 Encode a signed 32-bit integer value.
XDREncoderencode (uint32_t v) throw (IOException)
 Encode an unsigned 32-bit integer value.
XDREncoderencode (const int64_t &v) throw (IOException)
 Encode a signed 64-bit integer value.
XDREncoderencode (const uint64_t &v) throw (IOException)
 Encode an unsigned 64-bit integer value.
XDREncoderencode (float v) throw (IOException)
 Encode a floating point value.
XDREncoderencode (const double &v) throw (IOException)
 Encode a double-precision floating point value.
XDREncoderencode (const char *s, size_t maxlen=0) throw (IOException)
 Encode a string.
XDREncoderencode (const String &s, size_t maxlen=0) throw (IOException)
 Encode a string.
XDREncoderencode (const byte_t *v, size_t len) throw (IOException)
 Encode a block of opaque data.
XDREncoderencode (const Variant &v) throw (IOException)
 Encode an arbitrary Variant value.

Detailed Description

An encoder 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

XDREncoder ( DataWriter writer  ) 

Construct a new XDREncoder that will encode values to the given DataWriter.

Parameters:
writer The DataWriter.
~XDREncoder (  )  throw ()

Destructor.


Member Function Documentation

XDREncoder & encode ( const Variant v  )  throw (IOException)

Encode an arbitrary Variant value.

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

Encode a block of opaque data.

Parameters:
v The byte array to encode.
len The number of bytes to encode.
Returns:
The XDREncoder.
Exceptions:
IOException If an I/O error occcurs.
XDREncoder& encode ( const String s,
size_t  maxlen = 0 
) throw (IOException) [inline]

Encode a string.

Parameters:
s The String to encode.
maxlen The maximum number of characters to encode.
Returns:
The XDREncoder.
Exceptions:
IOException If an I/O error occcurs.
XDREncoder & encode ( const char *  s,
size_t  maxlen = 0 
) throw (IOException)

Encode a string.

Parameters:
s The character array to encode.
maxlen The maximum number of characters to encode.
Returns:
The XDREncoder.
Exceptions:
IOException If an I/O error occcurs.
XDREncoder& encode ( const double &  v  )  throw (IOException) [inline]

Encode a double-precision floating point value.

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

Encode a floating point value.

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

Encode an unsigned 64-bit integer value.

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

Encode a signed 64-bit integer value.

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

Encode an unsigned 32-bit integer value.

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

Encode a signed 32-bit integer value.

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

Encode an unsigned 16-bit integer value.

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

Encode a signed 16-bit integer value.

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

Encode a char value.

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

Encode a byte value.

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

Encode a boolean value.

Parameters:
v The value to encode.
Returns:
The XDREncoder.
Exceptions:
IOException If an I/O error occcurs.

The documentation for this class was generated from the following files:
Generated on Sat Nov 26 16:49:10 2011 for libcommonc++ by  doxygen 1.6.3