#include <hashWatch.h>
Public Member Functions | |
| cHashMapWatcher (const char *name, UNORDERED_MAP< KeyT, ValueT, CmpT > &var) | |
| const char * | getClassName () const |
| virtual const char * | getElemTypeName () const |
| virtual int | size () const |
| virtual std::string | at (int i) const |
| virtual std::string | atIt () const |
Protected Attributes | |
| UNORDERED_MAP< KeyT, ValueT, CmpT > & | m |
| UNORDERED_MAP< KeyT, ValueT, CmpT >::iterator | it |
| int | itPos |
| std::string | classname |
Definition at line 122 of file hashWatch.h.
| cHashMapWatcher< KeyT, ValueT, CmpT >::cHashMapWatcher | ( | const char * | name, | |
| UNORDERED_MAP< KeyT, ValueT, CmpT > & | var | |||
| ) | [inline] |
Definition at line 130 of file hashWatch.h.
00130 : cStdVectorWatcherBase(name), m(var) { 00131 itPos=-1; 00132 classname = std::string("unordered_map<")+opp_typename(typeid(KeyT))+","+opp_typename(typeid(ValueT))+">"; 00133 }
| virtual std::string cHashMapWatcher< KeyT, ValueT, CmpT >::at | ( | int | i | ) | const [inline, virtual] |
Definition at line 137 of file hashWatch.h.
00137 { 00138 if (i==0) { 00139 it=m.begin(); itPos=0; 00140 } else if (i==itPos+1 && it!=m.end()) { 00141 ++it; ++itPos; 00142 } else { 00143 it=m.begin(); 00144 for (int k=0; k<i && it!=m.end(); k++) ++it; 00145 itPos=i; 00146 } 00147 if (it==m.end()) { 00148 return std::string("out of bounds"); 00149 } 00150 return atIt(); 00151 }
| virtual std::string cHashMapWatcher< KeyT, ValueT, CmpT >::atIt | ( | ) | const [inline, virtual] |
Definition at line 152 of file hashWatch.h.
00152 { 00153 std::stringstream out; 00154 out << it->first << " ==> " << it->second; 00155 return out.str(); 00156 }
| const char* cHashMapWatcher< KeyT, ValueT, CmpT >::getClassName | ( | ) | const [inline] |
| virtual const char* cHashMapWatcher< KeyT, ValueT, CmpT >::getElemTypeName | ( | ) | const [inline, virtual] |
| virtual int cHashMapWatcher< KeyT, ValueT, CmpT >::size | ( | ) | const [inline, virtual] |
std::string cHashMapWatcher< KeyT, ValueT, CmpT >::classname [protected] |
Definition at line 128 of file hashWatch.h.
UNORDERED_MAP<KeyT,ValueT,CmpT>::iterator cHashMapWatcher< KeyT, ValueT, CmpT >::it [mutable, protected] |
Definition at line 126 of file hashWatch.h.
int cHashMapWatcher< KeyT, ValueT, CmpT >::itPos [mutable, protected] |
Definition at line 127 of file hashWatch.h.
UNORDERED_MAP<KeyT,ValueT,CmpT>& cHashMapWatcher< KeyT, ValueT, CmpT >::m [protected] |
Definition at line 125 of file hashWatch.h.
1.5.8