2021-03-31 | Paul Boddie | raw annotate files changeset graph | Removed the largely superfluous accessing abstraction. Since each accessor will only employ one page mapper referencing the accessor, a mapping from file identifiers to page mappers can be maintained. |
1 #pragma once 2 3 #include "opener_resource.h" 4 5 /* Support for providing access to files. */ 6 7 class TestFileOpener : public OpenerResource 8 { 9 protected: 10 offset_t _file_size; 11 12 /* Configurable methods. */ 13 14 virtual fileid_t get_fileid(const char *path); 15 16 virtual Accessor *make_accessor(fileid_t fileid); 17 18 public: 19 explicit TestFileOpener(Paging *paging, Pages *pages, offset_t file_size=0); 20 }; 21 22 // vim: tabstop=4 expandtab shiftwidth=4