#include <bufreader.h>
Classes | |
| class | eof |
Public Member Functions | |
| bool | atEof () const |
| BufReader (const void *p, unsigned len) | |
| unsigned | offset () const |
| template<typename T > | |
| void | peek (T &t) |
| const void * | pos () |
| template<typename T > | |
| void | read (T &t) |
| void | readStr (string &s) |
| unsigned | remaining () const |
| void | rewind (unsigned nbytes) |
| const void * | skip (unsigned len) |
Private Attributes | |
| const void * | _end |
| const void * | _pos |
| const void * | _start |
helper to read and parse a block of memory methods throw the eof exception if the operation would pass the end of the buffer with which we are working.
Definition at line 27 of file bufreader.h.
| mongo::BufReader::BufReader | ( | const void * | p, | |
| unsigned | len | |||
| ) | [inline] |
Definition at line 34 of file bufreader.h.
| bool mongo::BufReader::atEof | ( | ) | const [inline] |
Definition at line 36 of file bufreader.h.
| unsigned mongo::BufReader::offset | ( | ) | const [inline] |
return current offset into buffer
Definition at line 58 of file bufreader.h.
| void mongo::BufReader::peek | ( | T & | t | ) | [inline] |
verify we can look at t, but do not advance
Definition at line 50 of file bufreader.h.
| const void* mongo::BufReader::pos | ( | ) | [inline] |
Definition at line 90 of file bufreader.h.
| void mongo::BufReader::read | ( | T & | t | ) | [inline] |
read in the object specified, and advance buffer pointer
Definition at line 40 of file bufreader.h.
| void mongo::BufReader::readStr | ( | string & | s | ) | [inline] |
Definition at line 78 of file bufreader.h.
| unsigned mongo::BufReader::remaining | ( | ) | const [inline] |
return remaining bytes
Definition at line 61 of file bufreader.h.
| void mongo::BufReader::rewind | ( | unsigned | nbytes | ) | [inline] |
back up by nbytes
Definition at line 64 of file bufreader.h.
| const void* mongo::BufReader::skip | ( | unsigned | len | ) | [inline] |
return current position pointer, and advance by len
Definition at line 70 of file bufreader.h.
const void* mongo::BufReader::_end [private] |
Definition at line 95 of file bufreader.h.
const void* mongo::BufReader::_pos [private] |
Definition at line 94 of file bufreader.h.
const void* mongo::BufReader::_start [private] |
Definition at line 93 of file bufreader.h.