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.1 2003/04/14 15:53:25 simkin_cvs 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   skAsciiStringBuffer(USize capacity,USize growth_increment=16);
00043   skAsciiStringBuffer(const skAsciiString& s,USize growth_increment=16);
00047   skAsciiStringBuffer(const skAsciiStringBuffer& s);
00051   ~skAsciiStringBuffer();
00055   skAsciiStringBuffer& operator=(const skAsciiStringBuffer& s);
00060   void append(char ch);
00065   void append(const skAsciiString& s);
00070   void append(const char * s);
00075   skAsciiString toString() ;
00080   skAsciiString toStringCopy() const;
00085   operator const char * () const;
00090   USize length() const;
00095   USize capacity() const;
00096  private:
00101   void ensureCapacity(USize capacity);
00103   char * m_Buffer;
00105   USize m_Length;
00107   USize m_Capacity;
00109   USize m_GrowthIncrement;
00110 };
00111 
00112 #endif

Generated on Mon Apr 14 16:49:22 2003 for Simkin C++ for Windows CE by doxygen1.3