BOSS 7.1.2
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
 

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 eemmg-lib-new/src/pointer.h.

Member Typedef Documentation

◆ iterator

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

Definition at line 145 of file eemmg-lib-new/src/pointer.h.

◆ Ptr

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

Definition at line 137 of file eemmg-lib-new/src/pointer.h.

Constructor & Destructor Documentation

◆ CArray() [1/2]

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

Definition at line 139 of file eemmg-lib-new/src/pointer.h.

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

◆ CArray() [2/2]

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

Definition at line 139 of file 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 eemmg-lib-new/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 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 eemmg-lib-new/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 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 eemmg-lib-new/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 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 eemmg-lib-new/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 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

Definition at line 150 of file eemmg-lib-new/src/pointer.h.


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