|
libcommonc++
0.7
|
An encoder for XDR, the eXternal Data Representation format. More...
#include <XDREncoder.h++>
Public Member Functions | |
| XDREncoder (DataWriter &writer) | |
| Construct a new XDREncoder that will encode values to the given DataWriter. More... | |
| ~XDREncoder () | |
| Destructor. More... | |
| XDREncoder & | encode (bool v) |
| Encode a boolean value. More... | |
| XDREncoder & | encode (byte_t v) |
| Encode a byte value. More... | |
| XDREncoder & | encode (char v) |
| Encode a char value. More... | |
| XDREncoder & | encode (int16_t v) |
| Encode a signed 16-bit integer value. More... | |
| XDREncoder & | encode (uint16_t v) |
| Encode an unsigned 16-bit integer value. More... | |
| XDREncoder & | encode (int32_t v) |
| Encode a signed 32-bit integer value. More... | |
| XDREncoder & | encode (uint32_t v) |
| Encode an unsigned 32-bit integer value. More... | |
| XDREncoder & | encode (const int64_t &v) |
| Encode a signed 64-bit integer value. More... | |
| XDREncoder & | encode (const uint64_t &v) |
| Encode an unsigned 64-bit integer value. More... | |
| XDREncoder & | encode (float v) |
| Encode a floating point value. More... | |
| XDREncoder & | encode (const double &v) |
| Encode a double-precision floating point value. More... | |
| XDREncoder & | encode (const char *s, size_t maxlen=0) |
| Encode a string. More... | |
| XDREncoder & | encode (const String &s, size_t maxlen=0) |
| Encode a string. More... | |
| XDREncoder & | encode (const byte_t *v, size_t len) |
| Encode a block of opaque data. More... | |
| XDREncoder & | encode (const Variant &v) |
| Encode an arbitrary Variant value. More... | |
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.
| XDREncoder | ( | DataWriter & | writer | ) |
Construct a new XDREncoder that will encode values to the given DataWriter.
| writer | The DataWriter. |
| ~XDREncoder | ( | ) |
Destructor.
|
inline |
Encode a boolean value.
| v | The value to encode. |
| IOException | If an I/O error occcurs. |
|
inline |
Encode a byte value.
| v | The value to encode. |
| IOException | If an I/O error occcurs. |
|
inline |
Encode a char value.
| v | The value to encode. |
| IOException | If an I/O error occcurs. |
|
inline |
Encode a signed 16-bit integer value.
| v | The value to encode. |
| IOException | If an I/O error occcurs. |
|
inline |
Encode an unsigned 16-bit integer value.
| v | The value to encode. |
| IOException | If an I/O error occcurs. |
|
inline |
Encode a signed 32-bit integer value.
| v | The value to encode. |
| IOException | If an I/O error occcurs. |
|
inline |
Encode an unsigned 32-bit integer value.
| v | The value to encode. |
| IOException | If an I/O error occcurs. |
|
inline |
Encode a signed 64-bit integer value.
| v | The value to encode. |
| IOException | If an I/O error occcurs. |
|
inline |
Encode an unsigned 64-bit integer value.
| v | The value to encode. |
| IOException | If an I/O error occcurs. |
|
inline |
Encode a floating point value.
| v | The value to encode. |
| IOException | If an I/O error occcurs. |
|
inline |
Encode a double-precision floating point value.
| v | The value to encode. |
| IOException | If an I/O error occcurs. |
| XDREncoder & encode | ( | const char * | s, |
| size_t | maxlen = 0 |
||
| ) |
Encode a string.
| s | The character array to encode. |
| maxlen | The maximum number of characters to encode. |
| IOException | If an I/O error occcurs. |
|
inline |
Encode a string.
| s | The String to encode. |
| maxlen | The maximum number of characters to encode. |
| IOException | If an I/O error occcurs. |
| XDREncoder & encode | ( | const byte_t * | v, |
| size_t | len | ||
| ) |
Encode a block of opaque data.
| v | The byte array to encode. |
| len | The number of bytes to encode. |
| IOException | If an I/O error occcurs. |
| XDREncoder & encode | ( | const Variant & | v | ) |
Encode an arbitrary Variant value.
| v | The Variant to encode. |
| IOException | If an I/O error occcurs. |