Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

Decoder Class Reference

#include <netutil.h>

List of all members.

Public Methods

 Decoder ()
 ~Decoder ()
 Decoder (const void *buf, int maxn)
void reset (const void *buf, int maxn)
unsigned char get8 ()
uint16 get16 ()
uint32 get32 ()
uint64 get64 ()
float getfloat ()
double getdouble ()
void getn (void *mem, int n)
void getcn (void *mem, int c, int n)
void gets (void *mem, int n)
void skip (int n)
unsigned char const * ptr ()
bool get_varint32 (uint32 *v)
bool get_varint64 (uint64 *v)
bool get_varsigned32 (int32 *v)
int pos () const
int avail () const

Private Attributes

const unsigned char * orig_
const unsigned char * buf_
const unsigned char * limit_


Constructor & Destructor Documentation

Decoder::Decoder   [inline]
 

Definition at line 79 of file netutil.h.

Decoder::~Decoder   [inline]
 

Definition at line 84 of file netutil.h.

Decoder::Decoder const void *    buf,
int    maxn
[inline, explicit]
 

Definition at line 170 of file netutil.h.

References buf_, limit_, and orig_.


Member Function Documentation

int Decoder::avail   const [inline]
 

Definition at line 184 of file netutil.h.

References buf_, and limit_.

Referenced by ReposReader::AtEnd(), ReposReader::ReadByte(), ReposReader::ReadCharsOnly(), ReposReader::ReadFixedUint32(), ReposReader::ReadInt(), ReposReader::ReadVarUint32(), and ReposReader::RefillBuf().

uint16 Decoder::get16   [inline]
 

Definition at line 350 of file netutil.h.

References buf_, and uint16.

uint32 Decoder::get32   [inline]
 

Definition at line 356 of file netutil.h.

References buf_, and uint32.

Referenced by ReposReader::ReadFixedUint32().

uint64 Decoder::get64   [inline]
 

Definition at line 363 of file netutil.h.

References buf_, and uint64.

unsigned char Decoder::get8   [inline]
 

Definition at line 344 of file netutil.h.

References buf_.

Referenced by ReposReader::ReadByte().

bool Decoder::get_varint32 uint32   v
 

Definition at line 38 of file netutil.cc.

References buf_, Encoder::kVarintMax32, limit_, ptr(), and uint32.

Referenced by get_varsigned32(), and ReposReader::ReadVarUint32().

bool Decoder::get_varint64 uint64   v
 

Definition at line 93 of file netutil.cc.

References buf_, limit_, and uint64.

bool Decoder::get_varsigned32 int32   v [inline]
 

Definition at line 217 of file netutil.h.

References get_varint32(), int32, and uint32.

Referenced by ReposReader::ReadInt().

void Decoder::getcn void *    mem,
int    c,
int    n
[inline]
 

Definition at line 193 of file netutil.h.

References buf_, NULL, and ptr().

Referenced by gets().

double Decoder::getdouble   [inline]
 

Definition at line 382 of file netutil.h.

References buf_.

float Decoder::getfloat   [inline]
 

Definition at line 375 of file netutil.h.

References buf_.

void Decoder::getn void *    mem,
int    n
[inline]
 

Definition at line 188 of file netutil.h.

References buf_.

Referenced by ReposReader::ReadCharsOnly().

void Decoder::gets void *    mem,
int    n
[inline]
 

Definition at line 203 of file netutil.h.

References buf_, getcn(), and limit_.

int Decoder::pos   const [inline]
 

Definition at line 180 of file netutil.h.

References buf_, and orig_.

unsigned char const * Decoder::ptr   [inline]
 

Definition at line 213 of file netutil.h.

References buf_.

Referenced by get_varint32(), and getcn().

void Decoder::reset const void *    buf,
int    maxn
[inline]
 

Definition at line 175 of file netutil.h.

References buf_, limit_, and orig_.

Referenced by ReposReader::RefillBuf().

void Decoder::skip int    n [inline]
 

Definition at line 209 of file netutil.h.

References buf_.


Member Data Documentation

const unsigned char* Decoder::buf_ [private]
 

Definition at line 117 of file netutil.h.

Referenced by avail(), Decoder(), get16(), get32(), get64(), get8(), get_varint32(), get_varint64(), getcn(), getdouble(), getfloat(), getn(), gets(), pos(), ptr(), reset(), and skip().

const unsigned char* Decoder::limit_ [private]
 

Definition at line 118 of file netutil.h.

Referenced by avail(), Decoder(), get_varint32(), get_varint64(), gets(), and reset().

const unsigned char* Decoder::orig_ [private]
 

Definition at line 116 of file netutil.h.

Referenced by Decoder(), pos(), and reset().


Generated on Wed May 29 11:37:24 2002 for MarkovPR by doxygen1.2.15