All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Types | Private Member Functions | Private Attributes
castor::encoding::CNER Class Reference

#include <CNER.h>

Inheritance diagram for castor::encoding::CNER:
Inheritance graph
[legend]

List of all members.

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

Detailed Description

Definition at line 12 of file CNER.h.


Member Enumeration Documentation

anonymous enum [private]
Enumerator:
encode 
decode 

Definition at line 75 of file CNER.h.


Constructor & Destructor Documentation

Definition at line 79 of file CNER.h.

castor::encoding::CNER::CNER ( const BytesPtr  x,
size_t  offset 
) [inline]

Definition at line 85 of file CNER.h.

castor::encoding::CNER::CNER ( const char *  x,
size_t  length 
) [inline]

Definition at line 91 of file CNER.h.

castor::encoding::CNER::CNER ( const char *  x,
size_t  offset,
size_t  length 
) [inline]

Definition at line 97 of file CNER.h.

Definition at line 104 of file CNER.h.


Member Function Documentation

void castor::encoding::CNER::commit ( ) [inline, virtual]

Implements castor::Encoder.

Definition at line 170 of file CNER.h.

DecoderPtr castor::encoding::CNER::createDecoder ( const BytesPtr  x,
size_t  offset = 0 
) [inline, virtual]

Implements castor::Encoder.

Definition at line 110 of file CNER.h.

DecoderPtr castor::encoding::CNER::createDecoder ( const char *  x,
size_t  length 
) [inline, virtual]

Implements castor::Encoder.

Definition at line 114 of file CNER.h.

DecoderPtr castor::encoding::CNER::createDecoder ( const char *  x,
size_t  offset,
size_t  length 
) [inline, virtual]

Implements castor::Encoder.

Definition at line 118 of file CNER.h.

Implements castor::Encoder.

Definition at line 106 of file CNER.h.

Implements castor::Decoder.

Definition at line 418 of file CNER.h.

bool castor::encoding::CNER::decBool ( ) [inline, virtual]

Implements castor::Decoder.

Definition at line 343 of file CNER.h.

BytesPtr castor::encoding::CNER::decBytes ( size_t  length) [inline, virtual]

Implements castor::Decoder.

Definition at line 427 of file CNER.h.

double castor::encoding::CNER::decDouble ( ) [inline, virtual]

Implements castor::Decoder.

Definition at line 405 of file CNER.h.

float castor::encoding::CNER::decFloat ( ) [inline, virtual]

Implements castor::Decoder.

Definition at line 394 of file CNER.h.

short castor::encoding::CNER::decInt16 ( ) [inline, virtual]

Implements castor::Decoder.

Definition at line 358 of file CNER.h.

long castor::encoding::CNER::decInt32 ( ) [inline, virtual]

Implements castor::Decoder.

Definition at line 370 of file CNER.h.

long long castor::encoding::CNER::decInt64 ( ) [inline, virtual]

Implements castor::Decoder.

Definition at line 382 of file CNER.h.

char castor::encoding::CNER::decInt8 ( ) [inline, virtual]

Implements castor::Decoder.

Definition at line 348 of file CNER.h.

size_t castor::encoding::CNER::decLength ( ) [inline, virtual]

Implements castor::Decoder.

Definition at line 316 of file CNER.h.

std::string castor::encoding::CNER::decString ( ) [inline, virtual]

Implements castor::Decoder.

Definition at line 411 of file CNER.h.

unsigned short castor::encoding::CNER::decUInt16 ( ) [inline, virtual]

Implements castor::Decoder.

Definition at line 364 of file CNER.h.

unsigned long castor::encoding::CNER::decUInt32 ( ) [inline, virtual]

Implements castor::Decoder.

Definition at line 376 of file CNER.h.

unsigned long long castor::encoding::CNER::decUInt64 ( ) [inline, virtual]

Implements castor::Decoder.

Definition at line 388 of file CNER.h.

unsigned char castor::encoding::CNER::decUInt8 ( ) [inline, virtual]

Implements castor::Decoder.

Definition at line 353 of file CNER.h.

void castor::encoding::CNER::encAddress ( const castor::net::NetAddress x) [inline, virtual]

Implements castor::Encoder.

Definition at line 287 of file CNER.h.

void castor::encoding::CNER::encBool ( bool  x) [inline, virtual]

Implements castor::Encoder.

Definition at line 230 of file CNER.h.

void castor::encoding::CNER::encBytes ( const Bytes x) [inline, virtual]

Implements castor::Encoder.

Definition at line 295 of file CNER.h.

void castor::encoding::CNER::encBytes ( const Bytes x,
size_t  offset,
size_t  length 
) [inline, virtual]

Implements castor::Encoder.

Definition at line 299 of file CNER.h.

void castor::encoding::CNER::encBytes ( const char *  x,
size_t  length 
) [inline, virtual]

Implements castor::Encoder.

Definition at line 308 of file CNER.h.

void castor::encoding::CNER::encBytes ( const char *  x,
size_t  offset,
size_t  length 
) [inline, virtual]

Implements castor::Encoder.

Definition at line 312 of file CNER.h.

void castor::encoding::CNER::encDouble ( double  x) [inline, virtual]

Implements castor::Encoder.

Definition at line 276 of file CNER.h.

void castor::encoding::CNER::encFloat ( float  x) [inline, virtual]

Implements castor::Encoder.

Definition at line 269 of file CNER.h.

void castor::encoding::CNER::encInt16 ( short  x) [inline, virtual]

Implements castor::Encoder.

Definition at line 245 of file CNER.h.

void castor::encoding::CNER::encInt32 ( long  x) [inline, virtual]

Implements castor::Encoder.

Definition at line 253 of file CNER.h.

void castor::encoding::CNER::encInt64 ( long long  x) [inline, virtual]

Implements castor::Encoder.

Definition at line 261 of file CNER.h.

void castor::encoding::CNER::encInt8 ( char  x) [inline, virtual]

Implements castor::Encoder.

Definition at line 235 of file CNER.h.

void castor::encoding::CNER::encLength ( size_t  x) [inline, virtual]

Implements castor::Encoder.

Definition at line 206 of file CNER.h.

void castor::encoding::CNER::encString ( const std::string  x) [inline, virtual]

Implements castor::Encoder.

Definition at line 281 of file CNER.h.

void castor::encoding::CNER::encUInt16 ( unsigned short  x) [inline, virtual]

Implements castor::Encoder.

Definition at line 249 of file CNER.h.

void castor::encoding::CNER::encUInt32 ( unsigned long  x) [inline, virtual]

Implements castor::Encoder.

Definition at line 257 of file CNER.h.

void castor::encoding::CNER::encUInt64 ( unsigned long long  x) [inline, virtual]

Implements castor::Encoder.

Definition at line 265 of file CNER.h.

void castor::encoding::CNER::encUInt8 ( unsigned char  x) [inline, virtual]

Implements castor::Encoder.

Definition at line 240 of file CNER.h.

const char* castor::encoding::CNER::getBuffer ( ) [inline, virtual]

Implements castor::Encoder.

Definition at line 156 of file CNER.h.

Implements castor::Encoder.

Definition at line 160 of file CNER.h.

size_t castor::encoding::CNER::getLength ( ) [inline, virtual]

Implements castor::Encoder.

Definition at line 126 of file CNER.h.

size_t castor::encoding::CNER::getPosition ( ) [inline, virtual]

Implements castor::Encoder.

Definition at line 150 of file CNER.h.

void castor::encoding::CNER::mark ( ) [inline, virtual]

Implements castor::Encoder.

Definition at line 165 of file CNER.h.

void castor::encoding::CNER::readInternal ( char *  data,
size_t  length,
bool  ignoreEndian = false 
) [inline, private]

Definition at line 50 of file CNER.h.

void castor::encoding::CNER::reset ( ) [inline, virtual]

Implements castor::Encoder.

Definition at line 186 of file CNER.h.

void castor::encoding::CNER::rollback ( ) [inline, virtual]

Implements castor::Encoder.

Definition at line 175 of file CNER.h.

void castor::encoding::CNER::seek ( long  offset) [inline, virtual]

Implements castor::Encoder.

Definition at line 198 of file CNER.h.

void castor::encoding::CNER::switchEndianness ( bool  yes) [inline, virtual]

Implements castor::Encoder.

Definition at line 122 of file CNER.h.

void castor::encoding::CNER::writeInternal ( const char *  data,
size_t  length,
bool  ignoreEndian = false 
) [inline, private]

Definition at line 25 of file CNER.h.


Member Data Documentation

std::stringstream castor::encoding::CNER::buffer [private]

Definition at line 16 of file CNER.h.

Definition at line 18 of file CNER.h.

Definition at line 23 of file CNER.h.

Definition at line 20 of file CNER.h.

Definition at line 21 of file CNER.h.

enum { ... } castor::encoding::CNER::mode [private]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


Castor
Author(s): Carpe Noctem
autogenerated on Fri Nov 8 2013 11:05:41