|
|
| version 1.65, 2005/08/09 08:14:49 | version 1.69, 2006/11/03 17:32:30 |
|---|---|
| Line 61 public: | Line 61 public: |
| return false; | return false; |
| // max(limit) | // max(limit) |
| size_t m=reverse? | size_t m=reverse? |
| offset | offset+1 |
| :count-offset; | :count-offset; |
| if(!m) | if(!m) |
| return false; | return false; |
| Line 89 public: | Line 89 public: |
| /// append to array | /// append to array |
| Array& operator += (T src) { | Array& operator += (T src) { |
| if(is_full()) | if(is_full()) |
| expand(2); | expand(+2); |
| felements[fused++]=src; | felements[fused++]=src; |
| Line 165 public: | Line 165 public: |
| } | } |
| /// iterate over all elements | /// iterate over all elements |
| template<typename I> void for_each(bool (*callback)(T, I), I info) const { | |
| T *last=felements+fused; | |
| for(T *current=felements; current<last; current++) | |
| if(callback(*current, info)) | |
| return; | |
| } | |
| /// iterate over all elements | |
| template<typename I> void for_each_ref(void (*callback)(T&, I), I info) { | template<typename I> void for_each_ref(void (*callback)(T&, I), I info) { |
| T *last=felements+fused; | T *last=felements+fused; |
| for(T *current=felements; current<last; current++) | for(T *current=felements; current<last; current++) |
| Line 228 public: | Line 236 public: |
| } | } |
| /// quickly extracts next Array element | /// quickly extracts next Array element |
| const T next() { | T next() { |
| return *(fcurrent++); | return *(fcurrent++); |
| } | } |