PandaRoot
PndFTSInternal::ArrayBase< T, 1 > Class Template Reference

#include <PndFTSArray.h>

Inheritance diagram for PndFTSInternal::ArrayBase< T, 1 >:
PndFTSInternal::ArrayBoundsCheck

Public Types

typedef ReturnTypeHelper< T >::Type R
 

Public Member Functions

 ArrayBase ()
 
 ArrayBase (const ArrayBase &rhs)
 
ArrayBaseoperator= (const ArrayBase &rhs)
 
Roperator[] (int x)
 
const Roperator[] (int x) const
 

Protected Member Functions

void SetSize (int x, int, int)
 
- Protected Member Functions inherited from PndFTSInternal::ArrayBoundsCheck
virtual ~ArrayBoundsCheck ()
 
bool IsInBounds (int) const
 
void SetBounds (int, int)
 
void MoveBounds (int)
 
void ReinterpretCast (const ArrayBoundsCheck &, int, int)
 

Protected Attributes

T * fData
 
int fSize
 

Friends

class ArrayBase< T, 2 >
 

Detailed Description

template<typename T>
class PndFTSInternal::ArrayBase< T, 1 >

1-dim arrays only have operator[]

Definition at line 298 of file PndFTSArray.h.

Member Typedef Documentation

◆ R

template<typename T >
typedef ReturnTypeHelper<T>::Type PndFTSInternal::ArrayBase< T, 1 >::R

Definition at line 311 of file PndFTSArray.h.

Constructor & Destructor Documentation

◆ ArrayBase() [1/2]

template<typename T >
PndFTSInternal::ArrayBase< T, 1 >::ArrayBase ( )
inline

Definition at line 302 of file PndFTSArray.h.

302 : fData(0) {} // XXX really shouldn't be done. But -Weffc++ wants it so

◆ ArrayBase() [2/2]

template<typename T >
PndFTSInternal::ArrayBase< T, 1 >::ArrayBase ( const ArrayBase< T, 1 > &  rhs)
inline

Definition at line 303 of file PndFTSArray.h.

303 : ArrayBoundsCheck(rhs), fData(rhs.fData), fSize(rhs.fSize) {} // XXX

Member Function Documentation

◆ operator=()

template<typename T >
ArrayBase& PndFTSInternal::ArrayBase< T, 1 >::operator= ( const ArrayBase< T, 1 > &  rhs)
inline

Definition at line 304 of file PndFTSArray.h.

305  {
306  ArrayBoundsCheck::operator=(rhs);
307  fData = rhs.fData;
308  fSize = rhs.fSize;
309  return *this;
310  } // XXX

◆ operator[]() [1/2]

template<typename T >
R& PndFTSInternal::ArrayBase< T, 1 >::operator[] ( int  x)
inline

return a reference to the value at the given index

Definition at line 315 of file PndFTSArray.h.

References BOUNDS_CHECK.

316  {
317  BOUNDS_CHECK(x, fData[0]);
318  return fData[x];
319  }
#define BOUNDS_CHECK(x, y)
Definition: PndFTSArray.h:134

◆ operator[]() [2/2]

template<typename T >
const R& PndFTSInternal::ArrayBase< T, 1 >::operator[] ( int  x) const
inline

return a const reference to the value at the given index

Definition at line 323 of file PndFTSArray.h.

References BOUNDS_CHECK.

324  {
325  BOUNDS_CHECK(x, fData[0]);
326  return fData[x];
327  }
#define BOUNDS_CHECK(x, y)
Definition: PndFTSArray.h:134

◆ SetSize()

template<typename T >
void PndFTSInternal::ArrayBase< T, 1 >::SetSize ( int  x,
int  ,
int   
)
inlineprotected

Definition at line 332 of file PndFTSArray.h.

Friends And Related Function Documentation

◆ ArrayBase< T, 2 >

template<typename T >
friend class ArrayBase< T, 2 >
friend

Definition at line 299 of file PndFTSArray.h.

Member Data Documentation

◆ fData

template<typename T >
T* PndFTSInternal::ArrayBase< T, 1 >::fData
protected

Definition at line 330 of file PndFTSArray.h.

◆ fSize

template<typename T >
int PndFTSInternal::ArrayBase< T, 1 >::fSize
protected

Definition at line 331 of file PndFTSArray.h.


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