Public Member Functions | Protected Attributes

cDequeWatcher< T > Class Template Reference

#include <hashWatch.h>

List of all members.

Public Member Functions

 cDequeWatcher (const char *name, std::deque< T > &var)
const char * className () 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::deque< T > & v
std::string classname
std::deque< T >::iterator it
int itPos

Detailed Description

template<class T>
class cDequeWatcher< T >

Definition at line 78 of file hashWatch.h.


Constructor & Destructor Documentation

template<class T>
cDequeWatcher< T >::cDequeWatcher ( const char *  name,
std::deque< T > &  var 
) [inline]

Definition at line 86 of file hashWatch.h.

                                                          : cStdVectorWatcherBase(name), v(var) {
            itPos=-1;
            classname = std::string("deque<")+opp_typename(typeid(T))+">";
        }


Member Function Documentation

template<class T>
virtual std::string cDequeWatcher< T >::at ( int  i  )  const [inline, virtual]

Definition at line 93 of file hashWatch.h.

                                          {
            if (i==0) {
                it=v.begin(); itPos=0;
            } else if (i==itPos+1 && it!=v.end()) {
                ++it; ++itPos;
            } else {
                it=v.begin();
                for (int k=0; k<i && it!=v.end(); k++) ++it;
                itPos=i;
            }
            if (it==v.end()) {
                return std::string("out of bounds");
            }
            return atIt();
        }

template<class T>
virtual std::string cDequeWatcher< T >::atIt (  )  const [inline, virtual]

Definition at line 108 of file hashWatch.h.

                                       {
            std::stringstream out;
            out << (*it);
            return out.str();
        }

template<class T>
const char* cDequeWatcher< T >::className (  )  const [inline]

Definition at line 90 of file hashWatch.h.

{return classname.c_str();}

template<class T>
virtual const char* cDequeWatcher< T >::getElemTypeName (  )  const [inline, virtual]

Definition at line 91 of file hashWatch.h.

{return opp_typename(typeid(T));}

template<class T>
virtual int cDequeWatcher< T >::size (  )  const [inline, virtual]

Definition at line 92 of file hashWatch.h.

{return v.size();}


Member Data Documentation

template<class T>
std::string cDequeWatcher< T >::classname [protected]

Definition at line 82 of file hashWatch.h.

template<class T>
std::deque<T>::iterator cDequeWatcher< T >::it [mutable, protected]

Definition at line 83 of file hashWatch.h.

template<class T>
int cDequeWatcher< T >::itPos [mutable, protected]

Definition at line 84 of file hashWatch.h.

template<class T>
std::deque<T>& cDequeWatcher< T >::v [protected]

Definition at line 81 of file hashWatch.h.


The documentation for this class was generated from the following file: