Raytrix Light Field SDK
5.0
|
2D Array base class.
TValue | VALUE. |
Inherits Rx::Interop::Runtime30::IMemory2D.
Public Member Functions | |
CRxArray2DBase () | |
Default constructor. Creates an empty 2D array. More... | |
CRxArray2DBase (const CRxArray2DBase &xArray) | |
Copy constructor. Creates a copy of the given 2D array. More... | |
CRxArray2DBase (size_t nRows, size_t nColumns) | |
Constructor. Creates a 2D array with the given number of rows and columns. More... | |
virtual | ~CRxArray2DBase () |
Destructor. More... | |
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... | |
TValue * | GetDataPtr () |
Gets the pointer to the internal data. More... | |
const TValue * | GetDataPtr () const |
Gets the pointer to the internal data. More... | |
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... | |
TValue & | operator() (size_t nRow, size_t nColumn) |
Get the element at the position described by the given row and column. More... | |
const TValue & | operator() (size_t nRow, size_t nColumn) const |
Get the element at the position described by the given row and column. More... | |
CRxArray2DBase & | operator= (const CRxArray2DBase &xArray) |
Assignment operator. More... | |
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 | |
CRxMatrix< TValue > | m_xMatrix |
The internal matrix. More... | |
|
inline |
Default constructor. Creates an empty 2D array.
|
inline |
Constructor. Creates a 2D array with the given number of rows and columns.
nRows | The number of rows. |
nColumns | The number of columns. |
|
inline |
Copy constructor. Creates a copy of the given 2D array.
xArray | The array to copy. |
|
inlinevirtual |
Destructor.
|
inlinevirtual |
|
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.
pMemory | [in] The memory to copy into this memory block. |
|
inlinevirtual |
Deletes this memory block.
Implements Rx::Interop::Runtime30::IMemory2D.
|
inline |
Gets the pointer to the internal data.
|
inline |
Gets the pointer to the internal data.
|
inlinevirtual |
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.
Implements Rx::Interop::Runtime30::IMemory2DAccess.
|
inlinevirtual |
Gets the pointer to the memory block.
Implements Rx::Interop::Runtime30::IMemory2D.
|
inlinevirtual |
Gets the pointer to memory.
Implements Rx::Interop::Runtime30::IMemory2DAccess.
|
inlinevirtual |
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.
nRows | [out] The number of rows. |
nCols | [out] The number of columns. |
Implements Rx::Interop::Runtime30::IMemory2DAccess.
|
inlinevirtual |
Query if this object is valid. This function returns also true if the object itself is valid but the memory block has size zero.
Implements Rx::Interop::Runtime30::IMemory2DAccess.
|
inlinevirtual |
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().
nRows | The amount of rows to allocate. |
nCols | The amount of columns to allocate. |
Implements Rx::Interop::Runtime30::IMemory2D.
|
inline |
Get the element at the position described by the given row and column.
nRow | The row. |
nColumn | The column. |
|
inline |
Get the element at the position described by the given row and column.
nRow | The row. |
nColumn | The column. |
|
inline |
Assignment operator.
xArray | The array to copy. |
|
inlinevirtual |
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.
|
inlinevirtual |
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().
nRows | The amount of rows to allocate. |
nCols | The amount of columns to allocate. |
Implements Rx::Interop::Runtime30::IMemory2D.
|
protected |
The internal matrix.