roo_io
API Documentation for roo_io
Loading...
Searching...
No Matches
memory_resource.h
Go to the documentation of this file.
1#pragma once
2
3#include <memory>
4#include <string>
5
8
9namespace roo_io {
10
11template <typename PtrType>
13 public:
14 MemoryResource(PtrType begin, PtrType end)
15 : fs_(fs), path_(std::move(path)) {}
16
17 std::unique_ptr<roo_io::MultipassInputStream> open() const override {
18 return std::unique_ptr<roo_io::MultipassInputStream>(
19 new MemoryInputStream<PtrType>(begin_, end_));
20 }
21
22 private:
23 PtrType begin_;
24 PtrType end_;
25};
26
27} // namespace roo_io
std::unique_ptr< roo_io::MultipassInputStream > open() const override
MemoryResource(PtrType begin, PtrType end)
Definition byte.h:6
roo::basic_string_view< CharT, Traits > basic_string_view
Definition string_view.h:8