Basic unsigned short array operations.
Inherits Rx::Interop::Runtime30::IMemory.
Public Types | |
typedef unsigned short | TValue |
Public Member Functions | |
CRxArrayUShort () | |
CRxArrayUShort (size_t uiLength) | |
CRxArrayUShort (size_t uiLength, const TValue &dInitValue) | |
CRxArrayUShort (const CRxArrayUShort &xArray) | |
virtual | ~CRxArrayUShort () |
virtual void | CopyFrom (const IMemoryAccess *pMemory) |
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 | Delete () |
Deletes this memory block. More... | |
TValue * | GetDataPtr () |
const TValue * | GetDataPtr () 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 const void * | GetPointer () const |
Gets the pointer to memory. More... | |
virtual void * | GetPointer () |
Gets the pointer to the memory block. 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 size_t | Length () const |
Gets the number of elements in the memory block. The total number of bytes allocated by the memory block is given by the length times the element size. More... | |
virtual void | New (size_t nElementCount) |
Creates a new memory block of nElementCount elements. The size of an element is fixed by the implementation and can be read out with the function GetElementSize(). More... | |
CRxArrayUShort & | operator= (const CRxArrayUShort &xArray) |
TValue & | operator[] (size_t nIdx) |
const TValue & | operator[] (size_t nIdx) const |
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 nNewElementCount) |
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 | |
void * | m_pvData |
typedef unsigned short Rx::CRxArrayUShort::TValue |
Rx::CRxArrayUShort::CRxArrayUShort | ( | ) |
Rx::CRxArrayUShort::CRxArrayUShort | ( | size_t | uiLength | ) |
Rx::CRxArrayUShort::CRxArrayUShort | ( | size_t | uiLength, |
const TValue & | dInitValue | ||
) |
Rx::CRxArrayUShort::CRxArrayUShort | ( | const CRxArrayUShort & | xArray | ) |
|
virtual |
|
virtual |
|
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. |
|
virtual |
Deletes this memory block.
Implements Rx::Interop::Runtime30::IMemory.
TValue* Rx::CRxArrayUShort::GetDataPtr | ( | ) |
const TValue* Rx::CRxArrayUShort::GetDataPtr | ( | ) | 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.
Implements Rx::Interop::Runtime30::IMemoryAccess.
|
inlinevirtual |
Gets the pointer to memory.
Implements Rx::Interop::Runtime30::IMemoryAccess.
|
inlinevirtual |
Gets the pointer to the memory block.
Implements Rx::Interop::Runtime30::IMemory.
|
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.
Implements Rx::Interop::Runtime30::IMemoryAccess.
|
virtual |
Gets the number of elements in the memory block. The total number of bytes allocated by the memory block is given by the length times the element size.
Implements Rx::Interop::Runtime30::IMemoryAccess.
|
virtual |
Creates a new memory block of nElementCount elements. The size of an element is fixed by the implementation and can be read out with the function GetElementSize().
nElementCount | The memory size in bytes. |
Implements Rx::Interop::Runtime30::IMemory.
CRxArrayUShort& Rx::CRxArrayUShort::operator= | ( | const CRxArrayUShort & | xArray | ) |
TValue& Rx::CRxArrayUShort::operator[] | ( | size_t | nIdx | ) |
const TValue& Rx::CRxArrayUShort::operator[] | ( | size_t | nIdx | ) | const |
|
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::IMemory.
|
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().
nNewElementCount | The new number of elements stored in the memory block. |
Implements Rx::Interop::Runtime30::IMemory.
|
protected |