#include <stringbuffer.h>
Public Member Functions | |
| StringBuffer () | |
| StringBuffer (int capacity) | |
| virtual | ~StringBuffer () |
| StringBuffer & | operator<< (String other) |
| StringBuffer & | operator<< (Ref< StringBuffer > other) |
| StringBuffer & | operator<< (const char *str) |
| StringBuffer & | operator<< (signed char *str) |
| StringBuffer & | operator<< (signed char chr) |
| StringBuffer & | operator<< (char chr) |
| StringBuffer & | operator<< (int x) |
| StringBuffer & | operator<< (unsigned int x) |
| void | concat (Ref< StringBuffer > other, int offset=0) |
| void | concat (char *str, int length) |
| int | length () |
| int | getCapacity () |
| void | setLength (int newLength) |
| char * | c_str (int offset=0) |
| String | toString () |
| String | toString (int offset) |
| void | clear () |
| void | ensureCapacity (int neededCapacity) |
| void | setCharAt (int index, char c) |
| void | retain () |
| void | release () |
| int | getRefCount () |
Static Public Member Functions | |
| static void * | operator new (size_t size) |
| static void | operator delete (void *ptr) |
Protected Member Functions | |
| void | addCapacity (int increment) |
Protected Attributes | |
| char * | data |
| int | capacity |
| int | len |
| mt_atomic_t | _ref_count |
| pthread_mutex_t | mutex |
Definition at line 43 of file stringbuffer.h.
| StringBuffer::StringBuffer | ( | ) |
Definition at line 45 of file stringbuffer.cc.
References capacity, data, DEFAULT_STRINGBUFFER_CAPACITY, len, and MALLOC.
| StringBuffer::StringBuffer | ( | int | capacity | ) |
Definition at line 53 of file stringbuffer.cc.
| StringBuffer::~StringBuffer | ( | ) | [virtual] |
Definition at line 61 of file stringbuffer.cc.
| void zmm::StringBuffer::addCapacity | ( | int | increment | ) | [inline, protected] |
Definition at line 76 of file stringbuffer.h.
References ensureCapacity(), and len.
Referenced by concat(), and operator<<().
| char * StringBuffer::c_str | ( | int | offset = 0 |
) |
Definition at line 175 of file stringbuffer.cc.
References _, _Exception, data, and len.
| void StringBuffer::clear | ( | ) |
Definition at line 201 of file stringbuffer.cc.
| void StringBuffer::concat | ( | char * | str, | |
| int | length | |||
| ) |
Definition at line 150 of file stringbuffer.cc.
References addCapacity(), data, and len.
| void StringBuffer::concat | ( | Ref< StringBuffer > | other, | |
| int | offset = 0 | |||
| ) |
Definition at line 136 of file stringbuffer.cc.
References _, _Exception, addCapacity(), data, and len.
| void StringBuffer::ensureCapacity | ( | int | neededCapacity | ) |
Definition at line 207 of file stringbuffer.cc.
References capacity, data, REALLOC, and STRINGBUFFER_CAPACITY_INCREMENT.
Referenced by addCapacity(), and setLength().
| int zmm::StringBuffer::getCapacity | ( | ) | [inline] |
Definition at line 66 of file stringbuffer.h.
References capacity.
| int Object::getRefCount | ( | ) | [inherited] |
Definition at line 78 of file object.cc.
References zmm::Object::_ref_count, and atomic_get().
| int StringBuffer::length | ( | ) |
Definition at line 161 of file stringbuffer.cc.
References len.
| void Object::operator delete | ( | void * | ptr | ) | [static, inherited] |
| void * Object::operator new | ( | size_t | size | ) | [static, inherited] |
| StringBuffer & StringBuffer::operator<< | ( | unsigned int | x | ) |
Definition at line 127 of file stringbuffer.cc.
References addCapacity(), data, len, and MAX_INT_STRING_LENGTH.
| StringBuffer & StringBuffer::operator<< | ( | int | x | ) |
Definition at line 118 of file stringbuffer.cc.
References addCapacity(), data, len, and MAX_INT_STRING_LENGTH.
| StringBuffer & StringBuffer::operator<< | ( | char | chr | ) |
Definition at line 104 of file stringbuffer.cc.
References addCapacity(), data, and len.
| StringBuffer & StringBuffer::operator<< | ( | signed char | chr | ) |
Definition at line 113 of file stringbuffer.cc.
References operator<<().
| StringBuffer & StringBuffer::operator<< | ( | signed char * | str | ) |
Definition at line 99 of file stringbuffer.cc.
References operator<<().
| StringBuffer & StringBuffer::operator<< | ( | const char * | str | ) |
Definition at line 85 of file stringbuffer.cc.
References addCapacity(), data, and len.
| StringBuffer & StringBuffer::operator<< | ( | Ref< StringBuffer > | other | ) |
Definition at line 78 of file stringbuffer.cc.
| StringBuffer & StringBuffer::operator<< | ( | String | other | ) |
Definition at line 66 of file stringbuffer.cc.
References addCapacity(), zmm::String::base, zmm::StringBase::data, data, len, and zmm::String::length().
Referenced by operator<<().
| void Object::release | ( | ) | [inherited] |
Definition at line 66 of file object.cc.
References zmm::Object::_ref_count, atomic_dec(), and zmm::Object::mutex.
Referenced by zmm::ArrayBase::clear(), zmm::String::operator=(), DSOHash< zmm::Array< CacheObject > >::releaseData(), DSBHash< VT >::releaseData(), DSOHash< zmm::Array< CacheObject > >::remove(), zmm::ArrayBase::remove(), zmm::ArrayBase::removeUnordered(), zmm::ArrayBase::set(), zmm::ArrayBase::~ArrayBase(), DSOHash< zmm::Array< CacheObject > >::~DSOHash(), zmm::ObjectQueue< AutoscanDirectory >::~ObjectQueue(), zmm::ObjectStack< Element >::~ObjectStack(), and zmm::String::~String().
| void Object::retain | ( | ) | [inherited] |
Definition at line 58 of file object.cc.
References zmm::Object::_ref_count, atomic_inc(), and zmm::Object::mutex.
Referenced by zmm::ArrayBase::append(), zmm::ObjectQueue< AutoscanDirectory >::enqueue(), zmm::ArrayBase::insert(), zmm::String::operator=(), zmm::ObjectStack< Element >::push(), DSOHash< zmm::Array< CacheObject > >::put(), DSBHash< VT >::put(), zmm::ArrayBase::set(), and zmm::String::String().
| void StringBuffer::setCharAt | ( | int | index, | |
| char | c | |||
| ) |
Definition at line 194 of file stringbuffer.cc.
References _, _Exception, data, and len.
| void StringBuffer::setLength | ( | int | newLength | ) |
Definition at line 166 of file stringbuffer.cc.
References data, ensureCapacity(), and len.
| String StringBuffer::toString | ( | int | offset | ) |
Definition at line 187 of file stringbuffer.cc.
References _, _Exception, data, and len.
| String StringBuffer::toString | ( | ) |
Definition at line 182 of file stringbuffer.cc.
mt_atomic_t zmm::Object::_ref_count [protected, inherited] |
Definition at line 54 of file object.h.
Referenced by zmm::Object::getRefCount(), zmm::Object::Object(), zmm::Object::release(), and zmm::Object::retain().
int zmm::StringBuffer::capacity [protected] |
Definition at line 47 of file stringbuffer.h.
Referenced by ensureCapacity(), getCapacity(), and StringBuffer().
char* zmm::StringBuffer::data [protected] |
Definition at line 46 of file stringbuffer.h.
Referenced by c_str(), clear(), concat(), ensureCapacity(), operator<<(), setCharAt(), setLength(), StringBuffer(), toString(), and ~StringBuffer().
int zmm::StringBuffer::len [protected] |
Definition at line 48 of file stringbuffer.h.
Referenced by addCapacity(), c_str(), clear(), concat(), length(), operator<<(), setCharAt(), setLength(), StringBuffer(), and toString().
pthread_mutex_t zmm::Object::mutex [protected, inherited] |
Reimplemented in AutoscanList, AutoscanInotify, CachedURL, Dictionary_r, DVDNavReader, IOHandlerBufferHelper, ReentrantArray< T >, SingletonManager, Singleton< T >, StorageCache, MutexAutolock, Cond, ThreadExecutor, Singleton< UpdateManager >, Singleton< Timer >, Singleton< ContentDirectoryService >, Singleton< ConfigManager >, Singleton< Server >, Singleton< Runtime >, Singleton< ContentManager >, Singleton< ConnectionManagerService >, Singleton< PlayHook >, Singleton< Storage >, and Singleton< SessionManager >.
Definition at line 56 of file object.h.
Referenced by zmm::Object::Object(), zmm::Object::release(), zmm::Object::retain(), and zmm::Object::~Object().
1.6.1