Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

skAsciiStringBuffer.h

00001 /*
00002   Copyright 1996-2003
00003   Simon Whiteside
00004 
00005     This library is free software; you can redistribute it and/or
00006     modify it under the terms of the GNU Lesser General Public
00007     License as published by the Free Software Foundation; either
00008     version 2 of the License, or (at your option) any later version.
00009 
00010     This library is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013     Lesser General Public License for more details.
00014 
00015     You should have received a copy of the GNU Lesser General Public
00016     License along with this library; if not, write to the Free Software
00017     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018 
00019 * $Id: skAsciiStringBuffer_8h-source.html,v 1.14 2004/12/17 21:31:14 sdw Exp $
00020 */
00021 
00022 
00023 #ifndef skASCIISTRINGBUFFER_H
00024 #define skASCIISTRINGBUFFER_H
00025 
00026 #include "skAsciiString.h"
00027 
00031 class skAsciiStringBuffer 
00032 {
00033  public:
00038   IMPORT_C skAsciiStringBuffer(USize capacity,USize growth_increment=16);
00039 #ifndef __SYMBIAN32__
00040 
00045   IMPORT_C skAsciiStringBuffer(const skAsciiString& s,USize growth_increment=16);
00050   IMPORT_C skAsciiStringBuffer(const skAsciiStringBuffer& s);
00051 #endif
00052 
00055   IMPORT_C virtual ~skAsciiStringBuffer();
00059   IMPORT_C skAsciiStringBuffer& operator=(const skAsciiStringBuffer& s);
00065   IMPORT_C void append(char ch);
00071   IMPORT_C void append(const skAsciiString& s);
00077   IMPORT_C void append(const char * s);
00083   IMPORT_C skAsciiString toString() ;
00089   IMPORT_C skAsciiString toStringCopy() const;
00094   IMPORT_C operator const char * () const;
00099   IMPORT_C USize length() const;
00104   IMPORT_C USize capacity() const;
00105  private:
00111   void ensureCapacity(USize capacity);
00113   char * m_Buffer;
00115   USize m_Length;
00117   USize m_Capacity;
00119   USize m_GrowthIncrement;
00120 };
00121 
00122 #endif

Generated on Fri Dec 17 20:27:34 2004 for Simkin by doxygen1.3