#include <hashWatch.h>
Public Member Functions | |
cPointerMapWatcher (const char *name, std::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 | |
std::map< KeyT, ValueT, CmpT > & | m |
std::map< KeyT, ValueT, CmpT > ::iterator | it |
int | itPos |
std::string | classname |
cPointerMapWatcher< KeyT, ValueT, CmpT >::cPointerMapWatcher | ( | const char * | name, | |
std::map< KeyT, ValueT, CmpT > & | var | |||
) | [inline] |
const char* cPointerMapWatcher< KeyT, ValueT, CmpT >::className | ( | ) | const [inline] |
virtual const char* cPointerMapWatcher< KeyT, ValueT, CmpT >::elemTypeName | ( | ) | const [inline, virtual] |
virtual int cPointerMapWatcher< KeyT, ValueT, CmpT >::size | ( | ) | const [inline, virtual] |
virtual std::string cPointerMapWatcher< KeyT, ValueT, CmpT >::at | ( | int | i | ) | const [inline, virtual] |
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 cPointerMapWatcher< KeyT, ValueT, CmpT >::atIt | ( | ) | const [inline, virtual] |
std::map<KeyT,ValueT,CmpT>& cPointerMapWatcher< KeyT, ValueT, CmpT >::m [protected] |
std::map<KeyT,ValueT,CmpT>::iterator cPointerMapWatcher< KeyT, ValueT, CmpT >::it [mutable, protected] |
int cPointerMapWatcher< KeyT, ValueT, CmpT >::itPos [mutable, protected] |
std::string cPointerMapWatcher< KeyT, ValueT, CmpT >::classname [protected] |