BOSS 7.0.6
BESIII Offline Software System
Loading...
Searching...
No Matches
NIter< T, N > Class Template Reference

#include <pointer.h>

Public Member Functions

T & operator* ()
 
T * operator-> ()
 
NIteroperator++ ()
 
NIteroperator+= (int n)
 
bool operator== (const NIter &iter)
 
bool operator!= (const NIter &iter)
 
 NIter (T *begin, int last)
 

Friends

class DArray< T, N >
 

Detailed Description

template<typename T, int N>
class NIter< T, N >

Definition at line 59 of file pointer.h.

Constructor & Destructor Documentation

◆ NIter()

template<typename T , int N>
NIter< T, N >::NIter ( T *  begin,
int  last 
)
inline

Definition at line 71 of file pointer.h.

71: ptr(begin), idx(last) {}

Member Function Documentation

◆ operator!=()

template<typename T , int N>
bool NIter< T, N >::operator!= ( const NIter< T, N > &  iter)
inline

Definition at line 69 of file pointer.h.

69{ return idx!=iter.idx || ptr!=iter.ptr; }
EvtStreamInputIterator< typename Generator::result_type > iter(Generator gen, int N=0)

◆ operator*()

template<typename T , int N>
T & NIter< T, N >::operator* ( )
inline

Definition at line 63 of file pointer.h.

63{ return ptr[idx%N]; }

◆ operator++()

template<typename T , int N>
NIter & NIter< T, N >::operator++ ( )
inline

Definition at line 65 of file pointer.h.

65{ idx++; return *this;}

◆ operator+=()

template<typename T , int N>
NIter & NIter< T, N >::operator+= ( int  n)
inline

Definition at line 66 of file pointer.h.

66{ idx+=n; return *this;}

◆ operator->()

template<typename T , int N>
T * NIter< T, N >::operator-> ( )
inline

Definition at line 64 of file pointer.h.

64{ return &ptr[idx%N]; }

◆ operator==()

template<typename T , int N>
bool NIter< T, N >::operator== ( const NIter< T, N > &  iter)
inline

Definition at line 68 of file pointer.h.

68{ return idx==iter.idx && ptr==iter.ptr; }

Friends And Related Function Documentation

◆ DArray< T, N >

template<typename T , int N>
friend class DArray< T, N >
friend

Definition at line 53 of file pointer.h.


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