PLCnext API Documentation 23.6.0.37
Public Types | Public Member Functions | List of all members
Arp::System::Rsc::Services::RscStructReader< MaxStringSize > Class Template Reference

Helper class to read a struct from an RscVariant. This class uses the struct information stored in RscVariant. More...

#include <RscStructReader.hxx>

Public Types

using ReadElementFunction = RscVariant<>::ReadElementFunction
 

Public Member Functions

 RscStructReader (const RscVariant< MaxStringSize > &structVariant)
 Constructs an RscStructReader instance.
 
 RscStructReader (const RscStructReader &arg)=default
 Copy constructor.
 
RscStructReaderoperator= (const RscStructReader &arg)=default
 Assignment operator.
 
 ~RscStructReader (void)=default
 Destructs this instance and frees all resources.
 
size_t GetFieldCount (void) const
 Gets the field count of the struct; More...
 
template<class T >
void ReadNextField (T &currentField)
 Reads the next field of current struct. This method if field is primitve and known. More...
 
void ReadNextField (RscString< MaxStringSize > &currentField)
 Reads the next field of current struct. This method if field contains string type. More...
 
void ReadNextField (RscVariant< MaxStringSize > &value)
 Reads the next field of current struct. This method is used if field is an object, an array, a struct or unknown. More...
 

Detailed Description

template<int MaxStringSize>
class Arp::System::Rsc::Services::RscStructReader< MaxStringSize >

Helper class to read a struct from an RscVariant. This class uses the struct information stored in RscVariant.

Member Function Documentation

◆ GetFieldCount()

template<int MaxStringSize>
size_t Arp::System::Rsc::Services::RscStructReader< MaxStringSize >::GetFieldCount ( void  ) const
inline

Gets the field count of the struct;

Returns
Field count

◆ ReadNextField() [1/3]

template<int MaxStringSize>
void Arp::System::Rsc::Services::RscStructReader< MaxStringSize >::ReadNextField ( RscString< MaxStringSize > &  currentField)
inline

Reads the next field of current struct. This method if field contains string type.

Parameters
currentFieldReference to RscString

◆ ReadNextField() [2/3]

template<int MaxStringSize>
void Arp::System::Rsc::Services::RscStructReader< MaxStringSize >::ReadNextField ( RscVariant< MaxStringSize > &  value)
inline

Reads the next field of current struct. This method is used if field is an object, an array, a struct or unknown.

Parameters
valueReference to RscVariant

◆ ReadNextField() [3/3]

template<int MaxStringSize>
template<class T >
void Arp::System::Rsc::Services::RscStructReader< MaxStringSize >::ReadNextField ( T &  currentField)
inline

Reads the next field of current struct. This method if field is primitve and known.

Parameters
currentFieldReference to store read value
Template Parameters
TType of read value

The documentation for this class was generated from the following file: