#include <CNER.h>
Public Member Functions | |
CNER () | |
CNER (const BytesPtr x, size_t offset) | |
CNER (const char *x, size_t length) | |
CNER (const char *x, size_t offset, size_t length) | |
void | commit () |
DecoderPtr | createDecoder (const BytesPtr x, size_t offset=0) |
DecoderPtr | createDecoder (const char *x, size_t length) |
DecoderPtr | createDecoder (const char *x, size_t offset, size_t length) |
EncoderPtr | createEncoder () |
castor::net::NetAddress | decAddress () |
bool | decBool () |
BytesPtr | decBytes (size_t length) |
double | decDouble () |
float | decFloat () |
short | decInt16 () |
long | decInt32 () |
long long | decInt64 () |
char | decInt8 () |
size_t | decLength () |
std::string | decString () |
unsigned short | decUInt16 () |
unsigned long | decUInt32 () |
unsigned long long | decUInt64 () |
unsigned char | decUInt8 () |
void | encAddress (const castor::net::NetAddress &x) |
void | encBool (bool x) |
void | encBytes (const Bytes &x) |
void | encBytes (const Bytes &x, size_t offset, size_t length) |
void | encBytes (const char *x, size_t length) |
void | encBytes (const char *x, size_t offset, size_t length) |
void | encDouble (double x) |
void | encFloat (float x) |
void | encInt16 (short x) |
void | encInt32 (long x) |
void | encInt64 (long long x) |
void | encInt8 (char x) |
void | encLength (size_t x) |
void | encString (const std::string x) |
void | encUInt16 (unsigned short x) |
void | encUInt32 (unsigned long x) |
void | encUInt64 (unsigned long long x) |
void | encUInt8 (unsigned char x) |
const char * | getBuffer () |
BytesPtr | getBytes () |
size_t | getLength () |
size_t | getPosition () |
void | mark () |
void | reset () |
void | rollback () |
void | seek (long offset) |
void | switchEndianness (bool yes) |
~CNER () | |
Private Types | |
enum | { encode, decode } |
Private Member Functions | |
void | readInternal (char *data, size_t length, bool ignoreEndian=false) |
void | writeInternal (const char *data, size_t length, bool ignoreEndian=false) |
Private Attributes | |
std::stringstream | buffer |
bool | doSwitchEndian |
size_t | length |
bool | marked |
size_t | marker |
enum castor::encoding::CNER:: { ... } | mode |
castor::encoding::CNER::CNER | ( | ) | [inline] |
castor::encoding::CNER::CNER | ( | const BytesPtr | x, |
size_t | offset | ||
) | [inline] |
castor::encoding::CNER::CNER | ( | const char * | x, |
size_t | length | ||
) | [inline] |
castor::encoding::CNER::CNER | ( | const char * | x, |
size_t | offset, | ||
size_t | length | ||
) | [inline] |
castor::encoding::CNER::~CNER | ( | ) | [inline] |
void castor::encoding::CNER::commit | ( | ) | [inline, virtual] |
Implements castor::Encoder.
DecoderPtr castor::encoding::CNER::createDecoder | ( | const BytesPtr | x, |
size_t | offset = 0 |
||
) | [inline, virtual] |
Implements castor::Encoder.
DecoderPtr castor::encoding::CNER::createDecoder | ( | const char * | x, |
size_t | length | ||
) | [inline, virtual] |
Implements castor::Encoder.
DecoderPtr castor::encoding::CNER::createDecoder | ( | const char * | x, |
size_t | offset, | ||
size_t | length | ||
) | [inline, virtual] |
Implements castor::Encoder.
EncoderPtr castor::encoding::CNER::createEncoder | ( | ) | [inline, virtual] |
Implements castor::Encoder.
castor::net::NetAddress castor::encoding::CNER::decAddress | ( | ) | [inline, virtual] |
Implements castor::Decoder.
bool castor::encoding::CNER::decBool | ( | ) | [inline, virtual] |
Implements castor::Decoder.
BytesPtr castor::encoding::CNER::decBytes | ( | size_t | length | ) | [inline, virtual] |
Implements castor::Decoder.
double castor::encoding::CNER::decDouble | ( | ) | [inline, virtual] |
Implements castor::Decoder.
float castor::encoding::CNER::decFloat | ( | ) | [inline, virtual] |
Implements castor::Decoder.
short castor::encoding::CNER::decInt16 | ( | ) | [inline, virtual] |
Implements castor::Decoder.
long castor::encoding::CNER::decInt32 | ( | ) | [inline, virtual] |
Implements castor::Decoder.
long long castor::encoding::CNER::decInt64 | ( | ) | [inline, virtual] |
Implements castor::Decoder.
char castor::encoding::CNER::decInt8 | ( | ) | [inline, virtual] |
Implements castor::Decoder.
size_t castor::encoding::CNER::decLength | ( | ) | [inline, virtual] |
Implements castor::Decoder.
std::string castor::encoding::CNER::decString | ( | ) | [inline, virtual] |
Implements castor::Decoder.
unsigned short castor::encoding::CNER::decUInt16 | ( | ) | [inline, virtual] |
Implements castor::Decoder.
unsigned long castor::encoding::CNER::decUInt32 | ( | ) | [inline, virtual] |
Implements castor::Decoder.
unsigned long long castor::encoding::CNER::decUInt64 | ( | ) | [inline, virtual] |
Implements castor::Decoder.
unsigned char castor::encoding::CNER::decUInt8 | ( | ) | [inline, virtual] |
Implements castor::Decoder.
void castor::encoding::CNER::encAddress | ( | const castor::net::NetAddress & | x | ) | [inline, virtual] |
Implements castor::Encoder.
void castor::encoding::CNER::encBool | ( | bool | x | ) | [inline, virtual] |
Implements castor::Encoder.
void castor::encoding::CNER::encBytes | ( | const Bytes & | x | ) | [inline, virtual] |
Implements castor::Encoder.
void castor::encoding::CNER::encBytes | ( | const Bytes & | x, |
size_t | offset, | ||
size_t | length | ||
) | [inline, virtual] |
Implements castor::Encoder.
void castor::encoding::CNER::encBytes | ( | const char * | x, |
size_t | length | ||
) | [inline, virtual] |
Implements castor::Encoder.
void castor::encoding::CNER::encBytes | ( | const char * | x, |
size_t | offset, | ||
size_t | length | ||
) | [inline, virtual] |
Implements castor::Encoder.
void castor::encoding::CNER::encDouble | ( | double | x | ) | [inline, virtual] |
Implements castor::Encoder.
void castor::encoding::CNER::encFloat | ( | float | x | ) | [inline, virtual] |
Implements castor::Encoder.
void castor::encoding::CNER::encInt16 | ( | short | x | ) | [inline, virtual] |
Implements castor::Encoder.
void castor::encoding::CNER::encInt32 | ( | long | x | ) | [inline, virtual] |
Implements castor::Encoder.
void castor::encoding::CNER::encInt64 | ( | long long | x | ) | [inline, virtual] |
Implements castor::Encoder.
void castor::encoding::CNER::encInt8 | ( | char | x | ) | [inline, virtual] |
Implements castor::Encoder.
void castor::encoding::CNER::encLength | ( | size_t | x | ) | [inline, virtual] |
Implements castor::Encoder.
void castor::encoding::CNER::encString | ( | const std::string | x | ) | [inline, virtual] |
Implements castor::Encoder.
void castor::encoding::CNER::encUInt16 | ( | unsigned short | x | ) | [inline, virtual] |
Implements castor::Encoder.
void castor::encoding::CNER::encUInt32 | ( | unsigned long | x | ) | [inline, virtual] |
Implements castor::Encoder.
void castor::encoding::CNER::encUInt64 | ( | unsigned long long | x | ) | [inline, virtual] |
Implements castor::Encoder.
void castor::encoding::CNER::encUInt8 | ( | unsigned char | x | ) | [inline, virtual] |
Implements castor::Encoder.
const char* castor::encoding::CNER::getBuffer | ( | ) | [inline, virtual] |
Implements castor::Encoder.
BytesPtr castor::encoding::CNER::getBytes | ( | ) | [inline, virtual] |
Implements castor::Encoder.
size_t castor::encoding::CNER::getLength | ( | ) | [inline, virtual] |
Implements castor::Encoder.
size_t castor::encoding::CNER::getPosition | ( | ) | [inline, virtual] |
Implements castor::Encoder.
void castor::encoding::CNER::mark | ( | ) | [inline, virtual] |
Implements castor::Encoder.
void castor::encoding::CNER::readInternal | ( | char * | data, |
size_t | length, | ||
bool | ignoreEndian = false |
||
) | [inline, private] |
void castor::encoding::CNER::reset | ( | ) | [inline, virtual] |
Implements castor::Encoder.
void castor::encoding::CNER::rollback | ( | ) | [inline, virtual] |
Implements castor::Encoder.
void castor::encoding::CNER::seek | ( | long | offset | ) | [inline, virtual] |
Implements castor::Encoder.
void castor::encoding::CNER::switchEndianness | ( | bool | yes | ) | [inline, virtual] |
Implements castor::Encoder.
void castor::encoding::CNER::writeInternal | ( | const char * | data, |
size_t | length, | ||
bool | ignoreEndian = false |
||
) | [inline, private] |
std::stringstream castor::encoding::CNER::buffer [private] |
bool castor::encoding::CNER::doSwitchEndian [private] |
size_t castor::encoding::CNER::length [private] |
bool castor::encoding::CNER::marked [private] |
size_t castor::encoding::CNER::marker [private] |
enum { ... } castor::encoding::CNER::mode [private] |