00001 /******************************************************************************** 00002 * * 00003 * S t r i n g D i c t i o n a r y C l a s s * 00004 * * 00005 ********************************************************************************* 00006 * Copyright (C) 1998,2006 by Jeroen van der Zijp. All Rights Reserved. * 00007 ********************************************************************************* 00008 * This library is free software; you can redistribute it and/or * 00009 * modify it under the terms of the GNU Lesser General Public * 00010 * License as published by the Free Software Foundation; either * 00011 * version 2.1 of the License, or (at your option) any later version. * 00012 * * 00013 * This library is distributed in the hope that it will be useful, * 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 00016 * Lesser General Public License for more details. * 00017 * * 00018 * You should have received a copy of the GNU Lesser General Public * 00019 * License along with this library; if not, write to the Free Software * 00020 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * 00021 ********************************************************************************* 00022 * $Id: FXStringDict.h,v 1.16 2006/01/22 17:58:10 fox Exp $ * 00023 ********************************************************************************/ 00024 #ifndef FXSTRINGDICT_H 00025 #define FXSTRINGDICT_H 00026 00027 #ifndef FXDICT_H 00028 #include "FXDict.h" 00029 #endif 00030 00031 namespace FX { 00032 00037 class FXAPI FXStringDict : public FXDict { 00038 FXDECLARE(FXStringDict) 00039 protected: 00040 virtual void *createData(const void*); 00041 virtual void deleteData(void*); 00042 public: 00043 00045 FXStringDict(); 00046 00048 FXStringDict(const FXStringDict& orig); 00049 00051 FXStringDict &operator=(const FXStringDict& orig); 00052 00054 const FXchar* insert(const FXchar* ky,const FXchar* str,bool mrk=false){ return (const FXchar*)FXDict::insert(ky,str,mrk); } 00055 00057 const FXchar* replace(const FXchar* ky,const FXchar* str,bool mrk=false){ return (const FXchar*)FXDict::replace(ky,str,mrk); } 00058 00060 const FXchar* remove(const FXchar* ky){ return (const FXchar*)FXDict::remove(ky); } 00061 00063 const FXchar* find(const FXchar* ky) const { return (const FXchar*)FXDict::find(ky); } 00064 00066 const FXchar* data(FXuint pos) const { return (const FXchar*)dict[pos].data; } 00067 00069 virtual ~FXStringDict(); 00070 }; 00071 00072 } 00073 00074 #endif