cHashSetWatcher< T > Class Template Reference
#include <hashWatch.h>
List of all members.
template<class T>
class cHashSetWatcher< T >
|
Public Member Functions |
| cHashSetWatcher (const char *name, UNORDERED_SET< T > &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 |
UNORDERED_SET< T > & | v |
std::string | classname |
UNORDERED_SET< T >::iterator | it |
int | itPos |
Constructor & Destructor Documentation
00041 : cStdVectorWatcherBase(name), v(var) {
00042 itPos=-1;
00043 classname = std::string("unordered_set<")+opp_typename(typeid(T))+">";
00044 }
Member Function Documentation
template<class T>
virtual const char* cHashSetWatcher< T >::elemTypeName |
( |
|
) |
const [inline, virtual] |
00046 {return opp_typename(typeid(T));}
template<class T>
virtual std::string cHashSetWatcher< T >::at |
( |
int |
i |
) |
const [inline, virtual] |
00048 {
00049 if (i==0) {
00050 it=v.begin(); itPos=0;
00051 } else if (i==itPos+1 && it!=v.end()) {
00052 ++it; ++itPos;
00053 } else {
00054 it=v.begin();
00055 for (int k=0; k<i && it!=v.end(); k++) ++it;
00056 itPos=i;
00057 }
00058 if (it==v.end()) {
00059 return std::string("out of bounds");
00060 }
00061 return atIt();
00062 }
00063 {
00064 std::stringstream out;
00065 out << (*it);
00066 return out.str();
00067 }
Member Data Documentation
The documentation for this class was generated from the following file: