#include <hashWatch.h>
Public Member Functions | |
cHashMapWatcher (const char *name, __gnu_cxx::hash_map< KeyT, ValueT, CmpT > &var) | |
const char * | className () const |
virtual const char * | elemTypeName () const |
virtual int | size () const |
virtual std::string | at (int i) const |
virtual std::string | atIt () const |
Protected Attributes | |
__gnu_cxx::hash_map< KeyT, ValueT, CmpT > & | m |
__gnu_cxx::hash_map< KeyT, ValueT, CmpT >::iterator | it |
int | itPos |
std::string | classname |
cHashMapWatcher< KeyT, ValueT, CmpT >::cHashMapWatcher | ( | const char * | name, | |
__gnu_cxx::hash_map< KeyT, ValueT, CmpT > & | var | |||
) | [inline] |
const char* cHashMapWatcher< KeyT, ValueT, CmpT >::className | ( | ) | const [inline] |
virtual const char* cHashMapWatcher< KeyT, ValueT, CmpT >::elemTypeName | ( | ) | const [inline, virtual] |
virtual int cHashMapWatcher< KeyT, ValueT, CmpT >::size | ( | ) | const [inline, virtual] |
virtual std::string cHashMapWatcher< KeyT, ValueT, CmpT >::at | ( | int | i | ) | const [inline, virtual] |
00092 { 00093 if (i==0) { 00094 it=m.begin(); itPos=0; 00095 } else if (i==itPos+1 && it!=m.end()) { 00096 ++it; ++itPos; 00097 } else { 00098 it=m.begin(); 00099 for (int k=0; k<i && it!=m.end(); k++) ++it; 00100 itPos=i; 00101 } 00102 if (it==m.end()) { 00103 return std::string("out of bounds"); 00104 } 00105 return atIt(); 00106 }
virtual std::string cHashMapWatcher< KeyT, ValueT, CmpT >::atIt | ( | ) | const [inline, virtual] |
__gnu_cxx::hash_map<KeyT,ValueT,CmpT>& cHashMapWatcher< KeyT, ValueT, CmpT >::m [protected] |
__gnu_cxx::hash_map<KeyT,ValueT,CmpT>::iterator cHashMapWatcher< KeyT, ValueT, CmpT >::it [mutable, protected] |
int cHashMapWatcher< KeyT, ValueT, CmpT >::itPos [mutable, protected] |
std::string cHashMapWatcher< KeyT, ValueT, CmpT >::classname [protected] |