2021-03-31 | Paul Boddie | file changeset files shortlog | Incorporated the paging abstraction in opener abstractions, introducing critical sections around the retrieval and disposal of page mappers and accessors, also discarding page mappers and accessors when disposal occurs. |
paul@9 | 1 | #pragma once |
paul@9 | 2 | |
paul@10 | 3 | #include "opener_resource.h" |
paul@9 | 4 | |
paul@9 | 5 | /* Support for providing access to files. */ |
paul@9 | 6 | |
paul@10 | 7 | class TestFileOpener : public OpenerResource |
paul@9 | 8 | { |
paul@9 | 9 | protected: |
paul@9 | 10 | offset_t _file_size; |
paul@9 | 11 | |
paul@9 | 12 | /* Configurable methods. */ |
paul@9 | 13 | |
paul@9 | 14 | virtual fileid_t get_fileid(const char *path); |
paul@9 | 15 | |
paul@9 | 16 | virtual Accessor *make_accessor(fileid_t fileid); |
paul@9 | 17 | |
paul@9 | 18 | public: |
paul@79 | 19 | explicit TestFileOpener(Pages *pages, offset_t file_size=0); |
paul@9 | 20 | }; |
paul@9 | 21 | |
paul@9 | 22 | // vim: tabstop=4 expandtab shiftwidth=4 |