Diff for /parser3/src/include/pa_array.h between versions 1.36 and 1.41

version 1.36, 2001/04/26 14:55:25 version 1.41, 2001/05/17 10:22:24
Line 11 Line 11
 #ifndef PA_ARRAY_H  #ifndef PA_ARRAY_H
 #define PA_ARRAY_H  #define PA_ARRAY_H
   
 #include <stddef.h>  #include "pa_config_includes.h"
   
 #include "pa_pool.h"  #include "pa_pool.h"
 #include "pa_types.h"  #include "pa_types.h"
 #include "pa_string.h"  #include "pa_string.h"
Line 53  public: Line 52  public:
         typedef bool (*First_that_func)(Item *value, void *info);          typedef bool (*First_that_func)(Item *value, void *info);
   
         enum {          enum {
                 CR_INITIAL_ROWS_DEFAULT=10, ///< default preallocated row count                  CR_INITIAL_ROWS_DEFAULT=3, ///< default preallocated row count
                 CR_GROW_PERCENT=60 ///< each time the Array chunk_is_full() array expanded()                  CR_GROW_COUNT=3 ///< each time the Array chunk_is_full() array expanded()
         };          };
   
 public:  public:
Line 81  public: Line 80  public:
         int size() const { return fused_rows; }          int size() const { return fused_rows; }
         /// append Item to array          /// append Item to array
         Array& operator += (Item *src);          Array& operator += (Item *src);
           /// append int value to array
           Array& operator += (int value) { return *this+=reinterpret_cast<Item *>(value); }
   
         /// dirty hack to allow constant items storage. I long for Array<const Item*>          /// dirty hack to allow constant items storage. I long for Array<const Item*>
         Array& operator += (const Item *src) { return *this+=const_cast<Item*>(src); }          Array& operator += (const Item *src) { return *this+=const_cast<Item *>(src); }
   
         /// append other Array portion to this one. starting from offset          /// append other Array portion to this one. starting from offset
         Array& append_array(const Array& src, int offset=0);          Array& append_array(const Array& src, int offset=0);
Line 108  public: Line 109  public:
         }          }
   
         Item *get(int index) const;          Item *get(int index) const;
           int get_int(int index) const { return reinterpret_cast<int>(get(index)); }
   
         void put(int index, Item *item);          void put(int index, Item *item);
         /// convinient way to get strings from Array. I long for Array<const String *>          /// convinient way to get strings from Array. I long for Array<const String *>
         const String *get_string(int index) const {           const String *get_string(int index) const { 

Removed from v.1.36  
changed lines
  Added in v.1.41


E-mail: