diff options
| author | Paul Buetow <paul@buetow.org> | 2013-04-06 13:14:48 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2013-04-06 13:14:48 +0200 |
| commit | 5a019f435eb0068b524566d9babf172d58d0e96e (patch) | |
| tree | b083dccdfbec4335a5967d50c4294f7501c77345 /src/chat/base.tmpl | |
| parent | 4ecbf33fae730bc79c4a47e6efda615b104754ad (diff) | |
tagging ychat-0.7.9.2ychat-0.7.9.2
Diffstat (limited to 'src/chat/base.tmpl')
| -rwxr-xr-x | src/chat/base.tmpl | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/chat/base.tmpl b/src/chat/base.tmpl index 0be21aa..5b0fceb 100755 --- a/src/chat/base.tmpl +++ b/src/chat/base.tmpl @@ -22,10 +22,40 @@ base<type>::get_elem( string s_name, bool &b_found ) } template<class type> +type* +base<type>::get_elem( string s_name) +{ + bool b; + return get_elem(s_name, b); +} + +template<class type> void base<type>::add_elem( type* p_type ) { nhashmap<type*>::add_elem(p_type, p_type->get_lowercase_name()); } +template<class type> +void +base<type>::dumpit() +{ + dumpable::add("[base]"); + vector<string>* p_vec = nhashmap<type*>::get_key_vector(); + + vector<string>::iterator iter; + for (iter = p_vec->begin(); iter != p_vec->end(); ++iter) + { + dumpable::add(*iter); + type* p_elem = get_elem(*iter); + if (p_elem) + { + dumpable::next_no_newline(); + dumpable::add(p_elem->dump(dumpable::get_level())); + } + } + + delete p_vec; +} + #endif |
