31 #ifndef _SCC_UTIL_IOBASE_H
32 #define _SCC_UTIL_IOBASE_H
70 virtual size_t read(
void*,
size_t) = 0;
79 virtual void read_reset(
const std::shared_ptr<Reader>&) = 0;
80 virtual std::shared_ptr<Reader> read_shared()
const = 0;
89 virtual size_t write(
const void*,
size_t) = 0;
99 virtual std::shared_ptr<Writer> write_shared()
const = 0;
106 std::shared_ptr<Reader> reader;
111 virtual size_t read(
void* loc,
size_t len)
113 if (reader)
return reader->read(loc, len);
120 virtual std::shared_ptr<Reader> read_shared()
const {
return reader; };
127 std::shared_ptr<Writer> writer;
132 virtual size_t write(
const void* loc,
size_t len)
134 if (writer)
return writer->write(loc, len);
141 virtual std::shared_ptr<Writer> write_shared()
const {
return writer; };
Pipeline reader which flows through all data.
virtual void read_reset(const std::shared_ptr< Reader > &r)
Reset interface.
virtual size_t read(void *loc, size_t len)
Read interface.
Pipeline writer which flows through all data.
virtual size_t write(const void *loc, size_t len)
Write interface.
virtual void write_reset(const std::shared_ptr< Writer > &w)
Reset interface.
Pipeline reader to carry out processing in a pipeline (chain of readers).
virtual void read_reset(const std::shared_ptr< Reader > &)=0
Reset interface.
Pipeline writer to carry out processing in a pipeline (chain of writers).
virtual void write_reset(const std::shared_ptr< Writer > &)=0
Reset interface.
Interface class for objects which can be read.
virtual size_t read(void *, size_t)=0
Read interface.
Interface class for objects which can be written.
virtual size_t write(const void *, size_t)=0
Write interface.