31 #ifndef _SCC_UTIL_IOPIPELINE_H
32 #define _SCC_UTIL_IOPIPELINE_H
57 std::shared_ptr<Reader> rd_base;
60 InChain(
const std::shared_ptr<Reader>&);
63 std::list<std::shared_ptr<PipelineReader>> rd_chain;
68 r->read_reset(rd_base);
75 rd_chain.emplace_back(r);
81 rd_chain.emplace_front(r);
85 void rd_del(
const std::shared_ptr<PipelineReader>&);
95 std::shared_ptr<Writer> wr_base;
98 OutChain(
const std::shared_ptr<Writer>&);
101 std::list<std::shared_ptr<PipelineWriter>> wr_chain;
106 w->write_reset(wr_base);
113 wr_chain.emplace_back(w);
119 wr_chain.emplace_front(w);
123 void wr_del(
const std::shared_ptr<PipelineWriter>&);
137 InPipeline(
const std::shared_ptr<Reader>&,
size_t = 1024);
151 OutPipeline(
const std::shared_ptr<Writer>&,
size_t = 1024);
165 IoPipeline(
const std::shared_ptr<Reader>&,
const std::shared_ptr<Writer>&,
size_t = 1024,
size_t = 1024);
169 void rw_add_back(
const std::shared_ptr<PipelineReader>& r,
const std::shared_ptr<PipelineWriter>& w)
175 void rw_add_front(
const std::shared_ptr<PipelineReader>& r,
const std::shared_ptr<PipelineWriter>& w)
Input stream wrapper for reader.
Input/output stream wrapper for reader/writer.
Output stream wrapper for writer.
Base input/output stream classes.
Chain of readers base class.
void rd_replace_base(const std::shared_ptr< PipelineReader > &r)
Replace the base writer with a new base writer.
void rd_add_back(const std::shared_ptr< PipelineReader > &r)
Add a reader to the end of the chain (before the base).
void rd_del(const std::shared_ptr< PipelineReader > &)
Delete a reader from the chain.
virtual std::shared_ptr< Reader > rd_fix_chain()
Fix the chain, and return the pointer that should be pointed to by the stream.
InChain(const std::shared_ptr< Reader > &)
Create with base reader and read buffer size.
void rd_add_front(const std::shared_ptr< PipelineReader > &r)
Add a reader to the start of the chain (after the stream).
Input stream with pipeline of readers.
std::shared_ptr< Reader > rd_fix_chain()
Fix the chain, and return the pointer that should be pointed to by the stream.
InPipeline(const std::shared_ptr< Reader > &, size_t=1024)
Create with base reader and read buffer size.
Input/output stream with pipeline of readers and writers.
void rw_add_back(const std::shared_ptr< PipelineReader > &r, const std::shared_ptr< PipelineWriter > &w)
Add to the end of the chain (before the base).
std::shared_ptr< Writer > wr_fix_chain()
Fix the chain, and return the pointer that should be pointed to by the stream.
IoPipeline(const std::shared_ptr< Reader > &, const std::shared_ptr< Writer > &, size_t=1024, size_t=1024)
Create with base reader/writer and buffer sizes.
std::shared_ptr< Reader > rd_fix_chain()
Fix the chain, and return the pointer that should be pointed to by the stream.
void rw_add_front(const std::shared_ptr< PipelineReader > &r, const std::shared_ptr< PipelineWriter > &w)
Add to the end of the chain (after the stream).
Chain of writers base class.
void wr_replace_base(const std::shared_ptr< PipelineWriter > &w)
Replace the base writer with a new base writer.
void wr_del(const std::shared_ptr< PipelineWriter > &)
Delete a writer from the chain.
void wr_add_front(const std::shared_ptr< PipelineWriter > &w)
Add a writer to the start of the chain (after the stream).
void wr_add_back(const std::shared_ptr< PipelineWriter > &w)
Add a writer to the end of the chain (before the base).
OutChain(const std::shared_ptr< Writer > &)
Create with base writer and write buffer size.
virtual std::shared_ptr< Writer > wr_fix_chain()
Fix the chain, and return the pointer that should be pointed to by the stream.
Output stream pipeline of writers.
std::shared_ptr< Writer > wr_fix_chain()
Fix the chain, and return the pointer that should be pointed to by the stream.
OutPipeline(const std::shared_ptr< Writer > &, size_t=1024)
Create with base writer and write buffer size.