00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 00014 00015 00016 00017 00018 00019 00020 00021 00022 00023
00024
00025 #ifndef SWLSTKEY_H
00026 #define SWLSTKEY_H
00027
00028 #include <swkey.h>
00029
00030 #include <defs.h>
00031
00036 class SWDLLEXPORT ListKey : public SWKey {
00037
00038 static SWClass classdef;
00039 void init ();
00040 protected:
00041 int arraypos;
00042 int arraymax;
00043 int arraycnt;
00044 SWKey **array;
00045 public:
00050 ListKey (const char *ikey = 0);
00051 ListKey (ListKey const &k);
00054 virtual ~ ListKey ();
00055
00056 virtual SWKey *clone () const;
00059 virtual void ClearList ();
00063 virtual int Count ();
00066 virtual void Remove ();
00072 virtual char SetToElement (int ielement, SW_POSITION = TOP);
00078 virtual SWKey *GetElement (int pos = -1);
00082 virtual ListKey & operator << (const SWKey &ikey);
00087 virtual ListKey & operator = (const ListKey & ikey);
00088 virtual SWKey & operator = (const char *ikey) { return SWKey::operator =
00089 (ikey);}
00090 virtual SWKey & operator = (const SWKey & ikey) { return SWKey::operator =
00091 (ikey);}
00097 virtual SWKey & operator = (SW_POSITION);
00100 virtual SWKey & operator -= (int decrement);
00103 virtual SWKey & operator += (int increment);
00104 virtual char Traversable ()
00105 {
00106 return 1;
00107 }
00108 virtual long Index () const
00109 {
00110 return arraypos;
00111 }
00116 virtual long Index (long index)
00117 {
00118 SetToElement (index);
00119 return Index ();
00120 }
00121 };
00122
00123
00124 #endif