3#include <iolink/FlagSet.h>
4#include <iolink/IOLinkAPI.h>
5#include <iolink/storage/DataAccess.h>
26extern template class IOLINK_API_IMPORT FlagSet<RandomAccessCapability>;
63 virtual size_t size()
const = 0;
87 virtual size_t read(
size_t offset,
size_t size,
void* dst);
106 virtual size_t write(
size_t offset,
size_t size,
const void* src);
Parent interface of interfaces used to manipulate raw bytes.
Definition: DataAccess.h:20
Template class to handle a flags system from an enum.
Definition: FlagSet.h:43
Interface representing a generic array-like accessor.
Definition: RandomAccess.h:46
virtual size_t read(size_t offset, size_t size, void *dst)
Read content of data into given buffer.
virtual size_t bufferSize()
Size in bytes of the internal CPU buffer.
virtual const void * bufferReadOnly() const
Return an immutable pointer to the internal CPU memory buffer.
virtual void * buffer()
Return a mutable pointer to the internal CPU memory buffer.
virtual size_t write(size_t offset, size_t size, const void *src)
Write content of src buffer into data.
bool support(RandomAccessCapabilitySet flags)
Checks if the RandomAccess supports the given capabilities.
Definition: RandomAccess.h:58
std::string toString() const
Return a string representation.
virtual size_t size() const =0
Return the number of bytes of the resource accessed.
virtual RandomAccessCapabilitySet capabilities() const =0
virtual void resize(size_t newSize)
Resize content data.
All IOLink symbols are enclosed in this namespace.
Definition: ArrayX.h:8
RandomAccessCapability
Capabilities of a RandomAccess.
Definition: RandomAccess.h:16
@ RESIZE
Data can be resized.
@ WRITE_RESIZE
combination of WRITE and RESIZE
@ MEMORY_ACCESS
Accessing internal CPU memory buffer.
@ WRITE
Data can be written.