version 1.4, 2006/01/30 16:16:46
|
version 1.5, 2006/05/19 21:22:10
|
|
|
| |
size_t capacity() const; | size_t capacity() const; |
| |
|
/** |
|
Returns a pointer to a character buffer with the Buffer contents. |
|
The character buffer is null-terminated even if the Buffer contents |
|
do not include a null termination character. |
|
*/ |
const char* getData() const; | const char* getData() const; |
| |
char get(size_t i) const; | char get(size_t i) const; |
|
|
| |
inline const char* Buffer::getData() const | inline const char* Buffer::getData() const |
{ | { |
|
if (_rep->size == _rep->cap) |
|
{ |
|
const_cast<Buffer*>(this)->_append_char_aux(); |
|
} |
|
|
|
_rep->data[_rep->size] = '\0'; |
|
|
return _rep->data; | return _rep->data; |
} | } |
| |