Diff for /parser3/src/include/pa_array.h between versions 1.60 and 1.63

version 1.60, 2003/11/07 13:59:21 version 1.63, 2003/11/25 12:58:53
Line 8 Line 8
 #ifndef PA_ARRAY_H  #ifndef PA_ARRAY_H
 #define PA_ARRAY_H  #define PA_ARRAY_H
   
 static const char* IDENT_ARRAY_Y="$Date$";  static const char * const IDENT_ARRAY_Y="$Date$";
   
 // includes  // includes
   
Line 139  public: Line 139  public:
   
         /// get index-element          /// get index-element
         T get(size_t index) const {          T get(size_t index) const {
                 assert(index>=0 && index<count());                  assert(index<count());
                 return felements[index];                  return felements[index];
         }          }
   
         /// ref version of get          /// ref version of get
         T& get_ref(size_t index) const {          T& get_ref(size_t index) const {
                 assert(index>=0 && index<count());                  assert(index<count());
                 return felements[index];                  return felements[index];
         }          }
   
         /// put index-element          /// put index-element
         void put(size_t index, T element) {          void put(size_t index, T element) {
                 assert(index>=0 && index<count());                  assert(index<count());
                 felements[index]=element;                  felements[index]=element;
         }          }
   
Line 233  public: Line 233  public:
         }          }
   
 };  };
 /*  
 /** Nonconst array iterator, usage:  
         @code  
         // Array<T> a;  
         for(Array_iterator<T> i(a); i.has_next(); ) {  
                 T& element=i.next();  
                 ...  
         }         
         @endcode  
 * /  
 template<typename T> class Array_modifing_iterator {  
   
         Array<T>& farray;  
         T *fcurrent;  
         T *flast;  
   
 public:  
   
         Array_modifing_iterator(Array<T>& aarray): farray(aarray) {  
                 fcurrent=farray.felements;  
                 flast=farray.felements+farray.count();  
         }  
   
         /// there are still elements  
         bool has_next() {  
                 return fcurrent<flast;  
         }  
   
         /// quickly extracts next Array element  
         T& next() {  
                 return *(fcurrent++);  
         }  
   
 };  
 */  
 #endif  #endif

Removed from v.1.60  
changed lines
  Added in v.1.63


E-mail: