Basic array operations.
TValue | VALUE. |
Inherits Rx::Interop::Runtime30::IMemory.
Public Member Functions | |
CRxArrayBase () | |
Default constructor. Creates an empty array. More... | |
CRxArrayBase (size_t nElementCount) | |
Constructor. Creates a new array with the given number of uninitialized elements. More... | |
CRxArrayBase (size_t nElementCount, const TValue &tInitValue) | |
Constructor. Creates a new array with the given number of initialized elements. More... | |
CRxArrayBase (const CRxArrayBase &xArray) | |
Copy constructor. Creates a copy of the given array. More... | |
virtual | ~CRxArrayBase () |
Destructor. Removes all elements from this array. More... | |
virtual void | CopyFrom (const IMemoryAccess *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 | CopyFrom (const IMemoryAccess *pxSrcMemory) |
Copies the content of the given source memory into this array. Sets the size of this array to the size of the memory. More... | |
virtual void | Delete () |
Clears the array. More... | |
virtual size_t | GetElementSize () const |
Gets the size of a single value in this array. More... | |
virtual const void * | GetPointer () const |
Gets the pointer to the internal data. More... | |
virtual void * | GetPointer () |
Gets the pointer to the internal data. More... | |
virtual bool | IsValid () const |
Query if this object is valid. Returns always true. More... | |
virtual size_t | Length () const |
Gets the number of elements in this array. More... | |
virtual void | New (size_t nElementCount) |
Set the size of this array to the given number of elements. More... | |
CRxArrayBase & | operator= (const CRxArrayBase &xArray) |
Assignment operator. More... | |
TValue & | operator[] (size_t nIdx) |
Array indexer operator. More... | |
const TValue & | operator[] (size_t nIdx) const |
Array indexer operator. More... | |
virtual void | Reset () |
Sets the internal memory to zeros. More... | |
virtual void | Resize (size_t nElementCount) |
Set the size of this array to the given number of elements. More... | |
Protected Attributes | |
std::vector< TValue > | m_vtData |
The internal vector that holds all data. More... | |
|
inline |
Default constructor. Creates an empty array.
|
inline |
Constructor. Creates a new array with the given number of uninitialized elements.
nElementCount | The number of elements. |
|
inline |
Constructor. Creates a new array with the given number of initialized elements.
nElementCount | The number of elements. |
tInitValue | The initial value of each element in this array. |
|
inline |
Copy constructor. Creates a copy of the given array.
xArray | The array to copy. |
|
inlinevirtual |
Destructor. Removes all elements from this array.
|
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 |
Copies the content of the given source memory into this array. Sets the size of this array to the size of the memory.
pxSrcMemory | The source memory. |
|
inlinevirtual |
Clears the array.
Implements Rx::Interop::Runtime30::IMemory.
|
inlinevirtual |
Gets the size of a single value in this array.
Implements Rx::Interop::Runtime30::IMemoryAccess.
|
inlinevirtual |
Gets the pointer to the internal data.
Implements Rx::Interop::Runtime30::IMemoryAccess.
|
inlinevirtual |
Gets the pointer to the internal data.
Implements Rx::Interop::Runtime30::IMemory.
|
inlinevirtual |
Query if this object is valid. Returns always true.
Implements Rx::Interop::Runtime30::IMemoryAccess.
|
inlinevirtual |
Gets the number of elements in this array.
Implements Rx::Interop::Runtime30::IMemoryAccess.
|
inlinevirtual |
Set the size of this array to the given number of elements.
nElementCount | Number of elements. |
Implements Rx::Interop::Runtime30::IMemory.
|
inline |
Assignment operator.
xArray | The array to copy. |
|
inline |
Array indexer operator.
nIdx | The index. |
|
inline |
Array indexer operator.
nIdx | The index. |
|
inlinevirtual |
Sets the internal memory to zeros.
Implements Rx::Interop::Runtime30::IMemory.
|
inlinevirtual |
Set the size of this array to the given number of elements.
nElementCount | Number of elements. |
Implements Rx::Interop::Runtime30::IMemory.
|
protected |
The internal vector that holds all data.