5#include <vitrio/export.hpp>
6#include <vitrio/image_scratch.hpp>
7#include <vitrio/image_scratch_open_mode.hpp>
8#include <vitrio/platform.hpp>
14#include <unordered_map>
19class image_location_grouping;
20class image_reader_provider;
21class image_scratch_storage;
95 std::shared_ptr<image_scratch_storage>
storage,
97 image_scratch_open_mode
mode = image_scratch_open_mode::empty
102 std::shared_ptr<image_scratch_entry>
106 using entry_map_type =
107 std::unordered_map<std::string, std::shared_ptr<image_scratch_entry>>;
109 VITRIO_STD_MEMBER_INTERFACE
110 entry_map_type m_entries;
141std::shared_ptr<image_scratch> create_host_image_scratch(
145 std::size_t
max_size = std::numeric_limits<std::size_t>::max()
189std::shared_ptr<image_scratch> create_mapped_file_image_scratch(
192 const std::string &
path,
194 std::size_t
max_size = std::numeric_limits<std::size_t>::max()
259std::shared_ptr<image_scratch> create_directory_image_scratch(
Groups a list of image locations by file.
Definition image_location_grouping.hpp:31
Interface to serve image_reader given a key.
Definition image_reader_provider.hpp:26
Copies of image files, kept where they are faster to reach than the files themselves.
Definition image_scratch.hpp:27
A scratch that holds the images that image_location-s can name, each in a slot of its storage.
Definition indexed_image_scratch.hpp:55
indexed_image_scratch(const image_location_grouping &locations, image_reader_provider &files, std::shared_ptr< image_scratch_storage > storage, std::size_t run_length, image_scratch_open_mode mode=image_scratch_open_mode::empty)
Construct a scratch for a grouping of locations.
std::shared_ptr< image_scratch_entry > find(const std::string &key) override
Get what is held of a file, to read it and to add to it.
A view of a contiguous sequence of elements.
Definition span.hpp:29