Raytrix Light Field SDK  4.0
Logo
Public Types | Public Member Functions | Protected Attributes | List of all members
Rx::CRxArrayString Class Referenceabstract

Detailed Description

An array of strings.

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

Public Types

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

Public Member Functions

 CRxArrayString ()
 Default constructor. Creates an empty array. More...
 
 CRxArrayString (size_t nElementCount)
 Constructor. Creates a new array with the given number of uninitialized elements. More...
 
 CRxArrayString (size_t nElementCount, const TValue &tInitValue)
 Constructor. Creates a new array with the given number of initialized elements. More...
 
 CRxArrayString (const CRxString &sxString, char cSeparator)
 Constructor. Creates a new array by splitting the given string at each occurrence of the given separator. More...
 
 CRxArrayString (const CRxArrayString &xArray)
 Copy constructor. Creates a copy of the given array. More...
 
virtual ~CRxArrayString ()
 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 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...
 
CRxArrayStringoperator= (const CRxArrayString &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

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

Constructor & Destructor Documentation

Rx::CRxArrayString::CRxArrayString ( )

Default constructor. Creates an empty array.

Rx::CRxArrayString::CRxArrayString ( size_t  nElementCount)

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

Parameters
nElementCountThe number of elements.
Rx::CRxArrayString::CRxArrayString ( 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.
Rx::CRxArrayString::CRxArrayString ( const CRxString sxString,
char  cSeparator 
)

Constructor. Creates a new array by splitting the given string at each occurrence of the given separator.

Parameters
sxStringThe string to split.
cSeparatorThe split separator.
Rx::CRxArrayString::CRxArrayString ( const CRxArrayString xArray)

Copy constructor. Creates a copy of the given array.

Parameters
xArrayThe array to copy.
virtual Rx::CRxArrayString::~CRxArrayString ( )
virtual

Destructor. Removes all elements from this array.

Member Function Documentation

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.
virtual void Rx::CRxArrayString::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.
virtual void Rx::CRxArrayString::Delete ( )
virtual

Clears the array.

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

TValue* Rx::CRxArrayString::GetDataPtr ( )

Gets the pointer to the internal data.

Returns
The pointer.
const TValue* Rx::CRxArrayString::GetDataPtr ( ) const

Gets the pointer to the internal data.

Returns
The pointer.
virtual size_t Rx::CRxArrayString::GetElementSize ( ) const
virtual

Gets the size of a single value in this array.

Returns
The element size.

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

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

Gets the pointer to the internal data.

Returns
The pointer.

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

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

Gets the pointer to the internal data.

Returns
The pointer.

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

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

Query if this object is valid. Returns always true.

Returns
True if valid, false if not.

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

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

Gets the number of elements in this array.

Returns
The length.

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

virtual void Rx::CRxArrayString::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.

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

Assignment operator.

Parameters
xArrayThe array to copy.
Returns
This array.
TValue& Rx::CRxArrayString::operator[] ( size_t  nIdx)

Array indexer operator.

Parameters
nIdxThe index.
Returns
The indexed value.
const TValue& Rx::CRxArrayString::operator[] ( size_t  nIdx) const

Array indexer operator.

Parameters
nIdxThe index.
Returns
The indexed value.
virtual void Rx::CRxArrayString::Reset ( )
virtual

Sets the internal memory to zeros.

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

virtual void Rx::CRxArrayString::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

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

The internal data.