Main Page ? Class Hierarchy ? Compound List ? File List ? Compound Members ? File Members ?

cmt_vector_iterator.h

Go to the documentation of this file.
00001 class iterator
00002 {
00003   public:
00004   iterator ()
00005       {
00006         _index = 0;
00007         _vector = 0;
00008       }
00009 
00010   iterator (cmt_vector& vector)
00011       {
00012         _index = 0;
00013         _vector = &vector;
00014       }
00015 
00016   iterator (const iterator& other)
00017       {
00018         _index = other._index;
00019         _vector = other._vector;
00020       }
00021 
00022   iterator& operator = (const iterator& other)
00023       {
00024         _index = other._index;
00025         _vector = other._vector;
00026 
00027         return (*this);
00028       }
00029 
00030   bool operator == (const iterator& other)
00031       {
00032         if (_vector != other._vector) return (false);
00033         if (_index != other._index) return (false);
00034 
00035         return (true);
00036       }
00037 
00038   iterator& operator ++ ()
00039       {
00040         if (_vector != 0)
00041           {
00042             _index++;
00043           }
00044 
00045         return (*this);
00046       };
00047 
00048   iterator& operator -- ()
00049       {
00050         return (*this);
00051       };
00052 
00053   int operator - (const iterator* other)
00054       {
00055         return (0);
00056       };
00057 
00058   iterator operator + (int offset)
00059       {
00060         iterator it = *this;
00061         return (it);
00062       };
00063 
00064   iterator operator - (int offset)
00065       {
00066         iterator it = *this;
00067         return (it);
00068       };
00069 
00070   T& operator * ()
00071       {
00072         return ();
00073       };
00074 
00075   private:
00076   int _index;
00077   cmt_vector* _vector;
00078 };

Generated on Thu Jul 1 15:25:39 2004 for CMT by 1.2.18