CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

scfstringarray.h

00001 /*
00002     Crystal Space String Array SCF interface
00003     Copyright (C) 2003 by Jorrit Tyberghein
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 __CS_SCFSTRINGARRAY_H__
00021 #define __CS_SCFSTRINGARRAY_H__
00022 
00023 #include "iutil/stringarray.h"
00024 #include "csutil/stringarray.h"
00025 
00027 class scfStringArray : public iStringArray
00028 {
00029   csStringArray v;
00030 
00031 public:
00032   SCF_DECLARE_IBASE;
00033 
00035   scfStringArray (int iLimit = 16, int iDelta = 16) : v (iLimit, iDelta)
00036   { SCF_CONSTRUCT_IBASE (0); }
00037 
00039   virtual ~scfStringArray ()
00040   { }
00041 
00043   virtual int Length () const
00044   {
00045     return v.Length ();
00046   }
00047 
00049   virtual void Push (char const *value)
00050   {
00051     v.Push ((char*)value);
00052   }
00053 
00055   virtual char *Pop ()
00056   {
00057     return v.Pop ();
00058   }
00059 
00061   virtual char const *Get (int n) const
00062   {
00063     return v.Get (n);
00064   }
00065 
00067   virtual int Find (const char *value) const
00068   {
00069     return v.Find (value);
00070   }
00071 
00073   virtual int FindCaseInsensitive (const char *value) const
00074   {
00075     return v.FindCaseInsensitive (value);
00076   }
00077 
00079   virtual int FindSortedKey (const char *value) const
00080   {
00081     return v.FindSortedKey ((char*)value);
00082   }
00083 
00085   virtual void Sort ()
00086   {
00087     v.Sort ();
00088   }
00089 
00091   virtual bool DeleteIndex (int n)
00092   {
00093     return v.DeleteIndex (n);
00094   }
00095 
00097   virtual bool Insert (int n, char const *value)
00098   {
00099     return v.Insert (n, (char*)value);
00100   }
00101 
00103   virtual void DeleteAll ()
00104   {
00105     v.DeleteAll ();
00106   }
00107 };
00108 
00109 #endif // __CS_SCFSTRINGARRAY_H__
00110 

Generated for Crystal Space by doxygen 1.2.14