#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 254 of file hashWatch.h.
cStdMultiMapWatcher< KeyT, ValueT, CmpT >::cStdMultiMapWatcher | ( | const char * | name, | |
std::multimap< KeyT, ValueT, CmpT > & | var | |||
) | [inline] |
Definition at line 262 of file hashWatch.h.
virtual std::string cStdMultiMapWatcher< KeyT, ValueT, CmpT >::at | ( | int | i | ) | const [inline, virtual] |
Definition at line 269 of file hashWatch.h.
{ // std::map doesn't support random access iterator and iteration is slow, // so we have to use a trick, knowing that Tkenv will call this function with // i=0, i=1, etc... if (i==0) { it=m.begin(); itPos=0; } else if (i==itPos+1 && it!=m.end()) { ++it; ++itPos; } else { it=m.begin(); for (int k=0; k<i && it!=m.end(); k++) ++it; itPos=i; } if (it==m.end()) { return std::string("out of bounds"); } return atIt(); }
virtual std::string cStdMultiMapWatcher< KeyT, ValueT, CmpT >::atIt | ( | ) | const [inline, virtual] |
Definition at line 287 of file hashWatch.h.
Referenced by cStdMultiMapWatcher< KeyT, ValueT, CmpT >::at().
const char* cStdMultiMapWatcher< KeyT, ValueT, CmpT >::getClassName | ( | ) | const [inline] |
Definition at line 266 of file hashWatch.h.
{return classname.c_str();}
virtual const char* cStdMultiMapWatcher< KeyT, ValueT, CmpT >::getElemTypeName | ( | ) | const [inline, virtual] |
Definition at line 267 of file hashWatch.h.
{return "struct pair<*,*>";}
virtual int cStdMultiMapWatcher< KeyT, ValueT, CmpT >::size | ( | ) | const [inline, virtual] |
Definition at line 268 of file hashWatch.h.
{return m.size();}
std::string cStdMultiMapWatcher< KeyT, ValueT, CmpT >::classname [protected] |
Definition at line 260 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 258 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 259 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 257 of file hashWatch.h.
Referenced by cStdMultiMapWatcher< KeyT, ValueT, CmpT >::at(), and cStdMultiMapWatcher< KeyT, ValueT, CmpT >::size().