Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

Basics::BufStreambuf Class Reference

#include <BufStream.H>

List of all members.

Public Types

typedef std::streambuf::pos_type pos_type
typedef std::streambuf::off_type off_type
typedef std::ios_base::seekdir seekdir
typedef std::ios_base::openmode openmode

Public Member Functions

 BufStreambuf (unsigned int initial_buf_len=256)
 BufStreambuf (char *initial_buf, unsigned int initial_buf_len, unsigned int initial_valid_len=0, bool allocate_replacement=false)
 ~BufStreambuf ()
const char * str ()
pos_type seekoff (off_type offset, seekdir way, openmode mode=(std::ios::in|std::ios::out))
pos_type seekpos (pos_type pos, openmode mode=(std::ios::in|std::ios::out))

Protected Member Functions

int underflow ()
std::streamsize xsgetn (char *s, std::streamsize n)
int overflow (int c)
std::streamsize xsputn (const char *s, std::streamsize n)

Private Member Functions

void update_get_pos ()
void update_put_pos ()
bool alloc_if_needed (unsigned int new_byte_count)

Private Attributes

char * buf
unsigned int buf_len
pos_type get_pos
pos_type put_pos
pos_type valid_limit
bool delete_buf
bool allocate_new_buf


Member Typedef Documentation

typedef std::streambuf::off_type Basics::BufStreambuf::off_type
 

Definition at line 49 of file BufStream.H.

typedef std::ios_base::openmode Basics::BufStreambuf::openmode
 

Definition at line 51 of file BufStream.H.

typedef std::streambuf::pos_type Basics::BufStreambuf::pos_type
 

Definition at line 48 of file BufStream.H.

typedef std::ios_base::seekdir Basics::BufStreambuf::seekdir
 

Definition at line 50 of file BufStream.H.


Constructor & Destructor Documentation

Basics::BufStreambuf::BufStreambuf unsigned int  initial_buf_len = 256  ) 
 

Basics::BufStreambuf::BufStreambuf char *  initial_buf,
unsigned int  initial_buf_len,
unsigned int  initial_valid_len = 0,
bool  allocate_replacement = false
[inline]
 

Definition at line 87 of file BufStream.H.

References buf, buf_len, and valid_limit.

Basics::BufStreambuf::~BufStreambuf  )  [inline]
 

Definition at line 98 of file BufStream.H.

References buf, and delete_buf.


Member Function Documentation

bool Basics::BufStreambuf::alloc_if_needed unsigned int  new_byte_count  )  [private]
 

Referenced by Basics::BufStreambuf::overflow(), and Basics::BufStreambuf::xsputn().

int Basics::BufStreambuf::overflow int  c  )  [protected]
 

pos_type Basics::BufStreambuf::seekoff off_type  offset,
seekdir  way,
openmode  mode = (std::ios::in|std::ios::out)
 

pos_type Basics::BufStreambuf::seekpos pos_type  pos,
openmode  mode = (std::ios::in|std::ios::out)
 

const char* Basics::BufStreambuf::str  )  [inline]
 

Definition at line 104 of file BufStream.H.

References buf, buf_len, update_put_pos(), and valid_limit.

Referenced by Basics::BufStream::str(), Basics::OBufStream::str(), and Basics::IBufStream::str().

int Basics::BufStreambuf::underflow  )  [protected]
 

void Basics::BufStreambuf::update_get_pos  )  [private]
 

Referenced by Basics::BufStreambuf::alloc_if_needed(), Basics::BufStreambuf::seekoff(), Basics::BufStreambuf::underflow(), and Basics::BufStreambuf::xsgetn().

void Basics::BufStreambuf::update_put_pos  )  [private]
 

Referenced by Basics::BufStreambuf::alloc_if_needed(), Basics::BufStreambuf::seekoff(), Basics::BufStreambuf::seekpos(), Basics::BufStreambuf::underflow(), Basics::BufStreambuf::xsgetn(), and str().

std::streamsize Basics::BufStreambuf::xsgetn char *  s,
std::streamsize  n
[protected]
 

std::streamsize Basics::BufStreambuf::xsputn const char *  s,
std::streamsize  n
[protected]
 


Member Data Documentation

bool Basics::BufStreambuf::allocate_new_buf [private]
 

Definition at line 73 of file BufStream.H.

Referenced by Basics::BufStreambuf::alloc_if_needed().

char* Basics::BufStreambuf::buf [private]
 

Definition at line 56 of file BufStream.H.

Referenced by Basics::BufStreambuf::alloc_if_needed(), Basics::BufStreambuf::seekoff(), Basics::BufStreambuf::seekpos(), Basics::BufStreambuf::underflow(), Basics::BufStreambuf::update_get_pos(), Basics::BufStreambuf::update_put_pos(), Basics::BufStreambuf::xsgetn(), BufStreambuf(), str(), and ~BufStreambuf().

unsigned int Basics::BufStreambuf::buf_len [private]
 

Definition at line 59 of file BufStream.H.

Referenced by Basics::BufStreambuf::alloc_if_needed(), Basics::BufStreambuf::seekoff(), Basics::BufStreambuf::seekpos(), BufStreambuf(), and str().

bool Basics::BufStreambuf::delete_buf [private]
 

Definition at line 69 of file BufStream.H.

Referenced by Basics::BufStreambuf::alloc_if_needed(), and ~BufStreambuf().

pos_type Basics::BufStreambuf::get_pos [private]
 

Definition at line 62 of file BufStream.H.

Referenced by Basics::BufStreambuf::alloc_if_needed(), Basics::BufStreambuf::seekoff(), Basics::BufStreambuf::seekpos(), Basics::BufStreambuf::underflow(), Basics::BufStreambuf::update_get_pos(), and Basics::BufStreambuf::xsgetn().

pos_type Basics::BufStreambuf::put_pos [private]
 

Definition at line 62 of file BufStream.H.

Referenced by Basics::BufStreambuf::alloc_if_needed(), Basics::BufStreambuf::seekoff(), Basics::BufStreambuf::seekpos(), and Basics::BufStreambuf::update_put_pos().

pos_type Basics::BufStreambuf::valid_limit [private]
 

Definition at line 65 of file BufStream.H.

Referenced by Basics::BufStreambuf::alloc_if_needed(), Basics::BufStreambuf::seekoff(), Basics::BufStreambuf::seekpos(), Basics::BufStreambuf::underflow(), Basics::BufStreambuf::update_put_pos(), Basics::BufStreambuf::xsgetn(), BufStreambuf(), and str().


The documentation for this class was generated from the following file:
Generated on Mon May 8 00:49:17 2006 for Vesta by  doxygen 1.4.2