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

Enables Rsc services to marshal large data packets as stream. More...

#include <RscStreamWriter.hpp>

Public Member Functions

 RscStreamWriter (void)
 Constructs an empty instance of RscStreamWriter
 
 RscStreamWriter (RscWriter &writer)
 Constructs an instance of RscStreamWriter to serialize stream data. More...
 
bool IsEmpty (void) const
 Determines if this instance has an remoting writer to write data More...
 
void Write (const byte *buffer, size_t bufferSize)
 Writes bufferSize bytes of the supplied buffer into the stream. More...
 
void SerializeFrom (Stream &stream)
 Serialize the data from the as argument passed stream. More...
 
void SerializeFrom (RscStreamReader &streamReader)
 Serialize the data from the as argument passed stream reader. More...
 
void Flush (void)
 Terminate the write operation and flushes remaining internal buffered bytes.
 

Friends

class RscStreamReader
 

Detailed Description

Enables Rsc services to marshal large data packets as stream.

Constructor & Destructor Documentation

◆ RscStreamWriter()

Arp::Base::Rsc::Commons::RscStreamWriter::RscStreamWriter ( RscWriter writer)
explicit

Constructs an instance of RscStreamWriter to serialize stream data.

Parameters
writerThe RscWriter to serialize the stream data.

Member Function Documentation

◆ IsEmpty()

bool Arp::Base::Rsc::Commons::RscStreamWriter::IsEmpty ( void  ) const

Determines if this instance has an remoting writer to write data

Returns
true if the remoting writer was set, otherwise false.

If the remoting writer was not set, the Write() operation will throw an exception.

◆ SerializeFrom() [1/2]

void Arp::Base::Rsc::Commons::RscStreamWriter::SerializeFrom ( RscStreamReader streamReader)

Serialize the data from the as argument passed stream reader.

Parameters
streamReaderThe stream reader to read the data from for serialization.

◆ SerializeFrom() [2/2]

void Arp::Base::Rsc::Commons::RscStreamWriter::SerializeFrom ( Stream stream)

Serialize the data from the as argument passed stream.

Parameters
streamThe stream to read the data from for serialization.

◆ Write()

void Arp::Base::Rsc::Commons::RscStreamWriter::Write ( const byte *  buffer,
size_t  bufferSize 
)

Writes bufferSize bytes of the supplied buffer into the stream.

Parameters
bufferPointer to the buffer to write into the stream.
bufferSizeSize of the buffer.

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