|
|
| version 1.42, 2001/08/02 09:58:34 | version 1.46, 2001/10/29 15:27:02 |
|---|---|
| Line 2 | Line 2 |
| Parser: Array & Array_iter classes decls. | Parser: Array & Array_iter classes decls. |
| Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) | Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) |
| Author: Alexander Petrosyan <paf@design.ru> (http://design.ru/paf) | Author: Alexander Petrosyan <paf@design.ru> (http://design.ru/paf) |
| $Id$ | $Id$ |
| Line 35 class Array_iter; | Line 34 class Array_iter; |
| */ | */ |
| class Array : public Pooled { | class Array : public Pooled { |
| friend Array_iter; | friend class Array_iter; |
| public: | public: |
| /// Array item type | /// Array item type |
| Line 49 public: | Line 48 public: |
| typedef void (*For_each_func)(Item *value, void *info); | typedef void (*For_each_func)(Item *value, void *info); |
| /// first_that iterator function type, const info | /// first_that iterator function type, const info |
| typedef bool (*First_that_func_const)(Item *value, const void *info); | typedef void *(*Item_that_func_const)(Item *value, const void *info); |
| /// first_that iterator function type | /// first_that iterator function type |
| typedef bool (*First_that_func)(Item *value, void *info); | typedef void *(*Item_that_func)(Item *value, void *info); |
| enum { | enum { |
| CR_INITIAL_ROWS_DEFAULT=3, ///< default preallocated row count | CR_INITIAL_ROWS_DEFAULT=3, ///< default preallocated row count |
| Line 93 public: | Line 92 public: |
| void for_each(For_each_func func, void *info=0) const; | void for_each(For_each_func func, void *info=0) const; |
| /// iterate over all elements until condition, const info | /// iterate over all elements until condition, const info |
| void* first_that(First_that_func_const func, const void *info=0) const; | void* first_that(Item_that_func_const func, const void *info=0) const; |
| /// iterate over all elements until condition | /// iterate over all elements until condition |
| void* first_that(First_that_func func, void *info=0) const; | void* first_that(Item_that_func func, void *info=0) const; |
| private: | private: |
| Line 130 private: | Line 129 private: |
| // array size | // array size |
| int fused_rows; | int fused_rows; |
| mutable int cache_chunk_base; | |
| mutable Chunk *cache_chunk; | |
| private: | private: |
| bool chunk_is_full() { | bool chunk_is_full() { |