summaryrefslogtreecommitdiff
path: root/hmap.h
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2013-04-06 13:14:46 +0200
committerPaul Buetow <paul@buetow.org>2013-04-06 13:14:46 +0200
commit07706f56cd421bf8b101a5c0fe44674d36e161a0 (patch)
treebec8b45765788370fbd148d68e05d8b437e60670 /hmap.h
parent56187184e11b085b82584d3b088c62f427aae83c (diff)
tagging ychat-0.5.1ychat-0.5.1
Diffstat (limited to 'hmap.h')
-rw-r--r--hmap.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/hmap.h b/hmap.h
index 39923c7..2392133 100644
--- a/hmap.h
+++ b/hmap.h
@@ -53,6 +53,7 @@ public:
virtual void del_elem ( const key_type &k );
virtual obj_type get_elem ( const key_type &k );
+ virtual void run_func( void (*func)(obj_type) );
virtual void run_func( void (*func)(obj_type, void*), void* v_arg );
// inline:
@@ -80,6 +81,11 @@ public:
return static_cast<double>(getSize())/static_cast<double>(getCapacity());
}
+ obj_type& operator[]( key_type &k )
+ {
+ return get_elem( k );
+ }
+
};
template <class obj_type, class key_type>