summaryrefslogtreecommitdiff
path: root/ychat-0.7.7.0/src/maps/nhashmap.tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'ychat-0.7.7.0/src/maps/nhashmap.tmpl')
-rw-r--r--ychat-0.7.7.0/src/maps/nhashmap.tmpl11
1 files changed, 11 insertions, 0 deletions
diff --git a/ychat-0.7.7.0/src/maps/nhashmap.tmpl b/ychat-0.7.7.0/src/maps/nhashmap.tmpl
new file mode 100644
index 0000000..422ea2f
--- /dev/null
+++ b/ychat-0.7.7.0/src/maps/nhashmap.tmpl
@@ -0,0 +1,11 @@
+template<class obj_type>
+obj_type
+nhashmap<obj_type>::get_elem(string s_key)
+{
+ typename hashmap<obj_type>::iterator iter = this->find(s_key);
+
+ if ( iter != this->end() )
+ return iter->second;
+
+ return NULL;
+}