PLCnext API Documentation 25.0.2.69
Public Member Functions | List of all members
Arp::Base::Commons::Io::NullStream Class Reference

This class represents a stream without any data. More...

#include <NullStream.hpp>

Inheritance diagram for Arp::Base::Commons::Io::NullStream:
Inheritance graph

Public Member Functions

 NullStream (void)
 Default constructor.
 
 NullStream (const NullStream &arg)
 Default copy constructor. More...
 
 NullStream (NullStream &&arg) noexcept
 Default move constructor. More...
 
NullStreamoperator= (const NullStream &arg)
 Default copy-assignment operator. More...
 
NullStreamoperator= (NullStream &&arg) noexcept
 Default move-assignment operator. More...
 
 ~NullStream (void)
 Default destructor.
 
bool CanRead (void) final
 Determines if the derived stream can read. More...
 
bool CanWrite (void) final
 Determines if the derived stream can write. More...
 
bool CanSeek (void) final
 Determines if the derived stream can seek. More...
 
void SetPosition (size_t value) final
 Sets the position of the stream, if it can seek. More...
 
size_t GetPosition (void) final
 Gets the position of the stream, if it can seek. More...
 
size_t Seek (size_t offset, SeekOrigin origin) final
 
size_t Read (byte *pBuffer, size_t bufferSize, size_t offset, size_t count) final
 
void Write (const byte *pBuffer, size_t bufferSize, size_t offset, size_t count) final
 
void WriteByte (byte value) final
 Writes a single byte to the stream. More...
 
byte ReadByte (void) final
 Reads a single byte from the stream. More...
 
void WriteTo (Stream &other) final
 Writes the data this stream to another stream entirely. More...
 
void ReadFrom (Stream &other) final
 Reads the entire data from another stream into this stream. More...
 
void Flush (void) final
 
- Public Member Functions inherited from Arp::Base::Commons::Io::Stream
 Stream (bool canRead=false, bool canWrite=false, bool canSeek=false)
 This constructor is used to constructs a base stream instance. More...
 
 Stream (const Stream &arg)
 Default copy constructor. More...
 
 Stream (Stream &&arg) noexcept
 Default move constructor. More...
 
Streamoperator= (const Stream &arg)
 Default copy-assignment operator. More...
 
Streamoperator= (Stream &&arg) noexcept
 Default move-assignment operator. More...
 
virtual ~Stream (void)
 Default destructor.
 
virtual bool CanRead (void)
 Determines if the derived stream can read. More...
 
virtual bool CanWrite (void)
 Determines if the derived stream can write. More...
 
virtual bool CanSeek (void)
 Determines if the derived stream can seek. More...
 
virtual void SetPosition (size_t value)
 Sets the position of the stream, if it can seek. More...
 
virtual size_t GetPosition (void)
 Gets the position of the stream, if it can seek. More...
 
virtual size_t Seek (size_t offset, SeekOrigin origin)=0
 
virtual size_t Read (byte *pBuffer, size_t bufferSize, size_t bufferOffset, size_t count)=0
 
virtual void Write (const byte *pBuffer, size_t bufferSize, size_t bufferOffset, size_t count)=0
 
virtual void Flush (void)=0
 
virtual byte ReadByte (void)
 Reads a single byte from the stream. More...
 
virtual void WriteByte (byte value)
 Writes a single byte to the stream. More...
 
virtual void WriteTo (Stream &other)
 Writes the data this stream to another stream entirely. More...
 
virtual void ReadFrom (Stream &other)
 Reads the entire data from another stream into this stream. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Arp::Base::Commons::Io::Stream
static StreamGetEmpty (void)
 Gets an empty stream. More...
 

Detailed Description

This class represents a stream without any data.

This is a utility class to simplify implementations using streams to skip remaining data. All operations of this stream are left empty and do nothing.

Constructor & Destructor Documentation

◆ NullStream() [1/2]

Arp::Base::Commons::Io::NullStream::NullStream ( const NullStream arg)
default

Default copy constructor.

Parameters
argThe argument to copy.

◆ NullStream() [2/2]

Arp::Base::Commons::Io::NullStream::NullStream ( NullStream &&  arg)
defaultnoexcept

Default move constructor.

Parameters
argThe argument to move.

Member Function Documentation

◆ CanRead()

bool Arp::Base::Commons::Io::NullStream::CanRead ( void  )
finalvirtual

Determines if the derived stream can read.

Reimplemented from Arp::Base::Commons::Io::Stream.

◆ CanSeek()

bool Arp::Base::Commons::Io::NullStream::CanSeek ( void  )
finalvirtual

Determines if the derived stream can seek.

Reimplemented from Arp::Base::Commons::Io::Stream.

◆ CanWrite()

bool Arp::Base::Commons::Io::NullStream::CanWrite ( void  )
finalvirtual

Determines if the derived stream can write.

Reimplemented from Arp::Base::Commons::Io::Stream.

◆ Flush()

void Arp::Base::Commons::Io::NullStream::Flush ( void  )
finalvirtual

◆ GetPosition()

size_t Arp::Base::Commons::Io::NullStream::GetPosition ( void  )
finalvirtual

Gets the position of the stream, if it can seek.

Reimplemented from Arp::Base::Commons::Io::Stream.

◆ operator=() [1/2]

NullStream & Arp::Base::Commons::Io::NullStream::operator= ( const NullStream arg)
default

Default copy-assignment operator.

Parameters
argThe argument to copy.
Returns
This instance.

◆ operator=() [2/2]

NullStream & Arp::Base::Commons::Io::NullStream::operator= ( NullStream &&  arg)
defaultnoexcept

Default move-assignment operator.

Parameters
argThe argument to move.
Returns
This instance.

◆ Read()

size_t Arp::Base::Commons::Io::NullStream::Read ( byte *  pBuffer,
size_t  bufferSize,
size_t  offset,
size_t  count 
)
finalvirtual

◆ ReadByte()

byte Arp::Base::Commons::Io::NullStream::ReadByte ( void  )
finalvirtual

Reads a single byte from the stream.

Reimplemented from Arp::Base::Commons::Io::Stream.

◆ ReadFrom()

void Arp::Base::Commons::Io::NullStream::ReadFrom ( Stream other)
finalvirtual

Reads the entire data from another stream into this stream.

Parameters
otherThe other stream to read the entire data from.

Reimplemented from Arp::Base::Commons::Io::Stream.

◆ Seek()

size_t Arp::Base::Commons::Io::NullStream::Seek ( size_t  offset,
SeekOrigin  origin 
)
finalvirtual

◆ SetPosition()

void Arp::Base::Commons::Io::NullStream::SetPosition ( size_t  value)
finalvirtual

Sets the position of the stream, if it can seek.

Reimplemented from Arp::Base::Commons::Io::Stream.

◆ Write()

void Arp::Base::Commons::Io::NullStream::Write ( const byte *  pBuffer,
size_t  bufferSize,
size_t  offset,
size_t  count 
)
finalvirtual

◆ WriteByte()

void Arp::Base::Commons::Io::NullStream::WriteByte ( byte  value)
finalvirtual

Writes a single byte to the stream.

Reimplemented from Arp::Base::Commons::Io::Stream.

◆ WriteTo()

void Arp::Base::Commons::Io::NullStream::WriteTo ( Stream other)
finalvirtual

Writes the data this stream to another stream entirely.

Reimplemented from Arp::Base::Commons::Io::Stream.


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