From 9cd3ccffd5372dfde3af478e3f832f18db4be3f1 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 6 Apr 2013 13:14:41 +0200 Subject: tagging tags --- ychat-0.7.8/src/chat/base.tmpl | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 ychat-0.7.8/src/chat/base.tmpl (limited to 'ychat-0.7.8/src/chat/base.tmpl') diff --git a/ychat-0.7.8/src/chat/base.tmpl b/ychat-0.7.8/src/chat/base.tmpl new file mode 100755 index 0000000..0be21aa --- /dev/null +++ b/ychat-0.7.8/src/chat/base.tmpl @@ -0,0 +1,31 @@ +#ifndef BASE_CPP +#define BASE_CPP + +#include "base.h" + +template +base::base() +{} + +template +base::~base( ) +{} + +template +type* +base::get_elem( string s_name, bool &b_found ) +{ + s_name = to_lower(s_name); + type* p_type = nhashmap::get_elem( s_name ); + b_found = p_type == NULL ? false : true; + return p_type; +} + +template +void +base::add_elem( type* p_type ) +{ + nhashmap::add_elem(p_type, p_type->get_lowercase_name()); +} + +#endif -- cgit v1.2.3