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

1.1       paf         1: /*
1.5     ! paf         2:   $Id: pa_pool.h,v 1.4 2001/01/26 15:43:11 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.1       paf        12: 
                     13: class Pool {
                     14: public:
                     15:        Pool();
                     16:        ~Pool();
1.5     ! paf        17:     void *malloc(size_t size);
1.1       paf        18:     void *calloc(size_t size);
                     19: 
1.5     ! paf        20:        String *make_string() { 
1.1       paf        21:                return new(this) String(this);
                     22:        }
1.5     ! paf        23:        String *make_string(char *src) {
1.1       paf        24:                return new(this) String(this, src);
1.5     ! paf        25:        }
        !            26: 
        !            27:        Hash<String, String> *make_hash() {
        !            28:                return new(this) Hash<String, String>(this);
1.1       paf        29:        }
                     30: };
                     31: 
                     32: #endif

E-mail: