--- parser3/src/include/pa_array.h 2003/11/25 12:58:53 1.63 +++ parser3/src/include/pa_array.h 2006/04/09 13:38:47 1.68 @@ -1,14 +1,14 @@ /** @file Parser: Array & Array_iterator classes decls. - Copyright (c) 2001-2003 ArtLebedev Group (http://www.artlebedev.com) + Copyright (c) 2001-2005 ArtLebedev Group (http://www.artlebedev.com) Author: Alexandr Petrosian (http://paf.design.ru) */ #ifndef PA_ARRAY_H #define PA_ARRAY_H -static const char * const IDENT_ARRAY_Y="$Date: 2003/11/25 12:58:53 $"; +static const char * const IDENT_ARRAY_Y="$Date: 2006/04/09 13:38:47 $"; // includes @@ -89,7 +89,7 @@ public: /// append to array Array& operator += (T src) { if(is_full()) - expand(2); + expand(+2); felements[fused++]=src; @@ -165,6 +165,14 @@ public: } /// iterate over all elements + template void for_each(bool (*callback)(T, I), I info) const { + T *last=felements+fused; + for(T *current=felements; current void for_each_ref(void (*callback)(T&, I), I info) { T *last=felements+fused; for(T *current=felements; current