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

ReposReader Class Reference

#include <repos-reader.h>

Collaboration diagram for ReposReader:

Collaboration graph
[legend]
List of all members.

Public Methods

 ReposReader (std::istream *repos, const string &repos_name)
virtual ~ReposReader (void)
const char * ReadCharStar (int *len)
const char * ReadCharsOnly (int numchars)
uint32 ReadFixedUint32 ()
uint32 ReadVarUint32 ()
unsigned char ReadByte ()
int ReadInt ()
bool AtEnd () const
int cur_pos () const
const string & repos_name () const
void ParseError (const string &errmsg)

Private Methods

void RefillBuf ()
void ReallocCharsBuf (int size)

Private Attributes

std::istream * repos_
const string repos_name_
char decode_buf_ [kDecodeBufSize]
int decode_buf_len_
int cur_pos_
char * chars_buf_
int chars_buf_len_
Decoder decoder_

Static Private Attributes

const int kDecodeBufSize = 1024
const int kReadBufSize = 10000

Constructor & Destructor Documentation

ReposReader::ReposReader std::istream *    repos,
const string &    repos_name
 

Definition at line 23 of file repos-reader.cc.

References kReadBufSize, NULL, ReallocCharsBuf(), and RefillBuf().

virtual ReposReader::~ReposReader void    [inline, virtual]
 

Definition at line 37 of file repos-reader.h.


Member Function Documentation

bool ReposReader::AtEnd   const
 

Definition at line 123 of file repos-reader.cc.

References Decoder::avail(), decoder_, and repos_.

Referenced by Ripper::RipRepository().

int ReposReader::cur_pos   const [inline]
 

Definition at line 54 of file repos-reader.h.

References cur_pos_.

void ReposReader::ParseError const string &    errmsg
 

Definition at line 127 of file repos-reader.cc.

References cur_pos_, and repos_name_.

Referenced by ParseElt::Process_Document(), ReadInt(), ReadVarUint32(), and RefillBuf().

unsigned char ReposReader::ReadByte  
 

Definition at line 115 of file repos-reader.cc.

References Decoder::avail(), cur_pos_, decoder_, Decoder::get8(), and RefillBuf().

Referenced by ParseElt::Process_Document().

const char * ReposReader::ReadCharsOnly int    numchars
 

Definition at line 60 of file repos-reader.cc.

References Decoder::avail(), chars_buf_, chars_buf_len_, cur_pos_, decoder_, Decoder::getn(), MIN, ReallocCharsBuf(), and RefillBuf().

Referenced by ParseElt::Process_TermOrPunct(), and ReadCharStar().

const char * ReposReader::ReadCharStar int *    len
 

Definition at line 55 of file repos-reader.cc.

References ReadCharsOnly(), and ReadInt().

Referenced by ParseElt::Process_Anchor(), ParseElt::Process_Applet(), ParseElt::Process_Area(), ParseElt::Process_BaseURL(), ParseElt::Process_Body(), ParseElt::Process_ChangeBGColor(), ParseElt::Process_ChangeFontColor(), ParseElt::Process_Div(), ParseElt::Process_DivDone(), ParseElt::Process_Document(), ParseElt::Process_Embed(), ParseElt::Process_Form(), ParseElt::Process_Frame(), ParseElt::Process_Frameset(), ParseElt::Process_Head(), ParseElt::Process_Header(), ParseElt::Process_IFrame(), ParseElt::Process_Image(), ParseElt::Process_Input(), ParseElt::Process_LocalName(), ParseElt::Process_Meta(), ParseElt::Process_Object(), ParseElt::Process_Option(), ParseElt::Process_ParagraphStart(), ParseElt::Process_Param(), ParseElt::Process_Select(), ParseElt::Process_Span(), ParseElt::Process_SpanDone(), ParseElt::Process_TableDCell(), ParseElt::Process_TableHCell(), ParseElt::Process_TermOrPunct(), and ParseElt::Process_TextArea().

uint32 ReposReader::ReadFixedUint32  
 

Definition at line 79 of file repos-reader.cc.

References Decoder::avail(), cur_pos_, decoder_, Decoder::get32(), RefillBuf(), and uint32.

Referenced by ParseElt::Process_Document().

int ReposReader::ReadInt  
 

Definition at line 101 of file repos-reader.cc.

References Decoder::avail(), cur_pos_, decoder_, Decoder::get_varsigned32(), ParseError(), and RefillBuf().

Referenced by ParseElt::Process_Document(), ParseElt::Process_Heading(), ParseElt::Process_ResponseCode(), ParseElt::Process_SetFace(), ParseElt::Process_SetSize(), and ReadCharStar().

uint32 ReposReader::ReadVarUint32  
 

Definition at line 87 of file repos-reader.cc.

References Decoder::avail(), cur_pos_, decoder_, Decoder::get_varint32(), ParseError(), RefillBuf(), and uint32.

Referenced by ParseElt::Process_Document().

void ReposReader::ReallocCharsBuf int    size [private]
 

Definition at line 48 of file repos-reader.cc.

References chars_buf_, and chars_buf_len_.

Referenced by ReadCharsOnly(), and ReposReader().

void ReposReader::RefillBuf   [private]
 

Definition at line 33 of file repos-reader.cc.

References Decoder::avail(), decode_buf_, decode_buf_len_, decoder_, ParseError(), repos_, repos_name_, and Decoder::reset().

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

const string& ReposReader::repos_name   const [inline]
 

Definition at line 55 of file repos-reader.h.

References repos_name_.


Member Data Documentation

char* ReposReader::chars_buf_ [private]
 

Definition at line 73 of file repos-reader.h.

Referenced by ReadCharsOnly(), and ReallocCharsBuf().

int ReposReader::chars_buf_len_ [private]
 

Definition at line 74 of file repos-reader.h.

Referenced by ReadCharsOnly(), and ReallocCharsBuf().

int ReposReader::cur_pos_ [private]
 

Definition at line 71 of file repos-reader.h.

Referenced by cur_pos(), ParseError(), ReadByte(), ReadCharsOnly(), ReadFixedUint32(), ReadInt(), and ReadVarUint32().

char ReposReader::decode_buf_[kDecodeBufSize] [private]
 

Definition at line 69 of file repos-reader.h.

Referenced by RefillBuf().

int ReposReader::decode_buf_len_ [private]
 

Definition at line 70 of file repos-reader.h.

Referenced by RefillBuf().

Decoder ReposReader::decoder_ [private]
 

Definition at line 76 of file repos-reader.h.

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

const int ReposReader::kDecodeBufSize = 1024 [static, private]
 

Definition at line 64 of file repos-reader.h.

const int ReposReader::kReadBufSize = 10000 [static, private]
 

Definition at line 65 of file repos-reader.h.

Referenced by ReposReader().

std::istream* ReposReader::repos_ [private]
 

Definition at line 67 of file repos-reader.h.

Referenced by AtEnd(), and RefillBuf().

const string ReposReader::repos_name_ [private]
 

Definition at line 68 of file repos-reader.h.

Referenced by ParseError(), RefillBuf(), and repos_name().


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