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 665 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 668 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 667 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 669 of file PndFTSArray.h.

670  {
671  fData = fFixedArray.ConstructAlignedData();
672  Parent::SetBounds(0, Size::Size - 1);
673  SetSize(Size::X, Size::Y, Size::Z);
674  }

◆ 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 675 of file PndFTSArray.h.

676  {
677  fData = fFixedArray.ConstructAlignedData();
678  Parent::SetBounds(0, Size::Size - 1);
679  SetSize(Size::X, Size::Y, Size::Z);
680  std::memcpy(fData, rhs.fData, Size::Size * sizeof(T));
681  }

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