iterator.h

00001 #ifndef AFL_ITERATOR_H
00002 #define AFL_ITERATOR_H
00003 
00004 #include <iterator>
00005 #include <string>
00006 #include <map>
00007 
00008 #include "afltypes.h"
00009 #include "field.h"
00010 
00011 namespace afl
00012 {
00013     class ddf::PropertySet;
00014     class ddf::VNode;
00015 
00022     class Iterator : public std::iterator<std::random_access_iterator_tag, data_t>
00023     {
00024 
00026       public:
00032          Iterator( const Iterator& toCopy );
00033 
00039          Iterator& operator=( const Iterator& toCopy );
00040 
00044          Iterator& operator++(  );
00045 
00049          Iterator operator++( int ignored );
00050 
00056          Iterator operator--( int ignored );
00057 
00061          Iterator& operator--(  );
00062 
00068          Iterator& operator+=( ptrdiff_t a );
00069 
00075          Iterator& operator-=( ptrdiff_t a );
00076 
00082          Iterator operator+( ptrdiff_t a ) const;
00083 
00084          friend Iterator operator+(ptrdiff_t a, const Iterator& i);
00085 
00091          Iterator operator-( ptrdiff_t a ) const;
00092 
00100          ptrdiff_t operator-( const Iterator& i ) const;
00101 
00109          bool operator==( const Iterator& toCompare ) const;
00110 
00118          bool operator!=( const Iterator& toCompare ) const;
00119 
00127          bool operator<( const Iterator& toCompare ) const;
00128 
00136          bool operator>( const Iterator& toCompare ) const;
00137 
00145          bool operator<=( const Iterator& toCompare ) const;
00146 
00154          bool operator>=( const Iterator& toCompare ) const;
00155 
00165          Value get( aspectid_t aspect = afl::FIELD_NONE ) const;
00166 
00168       friend class Field;
00169       protected:
00177          Iterator( const Field* field, size_t loc );
00178 
00179 
00180 
00183       private:
00187           const Field* _field;
00188           size_t _loc;
00189 
00190     };
00191 
00198     Iterator operator+(ptrdiff_t a, const Iterator& i);
00199 };
00200 
00201 #endif // AFL_ITERATOR_H

Generated on Fri Dec 22 07:17:50 2006 for afl by  doxygen 1.4.6