#include <ut_stringbuf.h>
Public Member Functions | |
UT_StringImpl () | |
UT_StringImpl (const UT_StringImpl< char_type > &rhs) | |
UT_StringImpl (const char_type *sz, size_t n) | |
UT_StringImpl (const std::basic_string< char_type > &s) | |
~UT_StringImpl () | |
void | operator= (const UT_StringImpl< char_type > &rhs) |
void | assign (const char_type *sz, size_t n) |
void | append (const char_type *sz, size_t n) |
void | append (const UT_StringImpl< char_type > &rhs) |
void | swap (UT_StringImpl< char_type > &rhs) |
void | clear () |
void | reserve (size_t n) |
bool | empty () const |
size_t | size () const |
size_t | capacity () const |
const char_type * | data () const |
char_type * | data () |
const char * | utf8_data () |
return the utf8 content. | |
Private Member Functions | |
void | grow_nocopy (size_t n) |
void | grow_copy (size_t n) |
void | grow_common (size_t n, bool bCopy) |
Static Private Member Functions | |
static void | copy (char_type *pDest, const char_type *pSrc, size_t n) |
Private Attributes | |
char_type * | m_psz |
char_type * | m_pEnd |
size_t | m_size |
char * | m_utf8string |
UT_StringImpl< char_type >::UT_StringImpl | ( | ) |
UT_StringImpl< char_type >::UT_StringImpl | ( | const UT_StringImpl< char_type > & | rhs | ) |
UT_StringImpl< char_type >::UT_StringImpl | ( | const char_type * | sz, | |
size_t | n | |||
) |
References UT_StringImpl< char_type >::copy(), and UT_StringImpl< char_type >::m_psz.
UT_StringImpl< char_type >::UT_StringImpl | ( | const std::basic_string< char_type > & | s | ) |
References UT_StringImpl< char_type >::m_psz.
UT_StringImpl< char_type >::~UT_StringImpl | ( | ) |
References UT_StringImpl< char_type >::clear().
void UT_StringImpl< char_type >::append | ( | const char_type * | sz, | |
size_t | n | |||
) |
References UT_StringImpl< char_type >::assign(), UT_StringImpl< char_type >::capacity(), UT_StringImpl< char_type >::copy(), UT_StringImpl< char_type >::grow_copy(), UT_StringImpl< char_type >::m_pEnd, UT_StringImpl< char_type >::m_psz, and UT_StringImpl< char_type >::size().
Referenced by UT_UCS4String::_loadUtf8(), UT_StringImpl< char_type >::append(), UT_UCS4String::operator+=(), UT_String::operator+=(), and UT_UCS4String::UT_UCS4String().
void UT_StringImpl< char_type >::append | ( | const UT_StringImpl< char_type > & | rhs | ) |
void UT_StringImpl< char_type >::assign | ( | const char_type * | sz, | |
size_t | n | |||
) |
References UT_StringImpl< char_type >::capacity(), UT_StringImpl< char_type >::clear(), UT_StringImpl< char_type >::copy(), UT_StringImpl< char_type >::grow_nocopy(), UT_StringImpl< char_type >::m_pEnd, UT_StringImpl< char_type >::m_psz, and UT_StringImpl< char_type >::m_utf8string.
Referenced by UT_StringImpl< char_type >::append(), UT_StringImpl< char_type >::operator=(), UT_UCS4String::operator=(), and UT_String::operator=().
size_t UT_StringImpl< char_type >::capacity | ( | ) | const [inline] |
void UT_StringImpl< char_type >::clear | ( | void | ) |
References UT_StringImpl< char_type >::m_pEnd, UT_StringImpl< char_type >::m_psz, UT_StringImpl< char_type >::m_size, and UT_StringImpl< char_type >::m_utf8string.
Referenced by UT_StringImpl< char_type >::assign(), UT_UCS4String::clear(), UT_String::clear(), UT_StringImpl< char_type >::operator=(), UT_String::operator=(), and UT_StringImpl< char_type >::~UT_StringImpl().
void UT_StringImpl< char_type >::copy | ( | char_type * | pDest, | |
const char_type * | pSrc, | |||
size_t | n | |||
) | [static, private] |
const char_type* UT_StringImpl< char_type >::data | ( | ) | const [inline] |
char_type* UT_StringImpl< char_type >::data | ( | ) | [inline] |
bool UT_StringImpl< char_type >::empty | ( | ) | const [inline] |
Referenced by UT_UCS4String::empty(), and UT_String::empty().
void UT_StringImpl< char_type >::grow_common | ( | size_t | n, | |
bool | bCopy | |||
) | [private] |
References UT_StringImpl< char_type >::capacity(), UT_StringImpl< char_type >::copy(), g_rGrowBy, UT_StringImpl< char_type >::m_pEnd, UT_StringImpl< char_type >::m_psz, UT_StringImpl< char_type >::m_size, UT_StringImpl< char_type >::m_utf8string, and UT_StringImpl< char_type >::size().
Referenced by UT_StringImpl< char_type >::grow_copy(), and UT_StringImpl< char_type >::grow_nocopy().
void UT_StringImpl< char_type >::grow_copy | ( | size_t | n | ) | [private] |
References UT_StringImpl< char_type >::grow_common().
Referenced by UT_StringImpl< char_type >::append().
void UT_StringImpl< char_type >::grow_nocopy | ( | size_t | n | ) | [private] |
References UT_StringImpl< char_type >::grow_common().
Referenced by UT_StringImpl< char_type >::assign(), and UT_StringImpl< char_type >::reserve().
void UT_StringImpl< char_type >::operator= | ( | const UT_StringImpl< char_type > & | rhs | ) |
void UT_StringImpl< char_type >::reserve | ( | size_t | n | ) |
References UT_StringImpl< char_type >::grow_nocopy().
Referenced by UT_UCS4String::reserve(), and UT_String::reserve().
size_t UT_StringImpl< char_type >::size | ( | ) | const [inline] |
Referenced by UT_StringImpl< char_type >::append(), UT_UCS4String::begin(), UT_String::c_str(), UT_StringImpl< char_type >::grow_common(), UT_StringImpl< char_type >::operator=(), UT_UCS4String::size(), UT_String::size(), UT_UCS4String::substr(), UT_String::substr(), UT_UCS4String::ucs4_str(), UT_StringImpl< UT_UCS4Char >::utf8_data(), and UT_UCS4String::utf8_str().
void UT_StringImpl< char_type >::swap | ( | UT_StringImpl< char_type > & | rhs | ) |
const char * UT_StringImpl< char_type >::utf8_data | ( | ) |
return the utf8 content.
Only for UCS4Char
References UT_ASSERT, and UT_SHOULD_NOT_HAPPEN.
Referenced by UT_UCS4String::utf8_str().
char_type* UT_StringImpl< char_type >::m_pEnd [private] |
char_type* UT_StringImpl< char_type >::m_psz [private] |
Referenced by UT_StringImpl< char_type >::append(), UT_StringImpl< char_type >::assign(), UT_StringImpl< char_type >::clear(), UT_StringImpl< char >::data(), UT_StringImpl< char >::empty(), UT_StringImpl< char_type >::grow_common(), UT_StringImpl< char_type >::operator=(), UT_StringImpl< char >::size(), UT_StringImpl< char_type >::swap(), UT_StringImpl< char_type >::UT_StringImpl(), and UT_StringImpl< UT_UCS4Char >::utf8_data().
size_t UT_StringImpl< char_type >::m_size [private] |
char* UT_StringImpl< char_type >::m_utf8string [private] |