00001 #ifndef _LISTTOOLS_H_ 00002 #define _LISTTOOLS_H_ 00003 00004 typedef struct _TMyListItem 00005 { 00006 void *item; 00007 _TMyListItem *Next; 00008 } TMyListItem; 00009 00014 class TMyList 00015 { 00016 protected: 00017 bool freeItems; 00018 int ptrIndex; 00019 TMyListItem *Ptr; 00020 TMyListItem *Head; 00021 TMyListItem *Tail; 00022 public: 00023 int count; 00024 00025 TMyList(); 00026 ~TMyList(); 00027 int Add(void *); 00028 void Clear(void); 00029 void Delete(int); 00030 void Insert(int, void *); 00031 void *Items(int); 00032 }; 00033 00034 class TMyStringList : public TMyList 00035 { 00036 protected: 00037 char itemName[101]; 00038 public: 00039 TMyStringList(); 00040 int Add(char *); 00041 void Insert(int, char *); 00042 char *Names(int); 00043 int SetValue(char *, char *); 00044 char *Strings(int); 00045 char *Values(char *); 00046 }; 00047 00048 #endif 00049