|
blocxx
|
#include <StringBuffer.hpp>
Public Member Functions | |
| StringBuffer (size_t allocSize=BLOCXX_DEFAULT_ALLOCATION_UNIT) | |
| StringBuffer (const char *arg) | |
| StringBuffer (const String &arg) | |
| StringBuffer (const StringBuffer &arg) | |
| ~StringBuffer () | |
| StringBuffer & | operator= (const StringBuffer &arg) |
| StringBuffer & | operator= (const String &arg) |
| StringBuffer & | operator= (const char *str) |
| void | swap (StringBuffer &x) |
| StringBuffer & | append (char c) |
| StringBuffer & | append (const char *str) |
| StringBuffer & | append (const char *str, const size_t len) |
| StringBuffer & | append (const String &arg) |
| StringBuffer & | append (const StringBuffer &arg) |
| StringBuffer & | operator+= (char c) |
| StringBuffer & | operator+= (Char16 c) |
| StringBuffer & | operator+= (const char *str) |
| StringBuffer & | operator+= (const String &arg) |
| StringBuffer & | operator+= (Bool v) |
| StringBuffer & | operator+= (UInt8 v) |
| StringBuffer & | operator+= (Int8 v) |
| StringBuffer & | operator+= (UInt16 v) |
| StringBuffer & | operator+= (Int16 v) |
| StringBuffer & | operator+= (UInt32 v) |
| StringBuffer & | operator+= (Int32 v) |
| StringBuffer & | operator+= (UInt64 v) |
| StringBuffer & | operator+= (Int64 v) |
| StringBuffer & | operator+= (Real32 v) |
| StringBuffer & | operator+= (Real64 v) |
| StringBuffer & | operator+= (const StringBuffer &arg) |
| char | operator[] (size_t ndx) const |
| String | toString () const |
| String | releaseString () |
| size_t | length () const |
| void | truncate (size_t index) |
| Truncate the string at the given index. More... | |
| const char * | getLine (std::istream &is, bool resetBuffer=true) |
| Fill this StringBuffer object with the next line from the given input stream. More... | |
| bool | endsWith (char ch) const |
| bool | startsWith (char ch) const |
| void | chop () |
| void | trim () |
| size_t | allocated () const |
| void | reset () |
| const char * | c_str () const |
| bool | equals (const char *arg) const |
| bool | equals (const StringBuffer &arg) const |
Static Public Attributes | |
| static const size_t | BLOCXX_DEFAULT_ALLOCATION_UNIT = 128 |
Private Member Functions | |
| void | checkAvail (size_t len=1) |
Private Attributes | |
| size_t | m_len |
| size_t | m_allocated |
| char * | m_bfr |
Friends | |
| BLOCXX_COMMON_API std::ostream & | operator<< (std::ostream &ostr, const StringBuffer &b) |
Definition at line 81 of file StringBuffer.hpp.
| BLOCXX_NAMESPACE::StringBuffer::StringBuffer | ( | size_t | allocSize = BLOCXX_DEFAULT_ALLOCATION_UNIT | ) |
Definition at line 92 of file StringBuffer.cpp.
| BLOCXX_NAMESPACE::StringBuffer::StringBuffer | ( | const char * | arg | ) |
Definition at line 100 of file StringBuffer.cpp.
References swap().
| BLOCXX_NAMESPACE::StringBuffer::StringBuffer | ( | const String & | arg | ) |
Definition at line 108 of file StringBuffer.cpp.
References swap().
| BLOCXX_NAMESPACE::StringBuffer::StringBuffer | ( | const StringBuffer & | arg | ) |
Definition at line 116 of file StringBuffer.cpp.
References m_allocated, m_bfr, m_len, and BLOCXX_NAMESPACE::swap().
|
inline |
Definition at line 123 of file StringBuffer.hpp.
References BLOCXX_NAMESPACE::String::E_TAKE_OWNERSHIP.
|
inline |
Definition at line 212 of file StringBuffer.hpp.
|
inline |
Definition at line 128 of file StringBuffer.hpp.
Referenced by BLOCXX_NAMESPACE::LogMessagePatternFormatterImpl::Formatting::Formatting(), and BLOCXX_NAMESPACE::OStringStreamBuf::~OStringStreamBuf().
|
inline |
Definition at line 135 of file StringBuffer.hpp.
| StringBuffer & BLOCXX_NAMESPACE::StringBuffer::append | ( | const char * | str, |
| const size_t | len | ||
| ) |
Definition at line 314 of file StringBuffer.cpp.
|
inline |
Definition at line 144 of file StringBuffer.hpp.
|
inline |
Definition at line 146 of file StringBuffer.hpp.
|
inline |
Definition at line 214 of file StringBuffer.hpp.
|
inlineprivate |
Definition at line 219 of file StringBuffer.hpp.
| void BLOCXX_NAMESPACE::StringBuffer::chop | ( | ) |
Definition at line 352 of file StringBuffer.cpp.
| bool BLOCXX_NAMESPACE::StringBuffer::endsWith | ( | char | ch | ) | const |
Definition at line 338 of file StringBuffer.cpp.
| bool BLOCXX_NAMESPACE::StringBuffer::equals | ( | const char * | arg | ) | const |
Definition at line 324 of file StringBuffer.cpp.
| bool BLOCXX_NAMESPACE::StringBuffer::equals | ( | const StringBuffer & | arg | ) | const |
Definition at line 331 of file StringBuffer.cpp.
| const char * BLOCXX_NAMESPACE::StringBuffer::getLine | ( | std::istream & | is, |
| bool | resetBuffer = true |
||
| ) |
Fill this StringBuffer object with the next line from the given input stream.
| is | The input stream to retrieve the next line from |
Definition at line 392 of file StringBuffer.cpp.
Referenced by BLOCXX_NAMESPACE::String::getLine().
|
inline |
Definition at line 188 of file StringBuffer.hpp.
Referenced by BLOCXX_NAMESPACE::LogMessagePatternFormatterImpl::Formatting::Formatting().
| StringBuffer & BLOCXX_NAMESPACE::StringBuffer::operator+= | ( | Bool | v | ) |
Definition at line 179 of file StringBuffer.cpp.
|
inline |
Definition at line 150 of file StringBuffer.hpp.
|
inline |
Definition at line 152 of file StringBuffer.hpp.
|
inline |
Definition at line 154 of file StringBuffer.hpp.
|
inline |
Definition at line 156 of file StringBuffer.hpp.
|
inline |
Definition at line 174 of file StringBuffer.hpp.
| StringBuffer & BLOCXX_NAMESPACE::StringBuffer::operator+= | ( | Int16 | v | ) |
Definition at line 212 of file StringBuffer.cpp.
| StringBuffer & BLOCXX_NAMESPACE::StringBuffer::operator+= | ( | Int32 | v | ) |
Definition at line 228 of file StringBuffer.cpp.
| StringBuffer & BLOCXX_NAMESPACE::StringBuffer::operator+= | ( | Int64 | v | ) |
Definition at line 266 of file StringBuffer.cpp.
| StringBuffer & BLOCXX_NAMESPACE::StringBuffer::operator+= | ( | Int8 | v | ) |
Definition at line 196 of file StringBuffer.cpp.
| StringBuffer & BLOCXX_NAMESPACE::StringBuffer::operator+= | ( | Real32 | v | ) |
Definition at line 279 of file StringBuffer.cpp.
| StringBuffer & BLOCXX_NAMESPACE::StringBuffer::operator+= | ( | Real64 | v | ) |
Definition at line 295 of file StringBuffer.cpp.
| StringBuffer & BLOCXX_NAMESPACE::StringBuffer::operator+= | ( | UInt16 | v | ) |
Definition at line 204 of file StringBuffer.cpp.
| StringBuffer & BLOCXX_NAMESPACE::StringBuffer::operator+= | ( | UInt32 | v | ) |
Definition at line 220 of file StringBuffer.cpp.
| StringBuffer & BLOCXX_NAMESPACE::StringBuffer::operator+= | ( | UInt64 | v | ) |
Definition at line 254 of file StringBuffer.cpp.
| StringBuffer & BLOCXX_NAMESPACE::StringBuffer::operator+= | ( | UInt8 | v | ) |
Definition at line 188 of file StringBuffer.cpp.
| StringBuffer & BLOCXX_NAMESPACE::StringBuffer::operator= | ( | const char * | str | ) |
Definition at line 131 of file StringBuffer.cpp.
| StringBuffer & BLOCXX_NAMESPACE::StringBuffer::operator= | ( | const String & | arg | ) |
Definition at line 124 of file StringBuffer.cpp.
| StringBuffer & BLOCXX_NAMESPACE::StringBuffer::operator= | ( | const StringBuffer & | arg | ) |
Definition at line 138 of file StringBuffer.cpp.
| char BLOCXX_NAMESPACE::StringBuffer::operator[] | ( | size_t | ndx | ) | const |
Definition at line 172 of file StringBuffer.cpp.
|
inline |
Definition at line 182 of file StringBuffer.hpp.
Referenced by BLOCXX_NAMESPACE::String::getLine(), and BLOCXX_NAMESPACE::String::String().
| void BLOCXX_NAMESPACE::StringBuffer::reset | ( | ) |
Definition at line 153 of file StringBuffer.cpp.
Referenced by BLOCXX_NAMESPACE::OStringStreamBuf::OStringStreamBuf().
| bool BLOCXX_NAMESPACE::StringBuffer::startsWith | ( | char | ch | ) | const |
Definition at line 345 of file StringBuffer.cpp.
| void BLOCXX_NAMESPACE::StringBuffer::swap | ( | StringBuffer & | x | ) |
Definition at line 145 of file StringBuffer.cpp.
Referenced by StringBuffer().
|
inline |
Definition at line 179 of file StringBuffer.hpp.
| void BLOCXX_NAMESPACE::StringBuffer::trim | ( | ) |
Definition at line 362 of file StringBuffer.cpp.
| void BLOCXX_NAMESPACE::StringBuffer::truncate | ( | size_t | index | ) |
Truncate the string at the given index.
This doesn't change anything before the given index and does not free up any memory.
| index | The index to truncate the string buffer at. If this value is greater than the current length of the StringBuffer, then nothing is done. |
Definition at line 161 of file StringBuffer.cpp.
Referenced by BLOCXX_NAMESPACE::LogMessagePatternFormatter::Converter::Converter().
|
friend |
Definition at line 435 of file StringBuffer.cpp.
|
static |
Definition at line 117 of file StringBuffer.hpp.
|
private |
Definition at line 234 of file StringBuffer.hpp.
Referenced by StringBuffer().
|
private |
Definition at line 235 of file StringBuffer.hpp.
Referenced by StringBuffer().
|
private |
Definition at line 233 of file StringBuffer.hpp.
Referenced by StringBuffer().
1.8.18