FairRoot/PandaRoot
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
PndCAInternal::ArrayBase< T, 1 > Class Template Reference

#include <PndCAArray.h>

Inheritance diagram for PndCAInternal::ArrayBase< T, 1 >:
PndCAInternal::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)
 
bool IsInBounds (int) const
 
void SetBounds (int, int)
 
void MoveBounds (int)
 
void ReinterpretCast (const ArrayBoundsCheck &, int, int)
 

Protected Attributes

TfData
 
int fSize
 

Friends

class ArrayBase< T, 2 >
 

Detailed Description

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

1-dim arrays only have operator[]

Definition at line 231 of file PndCAArray.h.

Member Typedef Documentation

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

Definition at line 238 of file PndCAArray.h.

Constructor & Destructor Documentation

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

Definition at line 235 of file PndCAArray.h.

235 : fData( 0 ) {} // XXX really shouldn't be done. But -Weffc++ wants it so
template<typename T >
PndCAInternal::ArrayBase< T, 1 >::ArrayBase ( const ArrayBase< T, 1 > &  rhs)
inline

Definition at line 236 of file PndCAArray.h.

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

Member Function Documentation

bool PndCAInternal::ArrayBoundsCheck::IsInBounds ( int  ) const
inlineprotectedinherited

Definition at line 113 of file PndCAArray.h.

113 { return true; }
void PndCAInternal::ArrayBoundsCheck::MoveBounds ( int  )
inlineprotectedinherited

Definition at line 115 of file PndCAArray.h.

115 {}
template<typename T >
ArrayBase& PndCAInternal::ArrayBase< T, 1 >::operator= ( const ArrayBase< T, 1 > &  rhs)
inline

Definition at line 237 of file PndCAArray.h.

237 { ArrayBoundsCheck::operator=( rhs ); fData = rhs.fData; fSize = rhs.fSize; return *this; } // XXX
template<typename T >
R& PndCAInternal::ArrayBase< T, 1 >::operator[] ( int  x)
inline

return a reference to the value at the given index

Definition at line 242 of file PndCAArray.h.

References BOUNDS_CHECK, and x.

242 { BOUNDS_CHECK( x, fData[0] ); return fData[x]; }
Double_t x
#define BOUNDS_CHECK(x, y)
Definition: PndCAArray.h:118
template<typename T >
const R& PndCAInternal::ArrayBase< T, 1 >::operator[] ( int  x) const
inline

return a const reference to the value at the given index

Definition at line 246 of file PndCAArray.h.

References BOUNDS_CHECK, and x.

246 { BOUNDS_CHECK( x, fData[0] ); return fData[x]; }
Double_t x
#define BOUNDS_CHECK(x, y)
Definition: PndCAArray.h:118
void PndCAInternal::ArrayBoundsCheck::ReinterpretCast ( const ArrayBoundsCheck ,
int  ,
int   
)
inlineprotectedinherited

Definition at line 116 of file PndCAArray.h.

116 {}
void PndCAInternal::ArrayBoundsCheck::SetBounds ( int  ,
int   
)
inlineprotectedinherited

Definition at line 114 of file PndCAArray.h.

114 {}
template<typename T >
void PndCAInternal::ArrayBase< T, 1 >::SetSize ( int  x,
int  ,
int   
)
inlineprotected

Definition at line 251 of file PndCAArray.h.

References x.

Friends And Related Function Documentation

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

Definition at line 233 of file PndCAArray.h.

Member Data Documentation

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

Definition at line 249 of file PndCAArray.h.

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

Definition at line 250 of file PndCAArray.h.


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