diff options
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> |
