PandaRoot
PndFTSFixedArray< T, Size, alignment > Class Template Reference

#include <PndFTSArray.h>

Inheritance diagram for PndFTSFixedArray< T, Size, alignment >:
PndFTSArray< PndFTSInternal::TypeForAlignmentHelper< T, alignment >::Type, Size::Dim > PndFTSInternal::ArrayBase< PndFTSInternal::TypeForAlignmentHelper< T, alignment >::Type, Dim >

Public Types

typedef PndFTSInternal::TypeForAlignmentHelper< T, alignment >::Type T2
 
typedef PndFTSInternal::ArrayBase< T2, Size::Dim > Parent
 
- Public Types inherited from PndFTSArray< PndFTSInternal::TypeForAlignmentHelper< T, alignment >::Type, Size::Dim >
typedef PndFTSInternal::ArrayBase< PndFTSInternal::TypeForAlignmentHelper< T, alignment >::Type, Dim > Parent
 

Public Member Functions

 PndFTSFixedArray ()
 
 PndFTSFixedArray (const PndFTSFixedArray &rhs)
 
- Public Member Functions inherited from PndFTSArray< PndFTSInternal::TypeForAlignmentHelper< T, alignment >::Type, Size::Dim >
int Size () const
 
 operator bool () const
 
bool IsValid () const
 
PndFTSInternal::TypeForAlignmentHelper< T, alignment >::Type & operator* ()
 
const PndFTSInternal::TypeForAlignmentHelper< T, alignment >::Type & operator* () const
 
PndFTSInternal::TypeForAlignmentHelper< T, alignment >::Type * Data ()
 
const PndFTSInternal::TypeForAlignmentHelper< T, alignment >::Type * Data () const
 
PndFTSArray operator+ (int x) const
 
PndFTSArray operator- (int x) const
 
PndFTSArray< Other, Dim > ReinterpretCast () const
 

Detailed Description

template<typename T, typename Size, int alignment = 0>
class PndFTSFixedArray< T, Size, alignment >

Owns the data. When it goes out of scope the data is freed.

The memory is allocated on the stack.

Instantiate this class on the stack.

Parameters
Ttype of the entries in the array.
Sizenumber of entries in the array.
Dimselects the operator[]/operator() behavior it should have. I.e. makes it behave like a 1-, 2- or 3-dim array. (defaults to 1)

Definition at line 653 of file PndFTSArray.h.

Member Typedef Documentation

◆ Parent

template<typename T , typename Size , int alignment = 0>
typedef PndFTSInternal::ArrayBase<T2, Size::Dim> PndFTSFixedArray< T, Size, alignment >::Parent

Definition at line 656 of file PndFTSArray.h.

◆ T2

template<typename T , typename Size , int alignment = 0>
typedef PndFTSInternal::TypeForAlignmentHelper<T, alignment>::Type PndFTSFixedArray< T, Size, alignment >::T2

Definition at line 655 of file PndFTSArray.h.

Constructor & Destructor Documentation

◆ PndFTSFixedArray() [1/2]

template<typename T , typename Size , int alignment = 0>
PndFTSFixedArray< T, Size, alignment >::PndFTSFixedArray ( )
inline

Definition at line 657 of file PndFTSArray.h.

658  {
659  fData = fFixedArray.ConstructAlignedData();
660  Parent::SetBounds(0, Size::Size - 1);
661  SetSize(Size::X, Size::Y, Size::Z);
662  }

◆ PndFTSFixedArray() [2/2]

template<typename T , typename Size , int alignment = 0>
PndFTSFixedArray< T, Size, alignment >::PndFTSFixedArray ( const PndFTSFixedArray< T, Size, alignment > &  rhs)
inline

Definition at line 663 of file PndFTSArray.h.

664  {
665  fData = fFixedArray.ConstructAlignedData();
666  Parent::SetBounds(0, Size::Size - 1);
667  SetSize(Size::X, Size::Y, Size::Z);
668  std::memcpy(fData, rhs.fData, Size::Size * sizeof(T));
669  }

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