diff options
| author | Paul Buetow <paul@buetow.org> | 2013-04-06 13:14:46 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2013-04-06 13:14:46 +0200 |
| commit | 07706f56cd421bf8b101a5c0fe44674d36e161a0 (patch) | |
| tree | bec8b45765788370fbd148d68e05d8b437e60670 /hmap.h | |
| parent | 56187184e11b085b82584d3b088c62f427aae83c (diff) | |
tagging ychat-0.5.1ychat-0.5.1
Diffstat (limited to 'hmap.h')
| -rw-r--r-- | hmap.h | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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> |
