My Project
|
Buffer used to store strings. More...
#include <bufstr.h>
Public Member Functions | |
BufStr (int size) | |
~BufStr () | |
void | addChar (char c) |
void | addArray (const char *a, int len) |
void | skip (uint s) |
void | shrink (uint newlen) |
void | resize (uint newlen) |
int | size () const |
char * | data () const |
char & | at (uint i) const |
bool | isEmpty () const |
operator const char * () const | |
uint | curPos () const |
void | dropFromStart (uint bytes) |
Private Member Functions | |
void | makeRoomFor (uint size) |
Private Attributes | |
uint | m_size |
uint | m_writeOffset |
const int | m_spareRoom |
char * | m_buf |
Buffer used to store strings.
This buffer is used append characters and strings. It will automatically resize itself, yet provide efficient random access to the content.
|
inline |
|
inline |
Definition at line 47 of file bufstr.h.
References m_buf, m_writeOffset, and makeRoomFor().
Referenced by readInputFile().
|
inline |
Definition at line 42 of file bufstr.h.
References m_buf, m_writeOffset, and makeRoomFor().
Referenced by readInputFile().
|
inline |
|
inline |
|
inline |
Definition at line 81 of file bufstr.h.
References m_buf.
Referenced by readInputFile(), removeEmptyLines(), and transcodeCharacterBuffer().
|
inline |
Definition at line 101 of file bufstr.h.
References m_buf, m_size, and m_writeOffset.
Referenced by readInputFile().
|
inline |
|
inlineprivate |
Definition at line 109 of file bufstr.h.
References m_size, m_spareRoom, m_writeOffset, and resize().
Referenced by addArray(), addChar(), and skip().
|
inline |
|
inline |
Definition at line 63 of file bufstr.h.
References m_buf, m_size, m_spareRoom, and m_writeOffset.
Referenced by makeRoomFor(), and shrink().
|
inline |
Definition at line 58 of file bufstr.h.
References m_writeOffset, and resize().
Referenced by readInputFile(), and transcodeCharacterBuffer().
|
inline |
|
inline |
Definition at line 53 of file bufstr.h.
References m_writeOffset, and makeRoomFor().
Referenced by readInputFile().
|
private |
Definition at line 119 of file bufstr.h.
Referenced by addArray(), addChar(), at(), BufStr(), data(), dropFromStart(), operator const char *(), resize(), and ~BufStr().
|
private |
Definition at line 116 of file bufstr.h.
Referenced by dropFromStart(), makeRoomFor(), resize(), and size().
|
private |
Definition at line 118 of file bufstr.h.
Referenced by makeRoomFor(), and resize().
|
private |
Definition at line 117 of file bufstr.h.
Referenced by addArray(), addChar(), curPos(), dropFromStart(), isEmpty(), makeRoomFor(), resize(), shrink(), and skip().