csutil/scfstringarray.h
Go to the documentation of this file.
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 00027 #include "csextern.h" 00028 #include "csutil/scf_implementation.h" 00029 #include "csutil/stringarray.h" 00030 #include "iutil/stringarray.h" 00031 00033 class scfStringArray : public scfImplementation1<scfStringArray, 00034 iStringArray> 00035 { 00036 csStringArray v; 00037 00038 public: 00039 00041 scfStringArray (int limit = 16, int delta = 16) 00042 : scfImplementationType (this), v (limit, delta) 00043 { } 00044 00046 virtual ~scfStringArray () 00047 { } 00048 00050 virtual size_t GetSize () const 00051 { 00052 return v.GetSize (); 00053 } 00054 00056 virtual void Push (char const *value) 00057 { 00058 v.Push ((char*)value); 00059 } 00060 00066 virtual char *Pop () 00067 { 00068 return v.Pop (); 00069 } 00070 00072 virtual char const *Get (size_t n) const 00073 { 00074 return v.Get (n); 00075 } 00076 00083 virtual size_t Find (const char *value) const 00084 { 00085 return v.Find (value); 00086 } 00087 00094 virtual size_t FindCaseInsensitive (const char *value) const 00095 { 00096 return v.FindCaseInsensitive (value); 00097 } 00098 00104 virtual size_t FindSortedKey (const char *value) const 00105 { 00106 return v.FindSortedKey ((char*)value); 00107 } 00108 00120 virtual size_t Contains(const char* str, bool case_sensitive = true) const 00121 { 00122 return v.Contains (str, case_sensitive); 00123 } 00124 00130 virtual void Sort (bool case_sensitive = true) 00131 { 00132 v.Sort (case_sensitive); 00133 } 00134 00136 virtual bool DeleteIndex (size_t n) 00137 { 00138 return v.DeleteIndex (n); 00139 } 00140 00142 virtual bool Insert (size_t n, char const *value) 00143 { 00144 return v.Insert (n, (char*)value); 00145 } 00146 00148 virtual void Empty () 00149 { 00150 v.Empty(); 00151 } 00152 00158 virtual bool IsEmpty() const 00159 { 00160 return v.IsEmpty(); 00161 } 00162 }; 00163 00164 #endif // __CS_SCFSTRINGARRAY_H__
Generated for Crystal Space 1.4.1 by doxygen 1.7.1