header_utils
Loading...
Searching...
No Matches
ghassanpl::mmap_source< VALUE_TYPE > Struct Template Reference

A read-only memory view over a file. More...

#include <mmap.h>

Protected Member Functions

void conditional_sync ()

Static Protected Member Functions

static file_handle_type open_file (const std::filesystem::path &path, std::error_code &error) noexcept
static mmap_context memory_map (const file_handle_type file_handle, const int64_t offset, const int64_t length, std::error_code &error) noexcept

Friends

struct basic_mmap< mmap_source< VALUE_TYPE >, VALUE_TYPE >
template<typename VALUE_TYPE_>
mmap_source< VALUE_TYPE_ > make_mmap_source (const std::filesystem::path &path, typename mmap_source< VALUE_TYPE_ >::size_type offset, typename mmap_source< VALUE_TYPE_ >::size_type length, std::error_code &error) noexcept

Detailed Description

template<typename VALUE_TYPE = std::byte>
struct ghassanpl::mmap_source< VALUE_TYPE >

A read-only memory view over a file.

Template Parameters
VALUE_TYPEthe type to represent each byte of the file

Definition at line 328 of file mmap.h.

Member Function Documentation

◆ conditional_sync()

template<typename VALUE_TYPE = std::byte>
void ghassanpl::mmap_source< VALUE_TYPE >::conditional_sync ( )
inlineprotected

Definition at line 349 of file mmap.h.

◆ memory_map()

template<typename VALUE_TYPE>
mmap_source< VALUE_TYPE >::mmap_context ghassanpl::mmap_source< VALUE_TYPE >::memory_map ( const file_handle_type file_handle,
const int64_t offset,
const int64_t length,
std::error_code & error )
staticprotectednoexcept

Definition at line 274 of file mmap_impl.h.

◆ open_file()

template<typename VALUE_TYPE>
file_handle_type ghassanpl::mmap_source< VALUE_TYPE >::open_file ( const std::filesystem::path & path,
std::error_code & error )
staticprotectednoexcept

Definition at line 253 of file mmap_impl.h.

◆ basic_mmap< mmap_source< VALUE_TYPE >, VALUE_TYPE >

template<typename VALUE_TYPE = std::byte>
friend struct basic_mmap< mmap_source< VALUE_TYPE >, VALUE_TYPE >
friend

Definition at line 336 of file mmap.h.