NSCL DDAS  1.0
Support for XIA DDAS at the NSCL
 All Classes Namespaces Files Functions Variables Macros Pages
Public Types | Public Member Functions | List of all members
TrAnal::TrIterator< T > Class Template Reference

TrIterator template class. More...

#include <TrIterator.hpp>

Public Types

typedef T value_type
 
typedef ptrdiff_t difference_type
 
typedef T * pointer
 
typedef T & reference
 
typedef std::input_iterator_tag iterator_category
 

Public Member Functions

 TrIterator (const T *iter=0)
 Default constructor. More...
 
 TrIterator (const TrIterator &iter)
 Copy constructor. More...
 
TrIteratoroperator= (const TrIterator &iter)
 Assignment operator. More...
 
bool operator== (const TrIterator &iter) const
 Equality operator.
 
bool operator!= (const TrIterator &iter) const
 Inequality operator.
 
bool operator< (const TrIterator &iter) const
 Less than operator.
 
bool operator<= (const TrIterator &iter) const
 Less than or equal to operator.
 
bool operator> (const TrIterator &iter) const
 Greater than operator.
 
bool operator>= (const TrIterator &iter) const
 Greater than or equal to operator.
 
TrIteratoroperator++ ()
 ++iter type incrementation
 
TrIterator operator++ (int)
 iter++ type incremenation
 
TrIteratoroperator-- ()
 –iter type decrementation
 
TrIterator operator-- (int)
 iter– type decremenation
 
TrIterator operator+ (int n) const
 iter+n
 
TrIteratoroperator+= (int n)
 iter += n
 
TrIterator operator- (int n) const
 iter-n
 
TrIteratoroperator-= (int n)
 iter -= n
 
difference_type operator- (const TrIterator &that) const
 Distance between two iterators. More...
 
value_type operator* () const
 Dereference operator. More...
 

Detailed Description

template<class T>
class TrAnal::TrIterator< T >

TrIterator template class.

The bedrock component of the Traiter package. It is a basic iterator that provides the full functionality of an input iterator. However, it also supports random access at a minimum level for convenience. TrIterators DO NOT alter the trace elements pointed to. They can be copied, assigned to, subtracted from one another, and compared with one another.

Constructor & Destructor Documentation

template<class T>
TrAnal::TrIterator< T >::TrIterator ( const T *  iter = 0)
inline

Default constructor.

Default to a null iterator when the argument is absent. Dereferencing a null iterator is undefined and will result in unpredictable behavior. It is the user's responsibility to avoid this.

Parameters
iteris a pointer to an object of type T
template<class T>
TrAnal::TrIterator< T >::TrIterator ( const TrIterator< T > &  iter)
inline

Copy constructor.

Creates a new iterator that points at the same object as the argument.

Parameters
iterthe iterator to copy

Member Function Documentation

template<class T>
value_type TrAnal::TrIterator< T >::operator* ( ) const
inline

Dereference operator.

Returns
value currently pointed to by the iterator
template<class T>
difference_type TrAnal::TrIterator< T >::operator- ( const TrIterator< T > &  that) const
inline

Distance between two iterators.

Returns
number of elements between the two iterators
template<class T>
TrIterator& TrAnal::TrIterator< T >::operator= ( const TrIterator< T > &  iter)
inline

Assignment operator.

Copies the internal pointer

Parameters
iterthe TrIterator whose state will be copied
Returns
reference to this

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