header_utils
Loading...
Searching...
No Matches
Memory Mapped Files

Classes for platform-independent memory mapping of filesystem files. More...

Classes

struct  ghassanpl::basic_mmap_base< VALUE_TYPE >
 Base for mmap_source and mmap_sink with a specific value type. More...
struct  ghassanpl::mmap_source< VALUE_TYPE >
 A read-only memory view over a file. More...
struct  ghassanpl::mmap_sink< VALUE_TYPE >
 A read-write view over a file. More...

Typedefs

using ghassanpl::byte_mmap_source
using ghassanpl::u8_mmap_source
using ghassanpl::char_mmap_source
using ghassanpl::char8_mmap_source

Functions

template<typename VALUE_TYPE = char>
mmap_source< VALUE_TYPE > ghassanpl::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
template<typename VALUE_TYPE = char>
mmap_source< VALUE_TYPE > ghassanpl::make_mmap_source (const std::filesystem::path &path, std::error_code &error) noexcept
template<typename VALUE_TYPE = char>
mmap_source< VALUE_TYPE > ghassanpl::make_mmap_source (const std::filesystem::path &path, typename mmap_source< VALUE_TYPE >::size_type offset, typename mmap_source< VALUE_TYPE >::size_type length)
template<typename VALUE_TYPE = char>
mmap_source< VALUE_TYPE > ghassanpl::make_mmap_source (const std::filesystem::path &path)
template<typename VALUE_TYPE>
mmap_sink< VALUE_TYPE > ghassanpl::make_mmap_sink (const std::filesystem::path &path, typename mmap_sink< VALUE_TYPE >::size_type offset, typename mmap_sink< VALUE_TYPE >::size_type length, std::error_code &error) noexcept
template<typename VALUE_TYPE>
mmap_sink< VALUE_TYPE > ghassanpl::make_mmap_sink (const std::filesystem::path &path, std::error_code &error) noexcept
template<typename VALUE_TYPE>
mmap_sink< VALUE_TYPE > ghassanpl::make_mmap_sink (const std::filesystem::path &path, typename mmap_sink< VALUE_TYPE >::size_type offset, typename mmap_sink< VALUE_TYPE >::size_type length)
template<typename VALUE_TYPE>
mmap_sink< VALUE_TYPE > ghassanpl::make_mmap_sink (const std::filesystem::path &path)

Detailed Description

Classes for platform-independent memory mapping of filesystem files.

Typedef Documentation

◆ byte_mmap_source

using ghassanpl::byte_mmap_source

Definition at line 353 of file mmap.h.

◆ char8_mmap_source

using ghassanpl::char8_mmap_source

Definition at line 356 of file mmap.h.

◆ char_mmap_source

using ghassanpl::char_mmap_source

Definition at line 355 of file mmap.h.

◆ u8_mmap_source

using ghassanpl::u8_mmap_source

Definition at line 354 of file mmap.h.

Function Documentation

◆ make_mmap_sink() [1/4]

template<typename VALUE_TYPE>
mmap_sink< VALUE_TYPE > ghassanpl::make_mmap_sink ( const std::filesystem::path & path)
nodiscard

Definition at line 466 of file mmap.h.

◆ make_mmap_sink() [2/4]

template<typename VALUE_TYPE>
mmap_sink< VALUE_TYPE > ghassanpl::make_mmap_sink ( const std::filesystem::path & path,
std::error_code & error )
nodiscardnoexcept

Definition at line 450 of file mmap.h.

◆ make_mmap_sink() [3/4]

template<typename VALUE_TYPE>
mmap_sink< VALUE_TYPE > ghassanpl::make_mmap_sink ( const std::filesystem::path & path,
typename mmap_sink< VALUE_TYPE >::size_type offset,
typename mmap_sink< VALUE_TYPE >::size_type length )
nodiscard

Definition at line 456 of file mmap.h.

◆ make_mmap_sink() [4/4]

template<typename VALUE_TYPE>
mmap_sink< VALUE_TYPE > ghassanpl::make_mmap_sink ( const std::filesystem::path & path,
typename mmap_sink< VALUE_TYPE >::size_type offset,
typename mmap_sink< VALUE_TYPE >::size_type length,
std::error_code & error )
nodiscardnoexcept

Definition at line 439 of file mmap.h.

◆ make_mmap_source() [1/4]

template<typename VALUE_TYPE = char>
mmap_source< VALUE_TYPE > ghassanpl::make_mmap_source ( const std::filesystem::path & path)
nodiscard

Definition at line 433 of file mmap.h.

◆ make_mmap_source() [2/4]

template<typename VALUE_TYPE = char>
mmap_source< VALUE_TYPE > ghassanpl::make_mmap_source ( const std::filesystem::path & path,
std::error_code & error )
nodiscardnoexcept

Definition at line 421 of file mmap.h.

◆ make_mmap_source() [3/4]

template<typename VALUE_TYPE = char>
mmap_source< VALUE_TYPE > ghassanpl::make_mmap_source ( const std::filesystem::path & path,
typename mmap_source< VALUE_TYPE >::size_type offset,
typename mmap_source< VALUE_TYPE >::size_type length )
nodiscard

Definition at line 427 of file mmap.h.

◆ make_mmap_source() [4/4]

template<typename VALUE_TYPE = char>
mmap_source< VALUE_TYPE > ghassanpl::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 )
nodiscardnoexcept

Definition at line 413 of file mmap.h.