Annotation of parser3/src/include/pa_vhash.h, revision 1.1

1.1     ! paf         1: /*
        !             2:   $Id: pa_value.h,v 1.14 2001/02/22 10:43:42 paf Exp $
        !             3: */
        !             4: 
        !             5: #ifndef PA_VHASH_H
        !             6: #define PA_VHASH_H
        !             7: 
        !             8: #include "pa_value.h"
        !             9: 
        !            10: class VHash : public Value {
        !            11: public: // value
        !            12: 
        !            13:        // all: for error reporting after fail(), etc
        !            14:        const char *type() const { return "Hash"; }
        !            15: 
        !            16:        // hash: (key)=value
        !            17:        Value *get_element(const String& name) { 
        !            18:                return static_cast<Value *>(hash.get(name));
        !            19:        }
        !            20:        
        !            21:        // hash: (key)=value
        !            22:        void put_element(const String& name, Value *value) { 
        !            23:                hash.put(name, value);
        !            24:        }
        !            25: 
        !            26: public: // usage
        !            27: 
        !            28:        VHash(Pool& apool) : Value(apool), hash(apool) {}
        !            29: 
        !            30: private:
        !            31:        Hash hash;
        !            32: };
        !            33: 
        !            34: #endif

E-mail: