Utility class to read dynamic structs.
More...
#include <RscStructReader.hpp>
Utility class to read dynamic structs.
This class uses the struct information stored in RscVariant, which is passed as argument to the constructor.
◆ RscStructReader()
Arp::Base::Rsc::Commons::RscStructReader::RscStructReader |
( |
const RscVariantBase & |
structVariant | ) |
|
|
explicit |
◆ GetFieldCount()
size_t Arp::Base::Rsc::Commons::RscStructReader::GetFieldCount |
( |
void |
| ) |
const |
Gets the field count of the struct to read.
- Returns
- The field count of the struct.
◆ ReadNextField() [1/3]
template<int N>
void Arp::Base::Rsc::Commons::RscStructReader::ReadNextField |
( |
RscString< N > & |
result | ) |
|
|
inline |
Reads the next string field of the struct.
- Parameters
-
result | The resulting string. |
◆ ReadNextField() [2/3]
template<int N>
void Arp::Base::Rsc::Commons::RscStructReader::ReadNextField |
( |
RscVariant< N > & |
result | ) |
|
|
inline |
Reads the next field of the struct. This operation is used if the field is an object, an array, a struct or unknown.
- Parameters
-
result | The resulting variant value. |
- Template Parameters
-
N | Determines the maximum string size of string array elements. If set to 0 strings are not supported. |
◆ ReadNextField() [3/3]
template<class T >
void Arp::Base::Rsc::Commons::RscStructReader::ReadNextField |
( |
T & |
result | ) |
|
|
inline |
Reads the next primitive field of the struct.
The type of the field shall be known. This operation works just for primitive types.
- Parameters
-
result | The resulting value. |
- Template Parameters
-
T | The type of the value to read, which might be deduced by compiler. |
The documentation for this class was generated from the following files: