Google

Main Page   Class Hierarchy   Compound List   File List   Compound Members  

scfstr.h

00001 /*
00002     Crystal Space Shared String Vector class
00003     Copyright (C) 1998,1999 by Andrew Zabolotny <bit@eltech.ru>
00004 
00005     This library is free software; you can redistribute it and/or
00006     modify it under the terms of the GNU Library 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     Library General Public License for more details.
00014 
00015     You should have received a copy of the GNU Library General Public
00016     License along with this library; if not, write to the Free
00017     Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00018 */
00019 
00020 #ifndef __SCFSTR_H__
00021 #define __SCFSTR_H__
00022 
00023 #include "iutil/string.h"
00024 #include "csutil/csstring.h"
00025 
00027 class scfString : public iString
00028 {
00029   csString s;
00030 
00031 public:
00032   SCF_DECLARE_IBASE;
00033 
00035   scfString ()
00036   { SCF_CONSTRUCT_IBASE (NULL); }
00037 
00039   scfString (size_t iLength) : s(iLength)
00040   { SCF_CONSTRUCT_IBASE (NULL); }
00041 
00043   scfString (const iString &copy) : s(copy.GetData())
00044   { SCF_CONSTRUCT_IBASE (NULL); }
00045 
00047   scfString (const char *copy) : s(copy)
00048   { SCF_CONSTRUCT_IBASE (NULL); }
00049 
00051   virtual ~scfString () {}
00052 
00054   virtual void SetCapacity (size_t NewSize);
00055 
00057   virtual void Truncate (size_t iPos);
00058 
00060   virtual void Reclaim ();
00061 
00063   virtual iString *Clone () const;
00064 
00066   virtual char *GetData () const;
00067 
00069   virtual size_t Length () const;
00070 
00072   virtual char& operator [] (size_t iPos);
00073 
00075   virtual void SetAt (size_t iPos, char iChar);
00076 
00078   virtual char GetAt (size_t iPos) const;
00079 
00081   virtual void Insert (size_t iPos, iString *iStr);
00082 
00084   virtual void Overwrite (size_t iPos, iString *iStr);
00085 
00087   virtual iString &Append (const char *iStr, size_t iCount = (size_t)-1);
00088 
00090   virtual iString &Append (const iString *iStr, size_t iCount = (size_t)-1);
00091 
00093   virtual void Replace (const iString *iStr, size_t iCount = (size_t)-1);
00094 
00096   virtual bool Compare (const iString *iStr) const;
00097 
00099   virtual bool CompareNoCase (const iString *iStr) const;
00100 };
00101 
00102 #endif // __SCFSTR_H__

Generated for Crystal Space by doxygen 1.2.5 written by Dimitri van Heesch, ©1997-2000