Raytrix Light Field SDK  5.0
Rx::CRxArrayUShort Class Referenceabstract

Detailed Description

An array of unsigned shorts.

Inherits Rx::Interop::Runtime30::IMemory.

Public Types

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

Public Member Functions

 CRxArrayUShort ()
 Default constructor. Creates an empty array. More...
 
 CRxArrayUShort (const CRxArrayUShort &xArray)
 Copy constructor. Creates a copy of the given array. More...
 
 CRxArrayUShort (size_t nElementCount)
 Constructor. Creates a new array with the given number of uninitialized elements. More...
 
 CRxArrayUShort (size_t nElementCount, const TValue &tInitValue)
 Constructor. Creates a new array with the given number of initialized elements. More...
 
virtual ~CRxArrayUShort ()
 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...
 
TValueGetDataPtr ()
 Gets the pointer to the internal data. More...
 
const TValueGetDataPtr () const
 Gets the pointer to the internal data. More...
 
virtual size_t GetElementSize () const
 Gets the size of a single value in this array. More...
 
virtual void * GetPointer ()
 Gets the pointer to the internal data. More...
 
virtual const void * GetPointer () const
 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...
 
CRxArrayUShortoperator= (const CRxArrayUShort &xArray)
 Assignment operator. More...
 
TValueoperator[] (size_t nIdx)
 Array indexer operator. More...
 
const TValueoperator[] (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

CRxArrayBase< TValue > * m_pxData
 The internal data. More...
 

Member Typedef Documentation

◆ TValue

typedef unsigned short Rx::CRxArrayUShort::TValue

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

Constructor & Destructor Documentation

◆ CRxArrayUShort() [1/4]

Rx::CRxArrayUShort::CRxArrayUShort ( )

Default constructor. Creates an empty array.

◆ CRxArrayUShort() [2/4]

Rx::CRxArrayUShort::CRxArrayUShort ( size_t  nElementCount)

Constructor. Creates a new array with the given number of uninitialized elements.

Parameters
nElementCountThe number of elements.

◆ CRxArrayUShort() [3/4]

Rx::CRxArrayUShort::CRxArrayUShort ( size_t  nElementCount,
const TValue tInitValue 
)

Constructor. Creates a new array with the given number of initialized elements.

Parameters
nElementCountThe number of elements.
tInitValueThe initial value of each element in this array.

◆ CRxArrayUShort() [4/4]

Rx::CRxArrayUShort::CRxArrayUShort ( const CRxArrayUShort xArray)

Copy constructor. Creates a copy of the given array.

Parameters
xArrayThe array to copy.

◆ ~CRxArrayUShort()

virtual Rx::CRxArrayUShort::~CRxArrayUShort ( )
virtual

Destructor. Removes all elements from this array.

Member Function Documentation

◆ CopyFrom() [1/2]

virtual void Rx::Interop::Runtime30::IMemory::CopyFrom ( const IMemoryAccess 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.

◆ CopyFrom() [2/2]

virtual void Rx::CRxArrayUShort::CopyFrom ( const IMemoryAccess *  pxSrcMemory)
virtual

Copies the content of the given source memory into this array. Sets the size of this array to the size of the memory.

Parameters
pxSrcMemoryThe source memory.

◆ Delete()

virtual void Rx::CRxArrayUShort::Delete ( )
virtual

Clears the array.

Implements Rx::Interop::Runtime30::IMemory.

◆ GetDataPtr() [1/2]

TValue* Rx::CRxArrayUShort::GetDataPtr ( )

Gets the pointer to the internal data.

Returns
The pointer.

◆ GetDataPtr() [2/2]

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

Gets the pointer to the internal data.

Returns
The pointer.

◆ GetElementSize()

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

Gets the size of a single value in this array.

Returns
The element size.

Implements Rx::Interop::Runtime30::IMemoryAccess.

◆ GetPointer() [1/2]

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

Gets the pointer to the internal data.

Returns
The pointer.

Implements Rx::Interop::Runtime30::IMemory.

◆ GetPointer() [2/2]

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

Gets the pointer to the internal data.

Returns
The pointer.

Implements Rx::Interop::Runtime30::IMemoryAccess.

◆ IsValid()

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

Query if this object is valid. Returns always true.

Returns
True if valid, false if not.

Implements Rx::Interop::Runtime30::IMemoryAccess.

◆ Length()

virtual size_t Rx::CRxArrayUShort::Length ( ) const
virtual

Gets the number of elements in this array.

Returns
The length.

Implements Rx::Interop::Runtime30::IMemoryAccess.

◆ New()

virtual void Rx::CRxArrayUShort::New ( size_t  nElementCount)
virtual

Set the size of this array to the given number of elements.

Parameters
nElementCountNumber of elements.

Implements Rx::Interop::Runtime30::IMemory.

◆ operator=()

CRxArrayUShort& Rx::CRxArrayUShort::operator= ( const CRxArrayUShort xArray)

Assignment operator.

Parameters
xArrayThe array to copy.
Returns
This array.

◆ operator[]() [1/2]

TValue& Rx::CRxArrayUShort::operator[] ( size_t  nIdx)

Array indexer operator.

Parameters
nIdxThe index.
Returns
The indexed value.

◆ operator[]() [2/2]

const TValue& Rx::CRxArrayUShort::operator[] ( size_t  nIdx) const

Array indexer operator.

Parameters
nIdxThe index.
Returns
The indexed value.

◆ Reset()

virtual void Rx::CRxArrayUShort::Reset ( )
virtual

Sets the internal memory to zeros.

Implements Rx::Interop::Runtime30::IMemory.

◆ Resize()

virtual void Rx::CRxArrayUShort::Resize ( size_t  nElementCount)
virtual

Set the size of this array to the given number of elements.

Parameters
nElementCountNumber of elements.

Implements Rx::Interop::Runtime30::IMemory.

Member Data Documentation

◆ m_pxData

CRxArrayBase<TValue>* Rx::CRxArrayUShort::m_pxData
protected

The internal data.