libfilezilla
Public Member Functions | List of all members
view_reader_factory Class Referencefinal

#include <reader.hpp>

Inheritance diagram for view_reader_factory:
Inheritance graph
[legend]
Collaboration diagram for view_reader_factory:
Collaboration graph
[legend]

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_baseopen (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_factoryclone () 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_
 

Detailed Description

Factory for

See also
view_reader. The memory pointed to by view must live longer than the factory or any readers derived from it

Member Function Documentation

◆ open()

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 
)
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.


The documentation for this class was generated from the following file: