--- parser3/src/include/pa_hash.h 2001/02/21 11:10:02 1.15 +++ parser3/src/include/pa_hash.h 2001/02/23 14:18:26 1.17 @@ -1,5 +1,5 @@ /* - $Id: pa_hash.h,v 1.15 2001/02/21 11:10:02 paf Exp $ + $Id: pa_hash.h,v 1.17 2001/02/23 14:18:26 paf Exp $ */ /* @@ -16,7 +16,7 @@ #include "pa_types.h" #include "pa_string.h" -class Hash : public Pooled { +class Hash : virtual public Pooled { public: typedef String Key; @@ -36,6 +36,9 @@ public: // get associated [value] by the [key] /*SYNCHRONIZED*/ Value *get(const Key& key) const; + // put a [value] under the [key] if that [key] existed, return existed or not + /*SYNCHRONIZED*/ bool replace(const Key& key, Value *value); + void put(const Key& key, int value) { put(key, reinterpret_cast(value)); } void put(const Key& key, String *value) { put(key, static_cast(value)); }