#include <scfx_string.h>
Public メソッド | |
scfx_string () | |
~scfx_string () | |
int | length () const |
void | clear () |
char & | operator[] (int) |
void | append (int) |
void | discard (int) |
void | remove (int) |
void | operator+= (char) |
void | operator+= (const char *) |
operator const char * () | |
Private メソッド | |
void | resize (std::size_t) |
Private 変数 | |
std::size_t | m_len |
std::size_t | m_alloc |
char * | m_buffer |
scfx_string.h の 75 行で定義されています。
sc_dt::scfx_string::scfx_string | ( | ) | [inline] |
sc_dt::scfx_string::~scfx_string | ( | ) | [inline] |
void sc_dt::scfx_string::resize | ( | std::size_t | i | ) | [inline, private] |
scfx_string.h の 112 行で定義されています。
00113 { 00114 do { 00115 m_alloc *= 2; 00116 } while( i >= m_alloc ); 00117 00118 char* temp = new char[m_alloc]; 00119 00120 for( int j = 0; j < (int) m_len; ++ j ) { 00121 temp[j] = m_buffer[j]; 00122 } 00123 temp[m_len] = 0; 00124 00125 delete [] m_buffer; 00126 m_buffer = temp; 00127 }
int sc_dt::scfx_string::length | ( | ) | const [inline] |
void sc_dt::scfx_string::clear | ( | ) | [inline] |
char & sc_dt::scfx_string::operator[] | ( | int | i | ) | [inline] |
scfx_string.h の 164 行で定義されています。
00165 { 00166 if( i >= (int) m_alloc ) { 00167 resize( i ); 00168 } 00169 return m_buffer[i]; 00170 }
void sc_dt::scfx_string::append | ( | int | n | ) | [inline] |
void sc_dt::scfx_string::discard | ( | int | n | ) | [inline] |
void sc_dt::scfx_string::remove | ( | int | i | ) | [inline] |
void sc_dt::scfx_string::operator+= | ( | char | c | ) | [inline] |
scfx_string.h の 202 行で定義されています。
00203 { 00204 this->operator [] ( m_len ) = c; 00205 m_len ++; 00206 this->operator [] ( m_len ) = 0; 00207 }
void sc_dt::scfx_string::operator+= | ( | const char * | s | ) | [inline] |
sc_dt::scfx_string::operator const char * | ( | ) | [inline] |
std::size_t sc_dt::scfx_string::m_len [private] |
scfx_string.h の 102 行で定義されています。
std::size_t sc_dt::scfx_string::m_alloc [private] |
scfx_string.h の 103 行で定義されています。
char* sc_dt::scfx_string::m_buffer [private] |
scfx_string.h の 104 行で定義されています。