00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00020 #ifndef flc_citerator_H
00021 #define flc_citerator_H
00022
00023 #include <falcon/setup.h>
00024 #include <falcon/types.h>
00025 #include <falcon/falcondata.h>
00026
00027 namespace Falcon {
00028 class Sequence;
00029 class Garbageable;
00030 class Item;
00031
00036 class FALCON_DYN_CLASS CoreIterator: public FalconData
00037 {
00038 protected:
00039 CoreIterator();
00040 CoreIterator( const CoreIterator& other );
00041 Garbageable* m_creator;
00042 Sequence* m_creatorSeq;
00043
00044 public:
00045 virtual ~CoreIterator();
00046
00047 virtual bool next() = 0;
00048 virtual bool prev() = 0;
00049 virtual bool hasNext() const = 0;
00050 virtual bool hasPrev() const = 0;
00052 virtual Item &getCurrent() const = 0;
00053
00054 virtual bool isValid() const = 0;
00055 virtual bool isOwner( void *collection ) const = 0;
00056 virtual bool equal( const CoreIterator &other ) const = 0;
00057 virtual bool erase() = 0;
00058 virtual bool insert( const Item &item ) = 0;
00059
00060 virtual void invalidate() = 0;
00066 virtual void setOwner( Garbageable *owner );
00067 virtual void setOwner( Sequence *owner );
00068 virtual void gcMark( uint32 mark );
00069 };
00070
00071 }
00072
00073 #endif
00074
00075