Ocean
Ocean::Frame::PlaneInitializer< T > Class Template Reference

This class implements a helper class which can be used to initialize a multi-plane frame in the constructor. More...

Public Member Functions

 PlaneInitializer (const T *constdata, const CopyMode copyMode, const unsigned int dataPaddingElements=0u)
 Creates a new initializer object for a read-only memory pointer. More...
 
 PlaneInitializer (T *data, const CopyMode copyMode, const unsigned int dataPaddingElements=0u)
 Creates a new initializer object for a writable memory pointer. More...
 
 PlaneInitializer (const unsigned int planePaddingElements=0u)
 Creates a new initializer object for a new plane for which the number of padding elements is known. More...
 

Static Protected Member Functions

static std::vector< PlaneInitializer< T > > createPlaneInitializersWithPaddingElements (const Indices32 &paddingElementsPerPlane)
 Creates plane initializer objects with padding elements only. More...
 

Protected Attributes

const T * constdata_ = nullptr
 The pointer to the read-only source memory, can be nullptr. More...
 
T * data_ = nullptr
 The pointer to the writable source memory, can be nullptr. More...
 
CopyMode copyMode_ = CopyMode(0u)
 The copy mode to be applied, unused if constdata_ == nullptr and data_ == nullptr. More...
 
unsigned int paddingElements_ = 0u
 If a valid memory pointer is provided, the number of padding elements at the end of each source memory row; Otherwise, the number of padding elements at the end row of the new plane, with range [0, infinity) More...
 

Friends

class Frame
 

Detailed Description

template<typename T>
class Ocean::Frame::PlaneInitializer< T >

This class implements a helper class which can be used to initialize a multi-plane frame in the constructor.

The class is mainly a temporary storage for memory pointers, copy modes, and number of padding elements.

Template Parameters
TThe data type of the frame's element type, can be void if unknown

Constructor & Destructor Documentation

◆ PlaneInitializer() [1/3]

template<typename T >
Ocean::Frame::PlaneInitializer< T >::PlaneInitializer ( const T *  constdata,
const CopyMode  copyMode,
const unsigned int  dataPaddingElements = 0u 
)
inline

Creates a new initializer object for a read-only memory pointer.

Parameters
constdataThe read-only memory pointer to the plane data, must be valid
copyModeThe copy mode to be applied when initializing the plane
dataPaddingElementsThe number of padding elements at the end of each row of the given memory pointer, in elements, with range [0, infinity)

◆ PlaneInitializer() [2/3]

template<typename T >
Ocean::Frame::PlaneInitializer< T >::PlaneInitializer ( T *  data,
const CopyMode  copyMode,
const unsigned int  dataPaddingElements = 0u 
)
inline

Creates a new initializer object for a writable memory pointer.

Parameters
dataThe writable memory pointer to the plane data, must be valid
copyModeThe copy mode to be applied when initializing the plane
dataPaddingElementsThe number of padding elements at the end of each row of the given memory pointer, in elements, with range [0, infinity)

◆ PlaneInitializer() [3/3]

template<typename T >
Ocean::Frame::PlaneInitializer< T >::PlaneInitializer ( const unsigned int  planePaddingElements = 0u)
inlineexplicit

Creates a new initializer object for a new plane for which the number of padding elements is known.

Parameters
planePaddingElementsThe number of padding elements at the end of each row of the resulting plane, in elements, with range [0, infinity)

Member Function Documentation

◆ createPlaneInitializersWithPaddingElements()

template<typename T >
std::vector< Frame::PlaneInitializer< T > > Ocean::Frame::PlaneInitializer< T >::createPlaneInitializersWithPaddingElements ( const Indices32 paddingElementsPerPlane)
staticprotected

Creates plane initializer objects with padding elements only.

Parameters
paddingElementsPerPlaneThe padding elements one value for each plane
Returns
The resulting plane initializer objects

Friends And Related Function Documentation

◆ Frame

template<typename T >
friend class Frame
friend

Field Documentation

◆ constdata_

template<typename T >
const T* Ocean::Frame::PlaneInitializer< T >::constdata_ = nullptr
protected

The pointer to the read-only source memory, can be nullptr.

◆ copyMode_

template<typename T >
CopyMode Ocean::Frame::PlaneInitializer< T >::copyMode_ = CopyMode(0u)
protected

The copy mode to be applied, unused if constdata_ == nullptr and data_ == nullptr.

◆ data_

template<typename T >
T* Ocean::Frame::PlaneInitializer< T >::data_ = nullptr
protected

The pointer to the writable source memory, can be nullptr.

◆ paddingElements_

template<typename T >
unsigned int Ocean::Frame::PlaneInitializer< T >::paddingElements_ = 0u
protected

If a valid memory pointer is provided, the number of padding elements at the end of each source memory row; Otherwise, the number of padding elements at the end row of the new plane, with range [0, infinity)


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