Raytrix Light Field SDK  5.0
Rx::CRxArray2DDouble Class Referenceabstract

Detailed Description

A 2D double array.

Inherits Rx::Interop::Runtime30::IMemory2D.

Public Types

typedef double TValue
 Defines an alias representing the type of the elements in this array. More...
 

Public Member Functions

 CRxArray2DDouble ()
 
 CRxArray2DDouble (const CRxArray2DDouble &xMatrix)
 
 CRxArray2DDouble (size_t nRows, size_t nCols)
 
virtual ~CRxArray2DDouble ()
 
virtual void CopyFrom (const IMemory2DAccess *pMemory)
 
virtual void CopyFrom (const IMemory2DAccess *pMemory)=0
 Copies the memory block described by pMemory into this memory block. This memory block is automatically resized. The function throws an exception if the element sizes of the given memory block does not agree with the element size of this memory block. More...
 
virtual void Delete ()
 Deletes this memory block. More...
 
TValueGetDataPtr ()
 
const TValueGetDataPtr () const
 
virtual size_t GetElementSize () const
 Gets the element size. The memory block is made up of blocks of the given number of bytes. The function Length() returns the number of elements in the memory block, where each element is of the size given in GetElementSize(). For example, an array of 10 doubles has element size 8 and length 10. More...
 
virtual void * GetPointer ()
 Gets the pointer to the memory block. More...
 
virtual const void * GetPointer () const
 Gets the pointer to memory. More...
 
virtual void GetSize (size_t &nRows, size_t &nCols) const
 Gets the number of elements in the memory block. The total number of bytes allocated by the memory block is given by the nRows times nCols times the element size. More...
 
virtual bool IsValid () const
 Query if this object is valid. This function returns also true if the object itself is valid but the memory block has size zero. More...
 
virtual void New (size_t nRows, size_t nCols)
 Creates a new memory block of nRows times nCols elements. The size of an element is fixed by the implementation and can be read out with the function GetElementSize(). More...
 
TValueoperator() (size_t nRow, size_t nCol)
 
const TValueoperator() (size_t nRow, size_t nCol) const
 
CRxArray2DDoubleoperator= (const CRxArray2DDouble &xMatrix)
 
virtual void Reset ()
 Reset all values in the memory block. The actual value the elements in the memory block are reset to depends on the implementation. More...
 
virtual void Resize (size_t nRows, size_t nCols)
 Resizes the memory block to the given number of elements. The size of an element is fixed by the implementation and can be read out with the function GetElementSize(). More...
 

Protected Attributes

CRxArray2DBase< TValue > * m_pxData
 

Member Typedef Documentation

◆ TValue

Defines an alias representing the type of the elements in this array.

Constructor & Destructor Documentation

◆ CRxArray2DDouble() [1/3]

Rx::CRxArray2DDouble::CRxArray2DDouble ( )

◆ CRxArray2DDouble() [2/3]

Rx::CRxArray2DDouble::CRxArray2DDouble ( size_t  nRows,
size_t  nCols 
)

◆ CRxArray2DDouble() [3/3]

Rx::CRxArray2DDouble::CRxArray2DDouble ( const CRxArray2DDouble xMatrix)

◆ ~CRxArray2DDouble()

virtual Rx::CRxArray2DDouble::~CRxArray2DDouble ( )
virtual

Member Function Documentation

◆ CopyFrom() [1/2]

virtual void Rx::CRxArray2DDouble::CopyFrom ( const IMemory2DAccess *  pMemory)
virtual

◆ CopyFrom() [2/2]

virtual void Rx::Interop::Runtime30::IMemory2D::CopyFrom ( const IMemory2DAccess pMemory)
pure virtualinherited

Copies the memory block described by pMemory into this memory block. This memory block is automatically resized. The function throws an exception if the element sizes of the given memory block does not agree with the element size of this memory block.

Parameters
pMemory[in] The memory to copy into this memory block.

◆ Delete()

virtual void Rx::CRxArray2DDouble::Delete ( )
virtual

Deletes this memory block.

Implements Rx::Interop::Runtime30::IMemory2D.

◆ GetDataPtr() [1/2]

TValue* Rx::CRxArray2DDouble::GetDataPtr ( )

◆ GetDataPtr() [2/2]

const TValue* Rx::CRxArray2DDouble::GetDataPtr ( ) const

◆ GetElementSize()

virtual size_t Rx::CRxArray2DDouble::GetElementSize ( ) const
virtual

Gets the element size. The memory block is made up of blocks of the given number of bytes. The function Length() returns the number of elements in the memory block, where each element is of the size given in GetElementSize(). For example, an array of 10 doubles has element size 8 and length 10.

Returns
The element size in bytes.

Implements Rx::Interop::Runtime30::IMemory2DAccess.

◆ GetPointer() [1/2]

virtual void* Rx::CRxArray2DDouble::GetPointer ( )
inlinevirtual

Gets the pointer to the memory block.

Returns
The pointer to memory.

Implements Rx::Interop::Runtime30::IMemory2D.

◆ GetPointer() [2/2]

virtual const void* Rx::CRxArray2DDouble::GetPointer ( ) const
inlinevirtual

Gets the pointer to memory.

Returns
The pointer to memory.

Implements Rx::Interop::Runtime30::IMemory2DAccess.

◆ GetSize()

virtual void Rx::CRxArray2DDouble::GetSize ( size_t &  nRows,
size_t &  nCols 
) const
virtual

Gets the number of elements in the memory block. The total number of bytes allocated by the memory block is given by the nRows times nCols times the element size.

Parameters
nRows[out] The number of rows.
nCols[out] The number of columns.

Implements Rx::Interop::Runtime30::IMemory2DAccess.

◆ IsValid()

virtual bool Rx::CRxArray2DDouble::IsValid ( ) const
virtual

Query if this object is valid. This function returns also true if the object itself is valid but the memory block has size zero.

Returns
True if valid, false if not.

Implements Rx::Interop::Runtime30::IMemory2DAccess.

◆ New()

virtual void Rx::CRxArray2DDouble::New ( size_t  nRows,
size_t  nCols 
)
virtual

Creates a new memory block of nRows times nCols elements. The size of an element is fixed by the implementation and can be read out with the function GetElementSize().

Parameters
nRowsThe amount of rows to allocate.
nColsThe amount of columns to allocate.

Implements Rx::Interop::Runtime30::IMemory2D.

◆ operator()() [1/2]

TValue& Rx::CRxArray2DDouble::operator() ( size_t  nRow,
size_t  nCol 
)

◆ operator()() [2/2]

const TValue& Rx::CRxArray2DDouble::operator() ( size_t  nRow,
size_t  nCol 
) const

◆ operator=()

CRxArray2DDouble& Rx::CRxArray2DDouble::operator= ( const CRxArray2DDouble xMatrix)

◆ Reset()

virtual void Rx::CRxArray2DDouble::Reset ( )
virtual

Reset all values in the memory block. The actual value the elements in the memory block are reset to depends on the implementation.

Implements Rx::Interop::Runtime30::IMemory2D.

◆ Resize()

virtual void Rx::CRxArray2DDouble::Resize ( size_t  nRows,
size_t  nCols 
)
virtual

Resizes the memory block to the given number of elements. The size of an element is fixed by the implementation and can be read out with the function GetElementSize().

Parameters
nRowsThe amount of rows to allocate.
nColsThe amount of columns to allocate.

Implements Rx::Interop::Runtime30::IMemory2D.

Member Data Documentation

◆ m_pxData

CRxArray2DBase<TValue>* Rx::CRxArray2DDouble::m_pxData
protected