cPointerMapWatcher< KeyT, ValueT, CmpT > Class Template Reference

#include <hashWatch.h>

List of all members.

Public Member Functions

 cPointerMapWatcher (const char *name, std::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

std::map< KeyT, ValueT, CmpT > & m
std::map< KeyT, ValueT, CmpT >
::iterator 
it
int itPos
std::string classname

Detailed Description

template<class KeyT, class ValueT, class CmpT>
class cPointerMapWatcher< KeyT, ValueT, CmpT >

Definition at line 166 of file hashWatch.h.


Constructor & Destructor Documentation

template<class KeyT, class ValueT, class CmpT>
cPointerMapWatcher< KeyT, ValueT, CmpT >::cPointerMapWatcher ( const char *  name,
std::map< KeyT, ValueT, CmpT > &  var 
) [inline]

Definition at line 174 of file hashWatch.h.

00174                                                                             : cStdVectorWatcherBase(name), m(var) {
00175             itPos=-1;
00176             classname = std::string("pointer_map<")+opp_typename(typeid(KeyT))+","+opp_typename(typeid(ValueT))+">";
00177         }


Member Function Documentation

template<class KeyT, class ValueT, class CmpT>
virtual std::string cPointerMapWatcher< KeyT, ValueT, CmpT >::at ( int  i  )  const [inline, virtual]

Definition at line 181 of file hashWatch.h.

00181                                           {
00182             if (i==0) {
00183                 it=m.begin(); itPos=0;
00184             } else if (i==itPos+1 && it!=m.end()) {
00185                 ++it; ++itPos;
00186             } else {
00187                 it=m.begin();
00188                 for (int k=0; k<i && it!=m.end(); k++) ++it;
00189                 itPos=i;
00190             }
00191             if (it==m.end()) {
00192                 return std::string("out of bounds");
00193             }
00194             return atIt();
00195         }

template<class KeyT, class ValueT, class CmpT>
virtual std::string cPointerMapWatcher< KeyT, ValueT, CmpT >::atIt (  )  const [inline, virtual]

Definition at line 196 of file hashWatch.h.

00196                                        {
00197             std::stringstream out;
00198             out << it->first << " ==> " << *(it->second);
00199             return out.str();
00200         }

template<class KeyT, class ValueT, class CmpT>
const char* cPointerMapWatcher< KeyT, ValueT, CmpT >::getClassName (  )  const [inline]

Definition at line 178 of file hashWatch.h.

00178 {return classname.c_str();}

template<class KeyT, class ValueT, class CmpT>
virtual const char* cPointerMapWatcher< KeyT, ValueT, CmpT >::getElemTypeName (  )  const [inline, virtual]

Definition at line 179 of file hashWatch.h.

00179 {return "struct pair<*,*>";}

template<class KeyT, class ValueT, class CmpT>
virtual int cPointerMapWatcher< KeyT, ValueT, CmpT >::size (  )  const [inline, virtual]

Definition at line 180 of file hashWatch.h.

00180 {return m.size();}


Member Data Documentation

template<class KeyT, class ValueT, class CmpT>
std::string cPointerMapWatcher< KeyT, ValueT, CmpT >::classname [protected]

Definition at line 172 of file hashWatch.h.

template<class KeyT, class ValueT, class CmpT>
std::map<KeyT,ValueT,CmpT>::iterator cPointerMapWatcher< KeyT, ValueT, CmpT >::it [mutable, protected]

Definition at line 170 of file hashWatch.h.

template<class KeyT, class ValueT, class CmpT>
int cPointerMapWatcher< KeyT, ValueT, CmpT >::itPos [mutable, protected]

Definition at line 171 of file hashWatch.h.

template<class KeyT, class ValueT, class CmpT>
std::map<KeyT,ValueT,CmpT>& cPointerMapWatcher< KeyT, ValueT, CmpT >::m [protected]

Definition at line 169 of file hashWatch.h.


The documentation for this class was generated from the following file:
Generated on Wed May 26 16:21:17 2010 for OverSim by  doxygen 1.6.3