Annotation of parser3/src/include/pa_pool.h, revision 1.7

1.1       paf         1: /*
1.7     ! paf         2:   $Id: pa_pool.h,v 1.6 2001/01/26 18:55:55 paf Exp $
1.1       paf         3: */
                      4: 
                      5: #ifndef PA_POOL_H
                      6: #define PA_POOL_H
                      7: 
                      8: #include <stddef.h>
                      9: 
1.4       paf        10: #include "pa_string.h"
1.5       paf        11: #include "pa_hash.h"
1.7     ! paf        12: #include "pa_array.h"
1.1       paf        13: 
                     14: class Pool {
                     15: public:
                     16:        Pool();
                     17:        ~Pool();
1.5       paf        18:     void *malloc(size_t size);
1.1       paf        19:     void *calloc(size_t size);
                     20: 
1.5       paf        21:        String *make_string() { 
1.1       paf        22:                return new(this) String(this);
                     23:        }
1.5       paf        24:        String *make_string(char *src) {
1.1       paf        25:                return new(this) String(this, src);
1.5       paf        26:        }
1.6       paf        27:        Hash *make_hash() {
                     28:                return new(this) Hash(this);
1.7     ! paf        29:        }
        !            30:        Array *make_array() {
        !            31:                return new(this) Array(this);
        !            32:        }
        !            33:        Array *make_array(int initial_rows) {
        !            34:                return new(this) Array(this, initial_rows);
1.1       paf        35:        }
                     36: };
                     37: 
                     38: #endif

E-mail: