libfilezilla
|
#include <reader.hpp>
Public Member Functions | |
view_reader_factory (std::wstring &&name, std::string_view const &view) | |
view_reader_factory (std::wstring const &name, std::string_view const &view) | |
virtual std::unique_ptr< reader_base > | open (aio_buffer_pool &pool, uint64_t offset=0, uint64_t size=reader_base::nosize, size_t max_buffers=1) override |
Creates a reader. More... | |
virtual std::unique_ptr< reader_factory > | clone () const override |
Clones the factory. | |
virtual bool | seekable () const override |
virtual uint64_t | size () const override |
Public Member Functions inherited from reader_factory | |
reader_factory (std::wstring const &name) | |
reader_factory (std::wstring &&name) | |
std::wstring | name () const |
virtual datetime | mtime () const |
virtual size_t | min_buffer_usage () const |
The reader requires at least this many buffers. More... | |
virtual bool | multiple_buffer_usage () const |
Whether the reader can benefit from multiple buffers. More... | |
virtual size_t | preferred_buffer_count () const |
Additional Inherited Members | |
Protected Member Functions inherited from reader_factory | |
reader_factory (reader_factory const &)=default | |
Protected Attributes inherited from reader_factory | |
std::wstring const | name_ |
Factory for
|
overridevirtual |
Creates a reader.
The pool must live longer than the returned reader.
Seekable readers can be opened at any position. If the reader is not seekable, pass an offset
of 0 or open will fails.
size
can limit the amount of data the reader can returned. Note that a size limit that exceeds the actual size will result in reader_base::get_buffer eventually returning an error.
Implements reader_factory.