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

#include <pointer.h>

Public Types

typedef std::auto_ptr< CArrayPtr
 
typedef T * iterator
 
typedef std::auto_ptr< CArrayPtr
 
typedef T * iterator
 

Public Member Functions

 CArray (T dval=T())
 
iterator begin ()
 
iterator end ()
 
const T & operator[] (const int idx) const
 
T & operator[] (const int idx)
 
 CArray (T dval=T())
 
iterator begin ()
 
iterator end ()
 
const T & operator[] (const int idx) const
 
T & operator[] (const int idx)
 

Static Public Attributes

static const int size = N
 

Detailed Description

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

Definition at line 134 of file bak-BesEvtGen-00-04-08/src/phokhara/eemmg-lib/src/pointer.h.

Member Typedef Documentation

◆ iterator [1/2]

template<typename T , int N>
typedef T* CArray< T, N >::iterator

◆ iterator [2/2]

template<typename T , int N>
typedef T* CArray< T, N >::iterator

◆ Ptr [1/2]

template<typename T , int N>
typedef std::auto_ptr<CArray> CArray< T, N >::Ptr

◆ Ptr [2/2]

template<typename T , int N>
typedef std::auto_ptr<CArray> CArray< T, N >::Ptr

Constructor & Destructor Documentation

◆ CArray() [1/2]

template<typename T , int N>
CArray< T, N >::CArray ( dval = T())
inline

◆ CArray() [2/2]

template<typename T , int N>
CArray< T, N >::CArray ( dval = T())
inline

Definition at line 139 of file BesEvtGen-00-04-08/src/phokhara/eemmg-lib/src/pointer.h.

139 {
140 for (iterator i=begin(); i!=end(); ++i) {
141 *i=dval;
142 }
143 }

Member Function Documentation

◆ begin() [1/2]

template<typename T , int N>
iterator CArray< T, N >::begin ( )
inline

Definition at line 146 of file bak-BesEvtGen-00-04-08/src/phokhara/eemmg-lib/src/pointer.h.

146{ return &elems[0]; }

Referenced by CArray< T, N >::CArray().

◆ begin() [2/2]

template<typename T , int N>
iterator CArray< T, N >::begin ( )
inline

Definition at line 146 of file BesEvtGen-00-04-08/src/phokhara/eemmg-lib/src/pointer.h.

146{ return &elems[0]; }

◆ end() [1/2]

template<typename T , int N>
iterator CArray< T, N >::end ( )
inline

Definition at line 147 of file bak-BesEvtGen-00-04-08/src/phokhara/eemmg-lib/src/pointer.h.

147{ return &elems[N]; }

Referenced by CArray< T, N >::CArray().

◆ end() [2/2]

template<typename T , int N>
iterator CArray< T, N >::end ( )
inline

Definition at line 147 of file BesEvtGen-00-04-08/src/phokhara/eemmg-lib/src/pointer.h.

147{ return &elems[N]; }

◆ operator[]() [1/4]

template<typename T , int N>
T & CArray< T, N >::operator[] ( const int  idx)
inline

Definition at line 153 of file bak-BesEvtGen-00-04-08/src/phokhara/eemmg-lib/src/pointer.h.

153{ return elems[idx]; }

◆ operator[]() [2/4]

template<typename T , int N>
T & CArray< T, N >::operator[] ( const int  idx)
inline

Definition at line 153 of file BesEvtGen-00-04-08/src/phokhara/eemmg-lib/src/pointer.h.

153{ return elems[idx]; }

◆ operator[]() [3/4]

template<typename T , int N>
const T & CArray< T, N >::operator[] ( const int  idx) const
inline

Definition at line 152 of file bak-BesEvtGen-00-04-08/src/phokhara/eemmg-lib/src/pointer.h.

152{ return elems[idx]; }

◆ operator[]() [4/4]

template<typename T , int N>
const T & CArray< T, N >::operator[] ( const int  idx) const
inline

Definition at line 152 of file BesEvtGen-00-04-08/src/phokhara/eemmg-lib/src/pointer.h.

152{ return elems[idx]; }

Member Data Documentation

◆ size

template<typename T , int N>
static const int CArray< T, N >::size = N
static

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