Diff for /parser3/src/include/pa_string.h between versions 1.1 and 1.7

version 1.1, 2001/01/26 15:43:11 version 1.7, 2001/01/27 15:21:05
Line 20 Line 20
   
 #include <stddef.h>  #include <stddef.h>
   
   #include "pa_types.h"
   
 class Pool;  class Pool;
   
 class String {  class String {
Line 35  private: Line 37  private:
         // the pool I'm allocated on          // the pool I'm allocated on
         Pool *pool;          Pool *pool;
   
         // last chank allocated count cache  
         int curr_chunk_rows;  
         struct Chunk {          struct Chunk {
                 // the number of rows per chunk                  // the number of rows in chunk
                 int count;                  int count;
                 union Row {                  union Row {
                         // chunk item                          // chunk item
Line 47  private: Line 47  private:
                                 size_t size;  // length of the fragment                                  size_t size;  // length of the fragment
                         } item;                          } item;
                         Chunk *link;  // link to the next chunk in chain                          Chunk *link;  // link to the next chunk in chain
                 } first[CR_PREALLOCATED_COUNT];                  } rows[CR_PREALLOCATED_COUNT];
                 // next rows are here                  // next rows are here
                 Chunk *preallocated_link;                  Chunk *preallocated_link;
         }          }
Line 60  private: Line 60  private:
         // of the link to the next chunk to allocate          // of the link to the next chunk to allocate
         Chunk::Row *link_row;          Chunk::Row *link_row;
   
   private:
           // last chank allocated count
           int curr_chunk_rows;
   
           // string size
           size_t fsize;
   
           // used rows in all chunks
           int fused_rows;
   
   private:
         // new&constructors made private to enforce factory manufacturing at pool          // new&constructors made private to enforce factory manufacturing at pool
         void *operator new(size_t size, Pool *apool);          void *operator new(size_t size, Pool *apool);
   
Line 79  private: Line 90  private:
   
 public:  public:
   
         size_t size();          String(String& src);
           size_t size() { return fsize; }
           int used_rows() { return fused_rows; }
         char *c_str();          char *c_str();
         String& operator += (char *src);          String& operator += (char *src);
           bool operator == (String& src);
   
           uint hash_code();
   
   private: //disabled
   
           String& operator = (String& src) { return *this; }
   
 };  };
   
 #endif  #endif

Removed from v.1.1  
changed lines
  Added in v.1.7


E-mail: