Helper class to read an array of primtive types from an RscVariant. This class uses the array information stored in RscVariant.
More...
#include <RscArrayReader.hpp>
|
using | ReadElementFunction = RscVariant<>::ReadElementFunction |
|
Helper class to read an array of primtive types from an RscVariant. This class uses the array information stored in RscVariant.
◆ RscArrayReader() [1/4]
template<int N>
Arp::System::Rsc::Services::RscArrayReader::RscArrayReader |
( |
const RscVariant< N > & |
value | ) |
|
|
inline |
Constructs an RscArray instance.
- Parameters
-
- Template Parameters
-
N | N determines the maximum string size of string array elements. If set to 0 strings will not be supported. |
◆ RscArrayReader() [2/4]
Arp::System::Rsc::Services::RscArrayReader::RscArrayReader |
( |
size_t |
size, |
|
|
RscType |
elementType, |
|
|
ReadElementFunction |
readFunction |
|
) |
| |
◆ RscArrayReader() [3/4]
Arp::System::Rsc::Services::RscArrayReader::RscArrayReader |
( |
size_t |
size, |
|
|
RscType |
elementType, |
|
|
RemotingReader & |
reader |
|
) |
| |
◆ RscArrayReader() [4/4]
Arp::System::Rsc::Services::RscArrayReader::RscArrayReader |
( |
const RscArrayReader & |
arg | ) |
|
|
default |
◆ ~RscArrayReader()
Arp::System::Rsc::Services::RscArrayReader::~RscArrayReader |
( |
void |
| ) |
|
|
default |
Destructs this instance and frees all resources.
◆ GetDimensions()
size_t Arp::System::Rsc::Services::RscArrayReader::GetDimensions |
( |
void |
| ) |
const |
|
inline |
Gets the count of array dimensions.
- Returns
- Count of array dimensions (0 for elemental type, 1 for array type, 2 for array of array type etc)
◆ GetElementType()
RscType Arp::System::Rsc::Services::RscArrayReader::GetElementType |
( |
void |
| ) |
const |
|
inline |
Returns the element type
- Returns
- Element Type of array
◆ GetFieldCount()
size_t Arp::System::Rsc::Services::RscArrayReader::GetFieldCount |
( |
void |
| ) |
const |
|
inline |
Returns field count if array contains struct elements
- Returns
- Field count of struct element
◆ GetPosition()
size_t Arp::System::Rsc::Services::RscArrayReader::GetPosition |
( |
void |
| ) |
const |
|
inline |
Returns current reading position in array
- Returns
- Reading position in array
◆ GetSize()
size_t Arp::System::Rsc::Services::RscArrayReader::GetSize |
( |
void |
| ) |
const |
|
inline |
Returns number of Elements contained in array
- Returns
- Number of Elements contained in array
◆ operator=()
◆ ReadNext() [1/4]
void Arp::System::Rsc::Services::RscArrayReader::ReadNext |
( |
byte * |
pCurrent | ) |
|
Reads the next single array element using the callback function given by ArrayInformation of RscVariant. This method can only be used for primitive types.
- Parameters
-
current | Raw pointer to destination |
◆ ReadNext() [2/4]
template<int N>
void Arp::System::Rsc::Services::RscArrayReader::ReadNext |
( |
RscString< N > & |
current | ) |
|
|
inline |
Reads the next single array string element using the callback function given by ArrayInformation of RscVariant..
- Parameters
-
- Template Parameters
-
N | Maximum string size of RscString. Have to be equal to internal maximum string size defined with the constructor. |
◆ ReadNext() [3/4]
template<int N>
void Arp::System::Rsc::Services::RscArrayReader::ReadNext |
( |
RscVariant< N > & |
current | ) |
|
|
inline |
Reads the next array element and stores it into current.
- Parameters
-
- Template Parameters
-
N | Maximum string size of string elements. Have to be equal to internal maximum string size defined with the constructor. |
◆ ReadNext() [4/4]
template<class T >
void Arp::System::Rsc::Services::RscArrayReader::ReadNext |
( |
T & |
current | ) |
|
|
inline |
Reads the next single array element using the callback function given by ArrayInformation of RscVariant. This method can only be used for primitive types.
- Parameters
-
current | Reference to destination |
- Template Parameters
-
◆ ReadNextArray()
RscArrayReader Arp::System::Rsc::Services::RscArrayReader::ReadNextArray |
( |
void |
| ) |
|
Reads the next subarray for arrays with more than one dimension. The next subarray is read with a new instance of RscArrayReader.
- Returns
- New instance of RscArrayReader to read next array elements
◆ ReadNextStruct()
template<int MaxStringSize>
RscStructReader< MaxStringSize > Arp::System::Rsc::Services::RscArrayReader::ReadNextStruct |
( |
void |
| ) |
|
|
inline |
Reads the next struct element.
- Returns
- New instance of RscStructReader to read element struct
- Template Parameters
-
MaxstringSize | Maximum string size of elements |
The documentation for this class was generated from the following file: