#include <hashWatch.h>
Public Member Functions | |
cStdMultiMapWatcher (const char *name, std::multimap< 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 | |
std::multimap< KeyT, ValueT, CmpT > & | m |
std::multimap< KeyT, ValueT, CmpT >::iterator | it |
int | itPos |
std::string | classname |
Definition at line 210 of file hashWatch.h.
cStdMultiMapWatcher< KeyT, ValueT, CmpT >::cStdMultiMapWatcher | ( | const char * | name, | |
std::multimap< KeyT, ValueT, CmpT > & | var | |||
) | [inline] |
Definition at line 218 of file hashWatch.h.
virtual std::string cStdMultiMapWatcher< KeyT, ValueT, CmpT >::at | ( | int | i | ) | const [inline, virtual] |
Definition at line 225 of file hashWatch.h.
00225 { 00226 // std::map doesn't support random access iterator and iteration is slow, 00227 // so we have to use a trick, knowing that Tkenv will call this function with 00228 // i=0, i=1, etc... 00229 if (i==0) { 00230 it=m.begin(); itPos=0; 00231 } else if (i==itPos+1 && it!=m.end()) { 00232 ++it; ++itPos; 00233 } else { 00234 it=m.begin(); 00235 for (int k=0; k<i && it!=m.end(); k++) ++it; 00236 itPos=i; 00237 } 00238 if (it==m.end()) { 00239 return std::string("out of bounds"); 00240 } 00241 return atIt(); 00242 }
virtual std::string cStdMultiMapWatcher< KeyT, ValueT, CmpT >::atIt | ( | ) | const [inline, virtual] |
Definition at line 243 of file hashWatch.h.
Referenced by cStdMultiMapWatcher< KeyT, ValueT, CmpT >::at().
const char* cStdMultiMapWatcher< KeyT, ValueT, CmpT >::getClassName | ( | ) | const [inline] |
Definition at line 222 of file hashWatch.h.
00222 {return classname.c_str();}
virtual const char* cStdMultiMapWatcher< KeyT, ValueT, CmpT >::getElemTypeName | ( | ) | const [inline, virtual] |
Definition at line 223 of file hashWatch.h.
virtual int cStdMultiMapWatcher< KeyT, ValueT, CmpT >::size | ( | ) | const [inline, virtual] |
Definition at line 224 of file hashWatch.h.
00224 {return m.size();}
std::string cStdMultiMapWatcher< KeyT, ValueT, CmpT >::classname [protected] |
Definition at line 216 of file hashWatch.h.
Referenced by cStdMultiMapWatcher< KeyT, ValueT, CmpT >::cStdMultiMapWatcher(), and cStdMultiMapWatcher< KeyT, ValueT, CmpT >::getClassName().
std::multimap<KeyT,ValueT,CmpT>::iterator cStdMultiMapWatcher< KeyT, ValueT, CmpT >::it [mutable, protected] |
Definition at line 214 of file hashWatch.h.
Referenced by cStdMultiMapWatcher< KeyT, ValueT, CmpT >::at(), and cStdMultiMapWatcher< KeyT, ValueT, CmpT >::atIt().
int cStdMultiMapWatcher< KeyT, ValueT, CmpT >::itPos [mutable, protected] |
Definition at line 215 of file hashWatch.h.
Referenced by cStdMultiMapWatcher< KeyT, ValueT, CmpT >::at(), and cStdMultiMapWatcher< KeyT, ValueT, CmpT >::cStdMultiMapWatcher().
std::multimap<KeyT,ValueT,CmpT>& cStdMultiMapWatcher< KeyT, ValueT, CmpT >::m [protected] |
Definition at line 213 of file hashWatch.h.
Referenced by cStdMultiMapWatcher< KeyT, ValueT, CmpT >::at(), and cStdMultiMapWatcher< KeyT, ValueT, CmpT >::size().