GCpp general purpose C++ library  version 1.0
GVectIterT< T > Class Template Reference

#include <GVectIterT.hh>

Inheritance diagram for GVectIterT< T >:
GIterT< T >

Public Member Functions

template<class Q >
bool IsInstanceOf () const
 
template<class Q >
bool IsInstanceOf ()
 
virtual GVectIterT< T > * Clone () const
 
virtual const char * ClassName () const
 
 GVectIterT ()
 
 GVectIterT (const GVectIterT< T > &p)
 
virtual ~GVectIterT ()
 
GVectIterT< T > & operator= (const GVectIterT< T > &p)
 
const GVectT< T > * GetVectorPtr () const
 
GVectT< T > * GetVectorPtr ()
 
virtual bool operator== (const GVectIterT< T > &p) const
 
virtual bool operator!= (const GVectIterT< T > &p) const
 
virtual bool operator== (const T *p) const
 
virtual bool operator!= (const T *p) const
 
GVectIterT< T > & operator++ (void)
 
GVectIterT< T > & operator-- (void)
 
GVectIterT< T > operator++ (int)
 
GVectIterT< T > operator-- (int)
 
virtual int Index () const
 
- Public Member Functions inherited from GIterT< T >
template<class Q >
bool IsInstanceOf () const
 
template<class Q >
bool IsInstanceOf ()
 
 GIterT (T *adr=NULL)
 
 GIterT (const GIterT< T > &p)
 
GIterT< T > & operator= (const GIterT< T > &p)
 
GIterT< T > & operator= (T *adr)
 
void SetItemPtr (T *adr)
 
u_int GetFlags () const
 
void SetFlags (u_int fl)
 
void SetFlag (u_int fl, bool on=true)
 
bool IsFlagOn (u_int fl) const
 
bool IsFlagOff (u_int fl) const
 
 operator bool (void) const
 
 operator T * (void) const
 
virtual T & operator* (void)
 
virtual T * operator-> (void)
 
virtual const T & operator* (void) const
 
virtual const T * operator-> (void) const
 
virtual bool operator== (const GIterT< T > &p) const
 
virtual bool operator!= (const GIterT< T > &p) const
 
GIterT< T > & operator++ (void)
 
GIterT< T > & operator-- (void)
 
GIterT< T > operator++ (int)
 
GIterT< T > operator-- (int)
 
T * GetPointer ()
 

Static Public Member Functions

static const char * StaticClassName ()
 
- Static Public Member Functions inherited from GIterT< T >
static const char * StaticClassName ()
 

Protected Member Functions

 GVectIterT (const GVectT< T > *vect, int ind)
 

Protected Attributes

GVectT< T > * vector_ptr
 Vector the iterator points to.
 
int index
 Index in the vector array.
 
- Protected Attributes inherited from GIterT< T >
u_int flags
 Iterator flags.
 
T * item_ptr
 Pointer on the instance of class T object.
 

Friends

class GVectT< T >
 

Detailed Description

template<class T>
class GVectIterT< T >

The template class GVectIterT defines the vector collections iterator.

Constructor & Destructor Documentation

template<class T >
GVectIterT< T >::GVectIterT ( )
inline

Defaut constructor.

References GDebugConst, GVectIterT< T >::index, and GVectIterT< T >::vector_ptr.

template<class T >
GVectIterT< T >::GVectIterT ( const GVectIterT< T > &  p)
inline

Copy constructor.

Parameters
piterator to be copied.

References GDebugConst, GVectIterT< T >::GetVectorPtr(), GVectIterT< T >::index, GVectIterT< T >::Index(), and GVectIterT< T >::vector_ptr.

template<class T >
GVectIterT< T >::GVectIterT ( const GVectT< T > *  vect,
int  ind 
)
protected

Constructor from a vector and an index in the vector. It is for internal use by GVectT class.

Parameters
vectpointer on the GVectT object
indindex value

References G_AFFECT_MOTHER, GDebugConst, GVectIterT< T >::index, and GVectIterT< T >::vector_ptr.

template<class T >
GVectIterT< T >::~GVectIterT ( )
inlinevirtual

Destructor.

References GDebugDest.

Member Function Documentation

template<class T >
const GVectT< T > * GVectIterT< T >::GetVectorPtr ( ) const
inline

Return the pointer to the vector the iterator comes from.

Referenced by GVectIterT< T >::GVectIterT(), GVectIterT< T >::operator!=(), and GVectIterT< T >::operator==().

template<class T >
GVectT< T > * GVectIterT< T >::GetVectorPtr ( )
inline

Return the pointer to the vector the iterator comes from.

template<class T >
int GVectIterT< T >::Index ( ) const
inlinevirtual

Return iterator position in the vector.

Referenced by GVectIterT< T >::GVectIterT(), GVectIterT< T >::operator!=(), and GVectIterT< T >::operator==().

template<class T>
template<class Q >
bool GVectIterT< T >::IsInstanceOf ( ) const
inline

Macro from GCpp library that defines the following functions:

  • ClassName(): return the real class name of the object
  • StaticClassName(): return the used class name of the object (that may be a base class of the real object).
  • IsInstanceOf<T>(): return true if the current object is an instance of the template class name argument
  • Clone(): return an allocated copy of the object.
template<class T >
bool GVectIterT< T >::operator!= ( const GVectIterT< T > &  p) const
inlinevirtual

Return true if the class T object pointer, the previous or next iterator are the different.

References GVectIterT< T >::GetVectorPtr(), and GVectIterT< T >::Index().

template<class T >
bool GVectIterT< T >::operator!= ( const T *  p) const
inlinevirtual

Return true if the iterator does not point to the argument object pointer.

Reimplemented from GIterT< T >.

template<class T >
GVectIterT< T > & GVectIterT< T >::operator++ ( void  )
inline

Prefix incrementation (faster that postfix). It replaces current iterator by next one for the vector. If vector is not defined, or if it goes beyond the vector limits, it returns a null iterator.

References G_AFFECT_MOTHER.

template<class T >
GVectIterT< T > GVectIterT< T >::operator++ ( int  )

Postfix incrementation. It replaces current iterator by next one for the vector. If vector is not defined, or if it goes beyond the vector limits, it returns a null iterator.

References G_AFFECT_MOTHER.

template<class T >
GVectIterT< T > & GVectIterT< T >::operator-- ( void  )
inline

Prefix decrementation (faster that postfix). It replaces current iterator by previous one for the vector. If vector is not defined, or if it goes beyond the vector limits, it returns a null iterator.

References G_AFFECT_MOTHER.

template<class T >
GVectIterT< T > GVectIterT< T >::operator-- ( int  )

Postfix decrementation. It replaces current iterator by previous one for the vector. If vector is not defined, or if it goes beyond the vector limits, it returns a null iterator.

References G_AFFECT_MOTHER.

template<class T >
bool GVectIterT< T >::operator== ( const GVectIterT< T > &  p) const
inlinevirtual

Return true if the class T object pointer, the previous and next iterator are the same.

References GVectIterT< T >::GetVectorPtr(), and GVectIterT< T >::Index().

template<class T >
bool GVectIterT< T >::operator== ( const T *  p) const
inlinevirtual

Return true if the iterator points to the argument object pointer.

Reimplemented from GIterT< T >.


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