PLCnext API Documentation 25.0.2.69
Public Member Functions | List of all members
Arp::Base::Rsc::Commons::Services::RscWriter Class Reference

Writes marshalled data of RSC services. More...

#include <RscWriter.hpp>

Public Member Functions

 RscWriter (Stream &remoteStream)
 Constructs a RscWriter instance. More...
 
 RscWriter (const RscWriter &arg)
 The default copy constructor. More...
 
 RscWriter (RscWriter &&arg) noexcept
 The default move constructor. More...
 
RscWriteroperator= (const RscWriter &arg)
 The default copy-assignment operator. More...
 
RscWriteroperator= (RscWriter &&arg) noexcept
 The default move-assignment operator. More...
 
 ~RscWriter (void)
 The default destructor.
 
RscStream GetStream (void)
 Gets a stream initialized by this instance. More...
 
RscStreamWriter GetStreamWriter (void)
 Gets a stream reader initialized by this instance. More...
 
void Write (const RscPtr &value, bool omitTag=false)
 Writes a value to RSC. More...
 
void Write (const RscConstPtr &value, bool omitTag=false)
 
void Write (const String &value, bool omitTag=false)
 Writes a value to RSC. More...
 
void Write (const DateTime &value, bool omitTag=false)
 Writes a value to RSC. More...
 
void Write (const SecurityToken &value, bool omitTag=false)
 Writes a value to RSC. More...
 
void Write (RscStream stream, bool omitTag=false)
 Writes a value to RSC. More...
 
void Write (RscVariantBase &result, bool omitTag=false)
 
template<RscEnumType T>
void Write (const T &value, bool omitTag=false)
 Writes a value to RSC. More...
 
template<RscPrimitiveType T>
void Write (const T &value, bool omitTag=false)
 
template<RscClassType T>
void Write (const T &value, bool omitTag=false)
 
template<RscSerializableType T>
void Write (const T &value, bool omitTag=false)
 
template<int N>
void Write (const RscVariant< N > &result, bool omitTag=false)
 Writes a value to RSC. More...
 
template<class T >
void Write (const std::vector< T > &data, bool omitTag=false)
 Writes an array to RSC. More...
 
template<class T >
void Write (const std::vector< std::vector< T > > &data, bool omitTag=false)
 Writes an array of arrays to RSC. More...
 
template<class T , size_t N>
void Write (const std::array< T, N > &data, bool omitTag=false)
 Writes an array to RSC. More...
 
void WriteTag (RscType tag)
 Writes a data tag to RSC. More...
 
void WriteFieldCount (size_t fieldCount)
 Writes the field count of a struct to RSC. More...
 
void WriteArrayLength (size_t arraySize)
 Writes the length of an array to RSC. More...
 
void WriteStructInfo (size_t fieldCount)
 Writes the struct info to RSC. More...
 
void WriteEnumeratorTag (RscType tag)
 Writes an enumerator tag to RSC. More...
 
void WriteConfirmation (bool flush=false)
 Writes a response confirmation to RSC. More...
 
Impl & GetImpl (void)
 For internal use only. More...
 
const Impl & GetImpl (void) const
 

Detailed Description

Writes marshalled data of RSC services.

This class is not intended for direct use, but required by RscGenerator to implement services.

Constructor & Destructor Documentation

◆ RscWriter() [1/3]

Arp::Base::Rsc::Commons::Services::RscWriter::RscWriter ( Stream remoteStream)
explicit

Constructs a RscWriter instance.

Parameters
remoteStreamSpecifies the initial value of property ...

◆ RscWriter() [2/3]

Arp::Base::Rsc::Commons::Services::RscWriter::RscWriter ( const RscWriter arg)
default

The default copy constructor.

Parameters
argThe argument to copy.

◆ RscWriter() [3/3]

Arp::Base::Rsc::Commons::Services::RscWriter::RscWriter ( RscWriter &&  arg)
defaultnoexcept

The default move constructor.

Parameters
argThe argument to move.

Member Function Documentation

◆ GetImpl()

const RscWriter::Impl & Arp::Base::Rsc::Commons::Services::RscWriter::GetImpl ( void  )

For internal use only.

Returns
The impl instance.

◆ GetStream()

RscStream Arp::Base::Rsc::Commons::Services::RscWriter::GetStream ( void  )

Gets a stream initialized by this instance.

Returns
A stream from this instance.

◆ GetStreamWriter()

RscStreamWriter Arp::Base::Rsc::Commons::Services::RscWriter::GetStreamWriter ( void  )

Gets a stream reader initialized by this instance.

Returns
A stream reader from this instance.

◆ operator=() [1/2]

RscWriter & Arp::Base::Rsc::Commons::Services::RscWriter::operator= ( const RscWriter arg)
default

The default copy-assignment operator.

Parameters
argThe argument to copy.
Returns
This instance.

◆ operator=() [2/2]

RscWriter & Arp::Base::Rsc::Commons::Services::RscWriter::operator= ( RscWriter &&  arg)
defaultnoexcept

The default move-assignment operator.

Parameters
argThe argument to move.
Returns
This instance.

◆ Write() [1/10]

void Arp::Base::Rsc::Commons::Services::RscWriter::Write ( const DateTime value,
bool  omitTag = false 
)

Writes a value to RSC.

Parameters
valueThe value to write.
omitTagtrue if the data tag should be omitted during read, otherwise false.

◆ Write() [2/10]

void Arp::Base::Rsc::Commons::Services::RscWriter::Write ( const RscPtr &  value,
bool  omitTag = false 
)

Writes a value to RSC.

Parameters
valueThe value to write.
omitTagtrue if the data tag should be omitted during read, otherwise false.

◆ Write() [3/10]

template<int N>
void Arp::Base::Rsc::Commons::Services::RscWriter::Write ( const RscVariant< N > &  value,
bool  omitTag = false 
)
inline

Writes a value to RSC.

Parameters
valueThe value to write.
omitTagtrue if the data tag should be omitted during read, otherwise false.

◆ Write() [4/10]

void Arp::Base::Rsc::Commons::Services::RscWriter::Write ( const SecurityToken value,
bool  omitTag = false 
)

Writes a value to RSC.

Parameters
valueThe value to write.
omitTagtrue if the data tag should be omitted during read, otherwise false.

◆ Write() [5/10]

template<class T , size_t N>
void Arp::Base::Rsc::Commons::Services::RscWriter::Write ( const std::array< T, N > &  data,
bool  omitTag = false 
)
inline

Writes an array to RSC.

Parameters
dataThe array to write.
omitTagtrue if the data tag should be omitted during read, otherwise false.
Template Parameters
TThe element type of the array.
NThe fixed size of the array.

◆ Write() [6/10]

template<class T >
void Arp::Base::Rsc::Commons::Services::RscWriter::Write ( const std::vector< std::vector< T > > &  data,
bool  omitTag = false 
)
inline

Writes an array of arrays to RSC.

Parameters
dataThe array to write.
omitTagtrue if the data tag should be omitted during read, otherwise false.
Template Parameters
TThe element type of the array.

◆ Write() [7/10]

template<class T >
void Arp::Base::Rsc::Commons::Services::RscWriter::Write ( const std::vector< T > &  data,
bool  omitTag = false 
)
inline

Writes an array to RSC.

Parameters
dataThe array to write.
omitTagtrue if the data tag should be omitted during read, otherwise false.
Template Parameters
TThe element type of the array.

◆ Write() [8/10]

void Arp::Base::Rsc::Commons::Services::RscWriter::Write ( const String value,
bool  omitTag = false 
)

Writes a value to RSC.

Parameters
valueThe value to write.
omitTagtrue if the data tag should be omitted during read, otherwise false.

◆ Write() [9/10]

template<RscSerializableType T>
void Arp::Base::Rsc::Commons::Services::RscWriter::Write ( const T &  value,
bool  omitTag = false 
)
inline

Writes a value to RSC.

Parameters
valueThe value to write.
omitTagtrue if the data tag should be omitted during read, otherwise false.

◆ Write() [10/10]

void Arp::Base::Rsc::Commons::Services::RscWriter::Write ( RscStream  stream,
bool  omitTag = false 
)

Writes a value to RSC.

Parameters
streamThe stream to write.
omitTagtrue if the data tag should be omitted during read, otherwise false.

◆ WriteArrayLength()

void Arp::Base::Rsc::Commons::Services::RscWriter::WriteArrayLength ( size_t  value)

Writes the length of an array to RSC.

Parameters
valueThe array length to write.

◆ WriteConfirmation()

void Arp::Base::Rsc::Commons::Services::RscWriter::WriteConfirmation ( bool  flush = false)

Writes a response confirmation to RSC.

Parameters
flushtrue if all buffered data shall be flushed to RSC, otherwise false.

◆ WriteEnumeratorTag()

void Arp::Base::Rsc::Commons::Services::RscWriter::WriteEnumeratorTag ( RscType  tag)

Writes an enumerator tag to RSC.

Parameters
tagThe enumerator tag to write.

◆ WriteFieldCount()

void Arp::Base::Rsc::Commons::Services::RscWriter::WriteFieldCount ( size_t  value)

Writes the field count of a struct to RSC.

Parameters
valueThe field count to write.

◆ WriteStructInfo()

void Arp::Base::Rsc::Commons::Services::RscWriter::WriteStructInfo ( size_t  fieldCount)

Writes the struct info to RSC.

Parameters
fieldCountThe field count of the struct.

◆ WriteTag()

void Arp::Base::Rsc::Commons::Services::RscWriter::WriteTag ( RscType  tag)

Writes a data tag to RSC.

Parameters
tagThe data tag to write.

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