Helper class to read an array of primtive types from an RscVariant. This class uses the array information stored in RscVariant.
More...
#include <RscArrayWriter.hpp>
|
|
using | WriteElementFunction = RscVariant<>::WriteElementFunction |
| |
|
| template<int N> |
| | RscArrayWriter (const RscVariant< N > &value) |
| | Constructs an RscArray instance. More...
|
| |
|
| RscArrayWriter (size_t size, RscType elementType, WriteElementFunction writeFunction) |
| | Constructs an RscArrayWriter instance.
|
| |
|
| RscArrayWriter (size_t size, RscType elementType, RemotingWriter &writer, size_t dimensions=1) |
| | Constructs an RscArrayWriter instance.
|
| |
|
| RscArrayWriter (const RscArrayWriter &arg)=default |
| | Copy constructor.
|
| |
|
RscArrayWriter & | operator= (const RscArrayWriter &arg)=default |
| | Assignment operator.
|
| |
|
| ~RscArrayWriter (void)=default |
| | Destructs this instance and frees all resources.
|
| |
| size_t | GetSize (void) const |
| | Returns number of Elements contained in array More...
|
| |
| RscType | GetElementType (void) const |
| | Returns the element type More...
|
| |
| size_t | GetPosition (void) const |
| | Returns current writing position in array More...
|
| |
| template<class T > |
| void | WriteNext (const T ¤t) |
| | Writes the next single array element using the callback function given by ArrayInformation of RscVariant. This method can only be used for primtive types. More...
|
| |
| template<int N> |
| void | WriteNext (const RscString< N > ¤t) |
| | Writes the next single array string element using the callback function given by ArrayInformation of RscVariant. More...
|
| |
|
template<int N> |
| void | WriteNext (const RscVariant< N > ¤t) |
| |
| void | WriteNext (const byte *pCurrent) |
| | Writes the next single array element using the callback function given by ArrayInformation of RscVariant. This method can only be used for primtive types. More...
|
| |
| RscArrayWriter | WriteNextArray (size_t size) |
| | Writes the next subarray for arrays with more than one dimension. The next subarray is written with a new instance of RscArrayWriter. More...
|
| |
|
template<int MaxStringSize> |
| RscVariant< MaxStringSize > | WriteNextStruct () |
| |
|
template<> |
| void | WriteNext (const DateTime ¤t) |
| |
Helper class to read an array of primtive types from an RscVariant. This class uses the array information stored in RscVariant.
◆ RscArrayWriter()
template<int N>
| Arp::System::Rsc::Services::RscArrayWriter::RscArrayWriter |
( |
const RscVariant< N > & |
value | ) |
|
|
inline |
Constructs an RscArray instance.
- Parameters
-
| value | Reference to RscVariant with array information. |
- Template Parameters
-
| N | N determines the maximum string size of string array elements. If set to 0 strings will not be supported. |
◆ GetElementType()
| RscType Arp::System::Rsc::Services::RscArrayWriter::GetElementType |
( |
void |
| ) |
const |
|
inline |
Returns the element type
- Returns
- Element Type of array
◆ GetPosition()
| size_t Arp::System::Rsc::Services::RscArrayWriter::GetPosition |
( |
void |
| ) |
const |
|
inline |
Returns current writing position in array
- Returns
- Writing position in array
◆ GetSize()
| size_t Arp::System::Rsc::Services::RscArrayWriter::GetSize |
( |
void |
| ) |
const |
|
inline |
Returns number of Elements contained in array
- Returns
- Number of Elements contained in array
◆ WriteNext() [1/3]
| void Arp::System::Rsc::Services::RscArrayWriter::WriteNext |
( |
const byte * |
pCurrent | ) |
|
Writes the next single array element using the callback function given by ArrayInformation of RscVariant. This method can only be used for primtive types.
- Parameters
-
| current | Reference to source |
◆ WriteNext() [2/3]
template<int N>
| void Arp::System::Rsc::Services::RscArrayWriter::WriteNext |
( |
const RscString< N > & |
current | ) |
|
|
inline |
Writes 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. |
◆ WriteNext() [3/3]
template<class T >
| void Arp::System::Rsc::Services::RscArrayWriter::WriteNext |
( |
const T & |
current | ) |
|
|
inline |
Writes the next single array element using the callback function given by ArrayInformation of RscVariant. This method can only be used for primtive types.
- Parameters
-
| current | Reference to source |
- Template Parameters
-
◆ WriteNextArray()
| RscArrayWriter Arp::System::Rsc::Services::RscArrayWriter::WriteNextArray |
( |
size_t |
size | ) |
|
Writes the next subarray for arrays with more than one dimension. The next subarray is written with a new instance of RscArrayWriter.
- Parameters
-
| size | Size of next subarray |
- Returns
- New instance of RscArrayWriter to write next array elements
The documentation for this class was generated from the following file: