#include <StreamBuffer.h>
Public Member Functions | |
StreamBuffer () | |
StreamBuffer (const void *s, long size) | |
StreamBuffer (const char *s) | |
StreamBuffer (const StreamBuffer &s) | |
StreamBuffer (long size) | |
~StreamBuffer () | |
const char * | operator() (long index=0) const |
char * | operator() (long index=0) |
char | operator[] (long index) const |
char & | operator[] (long index) |
operator bool () const | |
long | length () const |
long | capacity () const |
const char * | end () const |
StreamBuffer & | clear () |
char * | reserve (long size) |
StreamBuffer & | append (char c) |
StreamBuffer & | append (char c, long count) |
StreamBuffer & | append (const void *s, long size) |
StreamBuffer & | append (const char *s) |
StreamBuffer & | append (const StreamBuffer &s) |
StreamBuffer & | operator+= (char c) |
StreamBuffer & | operator+= (const char *s) |
StreamBuffer & | operator+= (const StreamBuffer &s) |
StreamBuffer & | set (const void *s, long size) |
StreamBuffer & | set (const char *s) |
StreamBuffer & | set (const StreamBuffer &s) |
StreamBuffer & | operator= (const char *s) |
StreamBuffer & | operator= (const StreamBuffer &s) |
StreamBuffer & | replace (long pos, long length, const void *s, long size) |
StreamBuffer & | replace (long pos, long length, const char *s) |
StreamBuffer & | replace (long pos, long length, const StreamBuffer &s) |
StreamBuffer & | remove (long pos, long length) |
StreamBuffer & | remove (long length) |
StreamBuffer & | truncate (long pos) |
StreamBuffer & | insert (long pos, const void *s, long size) |
StreamBuffer & | insert (long pos, const char *s) |
StreamBuffer & | insert (long pos, const StreamBuffer &s) |
StreamBuffer & | insert (long pos, char c) |
StreamBuffer & | printf (const char *fmt,...) __attribute__((format(printf |
StreamBuffer long | find (char c, long start=0) const |
long | find (const void *s, long size, long start=0) const |
long | find (const char *s, long start=0) const |
long int | find (const StreamBuffer &s, long start=0) const |
bool | startswith (const void *s, long size) const |
bool | startswith (const char *s) const |
StreamBuffer | expand (long start, long length) const |
StreamBuffer | expand (long start=0) const |
StreamBuffer | dump () const |
Private Member Functions | |
void | init (const void *s, long minsize) |
void | check (long size) |
void | grow (long minsize) |
Private Attributes | |
char | local [64] |
long | len |
long | cap |
long | offs |
char * | buffer |
Definition at line 30 of file StreamBuffer.h.
StreamBuffer::StreamBuffer | ( | ) | [inline] |
Definition at line 55 of file StreamBuffer.h.
References init().
StreamBuffer::StreamBuffer | ( | const void * | s, | |
long | size | |||
) | [inline] |
Definition at line 58 of file StreamBuffer.h.
References init().
StreamBuffer::StreamBuffer | ( | const char * | s | ) | [inline] |
Definition at line 61 of file StreamBuffer.h.
References init().
StreamBuffer::StreamBuffer | ( | const StreamBuffer & | s | ) | [inline] |
StreamBuffer::StreamBuffer | ( | long | size | ) | [inline] |
Definition at line 67 of file StreamBuffer.h.
References init().
StreamBuffer::~StreamBuffer | ( | ) | [inline] |
Definition at line 70 of file StreamBuffer.h.
StreamBuffer& StreamBuffer::append | ( | char | c | ) | [inline] |
Definition at line 113 of file StreamBuffer.h.
References buffer, check(), len, and offs.
Referenced by operator+=(), and set().
StreamBuffer& StreamBuffer::append | ( | const void * | s, | |
long | size | |||
) |
StreamBuffer& StreamBuffer::append | ( | const char * | s | ) | [inline] |
StreamBuffer& StreamBuffer::append | ( | const StreamBuffer & | s | ) | [inline] |
StreamBuffer& StreamBuffer::append | ( | char | c, | |
long | count | |||
) | [inline] |
Definition at line 116 of file StreamBuffer.h.
References buffer, check(), len, offs, and truncate().
long StreamBuffer::capacity | ( | ) | const [inline] |
Definition at line 96 of file StreamBuffer.h.
References cap.
void StreamBuffer::check | ( | long | size | ) | [inline, private] |
StreamBuffer& StreamBuffer::clear | ( | ) | [inline] |
StreamBuffer StreamBuffer::dump | ( | ) | const |
const char* StreamBuffer::end | ( | ) | const [inline] |
Definition at line 100 of file StreamBuffer.h.
StreamBuffer StreamBuffer::expand | ( | long | start = 0 |
) | const [inline] |
Definition at line 223 of file StreamBuffer.h.
Referenced by expand().
StreamBuffer StreamBuffer::expand | ( | long | start, | |
long | length | |||
) | const |
StreamBuffer long StreamBuffer::find | ( | char | c, | |
long | start = 0 | |||
) | const [inline] |
Definition at line 196 of file StreamBuffer.h.
long StreamBuffer::find | ( | const void * | s, | |
long | size, | |||
long | start = 0 | |||
) | const |
long StreamBuffer::find | ( | const char * | s, | |
long | start = 0 | |||
) | const [inline] |
long int StreamBuffer::find | ( | const StreamBuffer & | s, | |
long | start = 0 | |||
) | const [inline] |
void StreamBuffer::grow | ( | long | minsize | ) | [private] |
Referenced by check().
void StreamBuffer::init | ( | const void * | s, | |
long | minsize | |||
) | [private] |
Referenced by StreamBuffer().
StreamBuffer& StreamBuffer::insert | ( | long | pos, | |
const StreamBuffer & | s | |||
) | [inline] |
StreamBuffer& StreamBuffer::insert | ( | long | pos, | |
const void * | s, | |||
long | size | |||
) | [inline] |
Definition at line 180 of file StreamBuffer.h.
References replace().
StreamBuffer& StreamBuffer::insert | ( | long | pos, | |
const char * | s | |||
) | [inline] |
Definition at line 183 of file StreamBuffer.h.
References replace().
StreamBuffer& StreamBuffer::insert | ( | long | pos, | |
char | c | |||
) | [inline] |
Definition at line 189 of file StreamBuffer.h.
References replace().
long StreamBuffer::length | ( | ) | const [inline] |
StreamBuffer::operator bool | ( | ) | const [inline] |
Definition at line 88 of file StreamBuffer.h.
References len.
const char* StreamBuffer::operator() | ( | long | index = 0 |
) | const [inline] |
Definition at line 74 of file StreamBuffer.h.
char* StreamBuffer::operator() | ( | long | index = 0 |
) | [inline] |
Definition at line 77 of file StreamBuffer.h.
StreamBuffer& StreamBuffer::operator+= | ( | char | c | ) | [inline] |
Definition at line 130 of file StreamBuffer.h.
References append().
StreamBuffer& StreamBuffer::operator+= | ( | const StreamBuffer & | s | ) | [inline] |
Definition at line 136 of file StreamBuffer.h.
References append().
StreamBuffer& StreamBuffer::operator+= | ( | const char * | s | ) | [inline] |
Definition at line 133 of file StreamBuffer.h.
References append().
StreamBuffer& StreamBuffer::operator= | ( | const char * | s | ) | [inline] |
Definition at line 150 of file StreamBuffer.h.
StreamBuffer& StreamBuffer::operator= | ( | const StreamBuffer & | s | ) | [inline] |
Definition at line 153 of file StreamBuffer.h.
char StreamBuffer::operator[] | ( | long | index | ) | const [inline] |
Definition at line 81 of file StreamBuffer.h.
char& StreamBuffer::operator[] | ( | long | index | ) | [inline] |
Definition at line 84 of file StreamBuffer.h.
StreamBuffer& StreamBuffer::printf | ( | const char * | fmt, | |
... | ||||
) |
StreamBuffer& StreamBuffer::remove | ( | long | length | ) | [inline] |
Definition at line 171 of file StreamBuffer.h.
StreamBuffer& StreamBuffer::remove | ( | long | pos, | |
long | length | |||
) | [inline] |
Definition at line 167 of file StreamBuffer.h.
StreamBuffer& StreamBuffer::replace | ( | long | pos, | |
long | length, | |||
const StreamBuffer & | s | |||
) | [inline] |
StreamBuffer& StreamBuffer::replace | ( | long | pos, | |
long | length, | |||
const void * | s, | |||
long | size | |||
) |
Referenced by insert(), remove(), and truncate().
StreamBuffer& StreamBuffer::replace | ( | long | pos, | |
long | length, | |||
const char * | s | |||
) | [inline] |
char* StreamBuffer::reserve | ( | long | size | ) | [inline] |
StreamBuffer& StreamBuffer::set | ( | const StreamBuffer & | s | ) | [inline] |
Definition at line 146 of file StreamBuffer.h.
StreamBuffer& StreamBuffer::set | ( | const char * | s | ) | [inline] |
Definition at line 143 of file StreamBuffer.h.
StreamBuffer& StreamBuffer::set | ( | const void * | s, | |
long | size | |||
) | [inline] |
Definition at line 140 of file StreamBuffer.h.
bool StreamBuffer::startswith | ( | const char * | s | ) | const [inline] |
Definition at line 216 of file StreamBuffer.h.
bool StreamBuffer::startswith | ( | const void * | s, | |
long | size | |||
) | const [inline] |
Definition at line 212 of file StreamBuffer.h.
StreamBuffer& StreamBuffer::truncate | ( | long | pos | ) | [inline] |
Definition at line 176 of file StreamBuffer.h.
References len, and replace().
Referenced by append().
char* StreamBuffer::buffer [private] |
Definition at line 36 of file StreamBuffer.h.
Referenced by append(), end(), find(), insert(), operator()(), operator[](), replace(), reserve(), startswith(), StreamBuffer(), and ~StreamBuffer().
long StreamBuffer::cap [private] |
Definition at line 34 of file StreamBuffer.h.
Referenced by capacity(), and check().
long StreamBuffer::len [private] |
Definition at line 33 of file StreamBuffer.h.
Referenced by append(), check(), clear(), end(), expand(), find(), insert(), length(), operator bool(), operator()(), operator[](), remove(), replace(), reserve(), startswith(), StreamBuffer(), and truncate().
char StreamBuffer::local[64] [private] |
Definition at line 32 of file StreamBuffer.h.
Referenced by ~StreamBuffer().
long StreamBuffer::offs [private] |
Definition at line 35 of file StreamBuffer.h.
Referenced by append(), check(), clear(), end(), find(), insert(), operator()(), operator[](), remove(), replace(), reserve(), startswith(), and StreamBuffer().