PLCnext API Documentation  21.0.0.35466
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. More...
 
 RscStructReader (const RscStructReader &arg)=default
 Copy constructor. More...
 
RscStructReaderoperator= (const RscStructReader &arg)=default
 Assignment operator. More...
 
 ~RscStructReader (void)=default
 Destructs this instance and frees all resources. More...
 
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.

Constructor & Destructor Documentation

◆ RscStructReader() [1/2]

template<int MaxStringSize>
Arp::System::Rsc::Services::RscStructReader< MaxStringSize >::RscStructReader ( const RscVariant< MaxStringSize > &  structVariant)
inline

Constructs an RscStructReader instance.

◆ RscStructReader() [2/2]

template<int MaxStringSize>
Arp::System::Rsc::Services::RscStructReader< MaxStringSize >::RscStructReader ( const RscStructReader< MaxStringSize > &  arg)
default

Copy constructor.

◆ ~RscStructReader()

template<int MaxStringSize>
Arp::System::Rsc::Services::RscStructReader< MaxStringSize >::~RscStructReader ( void  )
default

Destructs this instance and frees all resources.

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

◆ operator=()

template<int MaxStringSize>
RscStructReader& Arp::System::Rsc::Services::RscStructReader< MaxStringSize >::operator= ( const RscStructReader< MaxStringSize > &  arg)
default

Assignment operator.

◆ ReadNextField() [1/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

◆ ReadNextField() [2/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() [3/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

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