7#ifndef ARP_USE_ARP_SYSTEM_COMMONS
8#include "Arp/Base/Commons/Io/Stream.hpp"
12using Arp::Base::Commons::Io::SeekOrigin;
16#include "Arp/Base/Commons/Io/Stream.hpp"
17#include "Arp/System/Commons/Io/SeekOrigin.hpp"
19namespace Arp {
namespace System {
namespace Commons {
namespace Io
35 static NullStream
Empty;
41 virtual size_t GetLength(
void) = 0;
42 virtual void SetLength(
size_t length) = 0;
47 virtual void Flush(
void) = 0;
48 virtual size_t Seek(
size_t offset, SeekOrigin origin) = 0;
49 virtual size_t Read(
byte* pBuffer,
size_t bufferSize,
size_t offset,
size_t count) = 0;
50 virtual void Write(
const byte* pBuffer,
size_t bufferSize,
size_t offset,
size_t count) = 0;
51 virtual void Close(
void) = 0;
57 ARP_DEPRECATED(
"This operation is deprecated, use WriteTo(..) instead.")
58 void CopyTo(
Stream& other);
61 ARP_DEPRECATED("This operation is deprecated, implement destrcutor instead")
66 bool IsDisposed(
void);
68 void CheckDisposed(
void);
72 virtual
void InternalDispose(
void);
75 bool isDisposed = false;
This abstract class shall be the base class of all stream implementations.
Definition: Stream.hpp:20
virtual void WriteByte(byte value)
Writes a single byte to the stream.
Definition: Stream.cpp:118
virtual byte ReadByte(void)
Reads a single byte from the stream.
Definition: Stream.cpp:111
Stream(bool canRead=false, bool canWrite=false, bool canSeek=false)
This constructor is used to constructs a base stream instance.
Definition: Stream.cpp:59
virtual bool CanWrite(void)
Determines if the derived stream can write.
Definition: Stream.cpp:80
virtual bool CanSeek(void)
Determines if the derived stream can seek.
Definition: Stream.cpp:87
virtual void SetPosition(size_t value)
Sets the position of the stream, if it can seek.
Definition: Stream.cpp:95
virtual size_t GetPosition(void)
Gets the position of the stream, if it can seek.
Definition: Stream.cpp:103
virtual void WriteTo(Stream &other)
Writes the data this stream to another stream entirely.
Definition: Stream.cpp:125
virtual bool CanRead(void)
Determines if the derived stream can read.
Definition: Stream.cpp:73
@ Empty
No sink assigned to session yet.
Namespace for classes related to the filesystem and file I/O
@ Write
Specifies write access to the file. Data can be written to the file and the file pointer can be moved...
@ Read
Specifies read access to the file. Data can be read from the file and the file pointer can be moved....
Root namespace for the PLCnext API
class ARP_DEPRECATED("Use Arp::Enum<T> instead.") EnumStrings
Deprecated! The class implements an adapter for enums to define the string literals of the enum entri...
Definition: EnumStrings.hxx:38