PLCnext API Documentation  22.9.0.33
Public Member Functions | List of all members
Arp::System::Rsc::Services::RscReader Class Reference

Reads data from Rsc More...

#include <RscReader.hpp>

Public Member Functions

 RscReader (BinaryReader2 &binaryReader, RscClientContext *pClientContext=nullptr)
 Constructs an RscReader instance. More...
 
 RscReader (const RscReader &arg)=default
 Copy constructor. More...
 
RscReaderoperator= (const RscReader &arg)=default
 Assignment operator. More...
 
 ~RscReader (void)=default
 Destructs this instance and frees all resources. More...
 
RscStream GetStream (void)
 Creates an instance of RscStream initialized to read stream data. More...
 
RemotingReader & GetRemotingReader (void)
 Returns reference to RemotingReader More...
 
void ReadStream (RscStreamAdapter &stream)
 Reads the data from remote into the supplied stream. More...
 
template<class T >
Read (void)
 Reads an element of T from Rsc. With data tagging enabled RscType of T is validated. More...
 
template<class T >
void Read (T &result)
 Reads an element of T from Rsc. With data tagging enabled RscType of T is validated. More...
 
template<class T >
void Read (T &result, bool readTag)
 Reads an element of T from Rsc. With data tagging enabled RscType of T is validated. More...
 
template<int N>
void ReadString (String &result)
 Reads a string from Rsc. The String will be read in format Utf-8. The template parameter gives the maximum number of characters. More...
 
template<int N>
void ReadString (char(&value)[N])
 Reads a string from Rsc. The String will be read in format Utf-8. The template parameter gives the maximum number of characters. More...
 
template<int N>
void ReadObjectString (char(&value)[N])
 Reads a string in object format from Rsc. The template parameter gives the maximum number of characters. Format Utf-16 is not suppoerted. More...
 
template<class T >
void ReadArray (std::vector< T > &result)
 Reads an array from Rsc. The read data is stored as std::vector. More...
 
template<class T >
void ReadArray (std::vector< std::vector< T >> &result)
 Reads an array of array from Rsc. The read data is stored as std::vector. More...
 
template<class T , size_t N>
void ReadArray (std::array< T, N > &result)
 Reads an array from Rsc. The read data is stored as std::array. More...
 

Detailed Description

Reads data from Rsc

Constructor & Destructor Documentation

◆ RscReader() [1/2]

Arp::System::Rsc::Services::RscReader::RscReader ( BinaryReader2 &  binaryReader,
RscClientContext *  pClientContext = nullptr 
)
inline

Constructs an RscReader instance.

◆ RscReader() [2/2]

Arp::System::Rsc::Services::RscReader::RscReader ( const RscReader arg)
default

Copy constructor.

◆ ~RscReader()

Arp::System::Rsc::Services::RscReader::~RscReader ( void  )
default

Destructs this instance and frees all resources.

Member Function Documentation

◆ GetRemotingReader()

RemotingReader & Arp::System::Rsc::Services::RscReader::GetRemotingReader ( void  )
inline

Returns reference to RemotingReader

Returns
reference to RemotingReader

◆ GetStream()

RscStream Arp::System::Rsc::Services::RscReader::GetStream ( void  )
inline

Creates an instance of RscStream initialized to read stream data.

Returns
instance of RscStream

◆ operator=()

RscReader& Arp::System::Rsc::Services::RscReader::operator= ( const RscReader arg)
default

Assignment operator.

◆ Read() [1/3]

template<class T >
void Arp::System::Rsc::Services::RscReader::Read ( T &  result)
inline

Reads an element of T from Rsc. With data tagging enabled RscType of T is validated.

Parameters
resultReference to memory to write element

◆ Read() [2/3]

template<class T >
void Arp::System::Rsc::Services::RscReader::Read ( T &  result,
bool  readTag 
)
inline

Reads an element of T from Rsc. With data tagging enabled RscType of T is validated.

Parameters
resultReference to memory to write element
readTagIf true the data tag is read, otherwise the tag is ommitted.

◆ Read() [3/3]

template<class T >
T Arp::System::Rsc::Services::RscReader::Read ( void  )
inline

Reads an element of T from Rsc. With data tagging enabled RscType of T is validated.

Returns
Read element of type T
Template Parameters
TType of element to read

◆ ReadArray() [1/3]

template<class T , size_t N>
void Arp::System::Rsc::Services::RscReader::ReadArray ( std::array< T, N > &  result)
inline

Reads an array from Rsc. The read data is stored as std::array.

Parameters
resultReference to std::array.
Template Parameters
TType of array elements
NSize of static array

◆ ReadArray() [2/3]

template<class T >
void Arp::System::Rsc::Services::RscReader::ReadArray ( std::vector< std::vector< T >> &  result)
inline

Reads an array of array from Rsc. The read data is stored as std::vector.

Parameters
resultReference to std::vector<std::vector>.
Template Parameters
TType of array elements

◆ ReadArray() [3/3]

template<class T >
void Arp::System::Rsc::Services::RscReader::ReadArray ( std::vector< T > &  result)
inline

Reads an array from Rsc. The read data is stored as std::vector.

Parameters
resultReference to std::vector.
Template Parameters
TType of array elements

◆ ReadObjectString()

template<int N>
void Arp::System::Rsc::Services::RscReader::ReadObjectString ( char(&)  value[N])
inline

Reads a string in object format from Rsc. The template parameter gives the maximum number of characters. Format Utf-16 is not suppoerted.

Parameters
resultReference to character array to store data
Template Parameters
NMaximum number of characters.

◆ ReadStream()

void Arp::System::Rsc::Services::RscReader::ReadStream ( RscStreamAdapter stream)

Reads the data from remote into the supplied stream.

Parameters
streamThe stream to copy the read data to.

◆ ReadString() [1/2]

template<int N>
void Arp::System::Rsc::Services::RscReader::ReadString ( char(&)  value[N])
inline

Reads a string from Rsc. The String will be read in format Utf-8. The template parameter gives the maximum number of characters.

Parameters
resultReference to character array to store data
Template Parameters
NMaximum number of characters.

◆ ReadString() [2/2]

template<int N>
void Arp::System::Rsc::Services::RscReader::ReadString ( String result)
inline

Reads a string from Rsc. The String will be read in format Utf-8. The template parameter gives the maximum number of characters.

Parameters
resultReference to String object to store data
Template Parameters
NMaximum number of characters.

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