6 #ifndef CACHE_STREAM_SINK_HPP 7 #define CACHE_STREAM_SINK_HPP 11 #include <boost/iostreams/stream.hpp> 12 #include <core/storage/fileio/general_fstream_sink.hpp> 13 #include <core/storage/fileio/fixed_size_cache_manager.hpp> 16 namespace fileio_impl {
26 typedef fileio::cache_id_type cache_id_type;
29 typedef char char_type;
30 struct category:
public boost::iostreams::sink_tag,
31 boost::iostreams::closable_tag,
32 boost::iostreams::multichar_tag {};
49 std::streamsize
write(
const char* c, std::streamsize bufsize);
64 std::streampos
seek(std::streamoff off, std::ios_base::seekdir way);
84 std::shared_ptr<fileio::cache_block> out_block;
85 std::shared_ptr<general_fstream_sink> out_file;
std::streamsize write(const char *c, std::streamsize bufsize)
cache_stream_sink(cache_id_type cache_id)
std::streampos seek(std::streamoff off, std::ios_base::seekdir way)
~cache_stream_sink()
Destructor. CLoses the stream.