diff options
| author | Paul Buetow <paul@buetow.org> | 2013-04-06 13:14:44 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2013-04-06 13:14:44 +0200 |
| commit | c507ce3198ea4d822832cc8740f0128df8873c02 (patch) | |
| tree | 260ca004916ae03b7d5438bf89007e3984da6934 /base.cpp | |
| parent | c8b2ef7b899766d04562f7e04a84251cea8fa701 (diff) | |
tagging ychat-0.3ychat-0.3
Diffstat (limited to 'base.cpp')
| -rwxr-xr-x | base.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
@@ -1,10 +1,10 @@ /* This file is part of yChat - $Author: snooper $ - $Date: 2003/04/02 10:50:18 $ + $Author: paul $ + $Date: 2003/03/30 01:35:21 $ - $Header: /cvsroot/ychat/ychat/base.cpp,v 1.8 2003/04/02 10:50:18 snooper Exp $ + $Header: /home/cvsroot/ychat/base.cpp,v 1.7 2003/03/30 01:35:21 paul Exp $ */ // template class data implementation; @@ -16,7 +16,7 @@ template<class type> base<type>::base() { - map_elem = new hmap<type*,string>(80); + map_elem = new hmap<name*,string>(80); pthread_mutex_init (&mut_map_elem, NULL ); } @@ -27,10 +27,10 @@ base<type>::~base( ) } template<class type> void -base<type>::add_elem( type* p_type ) +base<type>::add_elem( name* p_name ) { pthread_mutex_lock ( &mut_map_elem ); - map_elem->add_elem ( p_type, p_type->get_name()); + map_elem->add_elem ( p_name, p_name->get_name()); pthread_mutex_unlock( &mut_map_elem ); } @@ -42,20 +42,20 @@ base<type>::del_elem( string &s_name ) pthread_mutex_unlock( &mut_map_elem ); } -template<class type> type* +template<class type> name* base<type>::get_elem( string &s_name, bool &b_found ) { pthread_mutex_lock ( &mut_map_elem ); - type* p_type = map_elem->get_elem( s_name ); + name* p_name = map_elem->get_elem( s_name ); pthread_mutex_unlock( &mut_map_elem ); - b_found = p_type == NULL ? false : true; + b_found = p_name == NULL ? false : true; - return p_type; + return p_name; } template<class type> void -base<type>::run_func( void (*func)(type*, void*), void* v_arg ) +base<type>::run_func( void (*func)(name*, void*), void* v_arg ) { pthread_mutex_lock ( &mut_map_elem ); map_elem->run_func( func, v_arg ); |
