MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
VecIter< T > Class Template Reference

#include <veciter.h>

Inheritance diagram for VecIter< T >:
Collaboration diagram for VecIter< T >:

Public Member Functions

 VecIter (void)
 
 VecIter (const T *p, unsigned i)
 
virtual ~VecIter (void)
 
void Init (const T *p, unsigned i)
 
bool bGetFirst (T &TReturn) const
 
bool bGetCurr (T &TReturn) const
 
bool bGetNext (T &TReturn) const
 
- Public Member Functions inherited from Iter< T >
virtual ~Iter (void)
 

Protected Attributes

T * pStart
 
T * pCount
 
unsigned iSize
 

Detailed Description

template<class T>
class VecIter< T >

Definition at line 60 of file veciter.h.

Constructor & Destructor Documentation

template<class T>
VecIter< T >::VecIter ( void  )
inline

Definition at line 67 of file veciter.h.

67 : pStart(0), pCount(0), iSize(0) { NO_OP; };
#define NO_OP
Definition: myassert.h:74
T * pStart
Definition: veciter.h:62
T * pCount
Definition: veciter.h:63
unsigned iSize
Definition: veciter.h:64
template<class T>
VecIter< T >::VecIter ( const T *  p,
unsigned  i 
)
inline

Definition at line 68 of file veciter.h.

68  : pStart(p), pCount(p), iSize(i)
69  {
70  ASSERT(pStart != 0);
71  ASSERT(iSize > 0);
72  };
T * pStart
Definition: veciter.h:62
#define ASSERT(expression)
Definition: colamd.c:977
T * pCount
Definition: veciter.h:63
unsigned iSize
Definition: veciter.h:64
template<class T>
virtual VecIter< T >::~VecIter ( void  )
inlinevirtual

Definition at line 74 of file veciter.h.

75  {
76  NO_OP;
77  };
#define NO_OP
Definition: myassert.h:74

Member Function Documentation

template<class T>
bool VecIter< T >::bGetCurr ( T &  TReturn) const
inline

Definition at line 103 of file veciter.h.

104  {
105  ASSERT(pStart != NULL);
106  ASSERT(iSize > 0);
107  ASSERT(pCount >= pStart);
108 
109  if (pCount == pStart + iSize) {
110  return false;
111  }
112 
113  TReturn = *pCount;
114 
115  return true;
116  };
T * pStart
Definition: veciter.h:62
#define ASSERT(expression)
Definition: colamd.c:977
T * pCount
Definition: veciter.h:63
unsigned iSize
Definition: veciter.h:64
template<class T>
bool VecIter< T >::bGetFirst ( T &  TReturn) const
inlinevirtual
template<class T>
bool VecIter< T >::bGetNext ( T &  TReturn) const
inlinevirtual
template<class T>
void VecIter< T >::Init ( const T *  p,
unsigned  i 
)
inline

Definition at line 79 of file veciter.h.

Referenced by DataManager::ElemDataInit().

80  {
81  ASSERT(p != NULL);
82  ASSERT(i > 0);
83 
84  pStart = pCount = const_cast<T *>(p);
85  iSize = i;
86  };
T * pStart
Definition: veciter.h:62
#define ASSERT(expression)
Definition: colamd.c:977
T * pCount
Definition: veciter.h:63
unsigned iSize
Definition: veciter.h:64

Member Data Documentation

template<class T>
unsigned VecIter< T >::iSize
protected
template<class T>
T* VecIter< T >::pCount
mutableprotected
template<class T>
T* VecIter< T >::pStart
mutableprotected

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