|
HikoGUI
A low latency retained GUI
|
#include <hikogui/file_mapping.hpp>
Public Member Functions | |
| file_mapping (std::shared_ptr< hi::file > const &file, std::size_t size) | |
| file_mapping (URL const &path, access_mode accessMode, std::size_t size) | |
| file_mapping (file_mapping const &other)=delete | |
| file_mapping (file_mapping &&other)=delete | |
| file_mapping & | operator= (file_mapping const &other)=delete |
| file_mapping & | operator= (file_mapping &&other)=delete |
| access_mode | accessMode () const noexcept |
| URL const & | location () const noexcept |
Data Fields | |
| std::shared_ptr< file > | file |
| std::size_t | size |
| file_handle | mapHandle |
A file mapping. A file mapping maps a region of bytes to a handle. This is mostly for Window which has an extra layer of indirection before mapping the file to actual memory.
| v1::file_mapping::file_mapping | ( | std::shared_ptr< hi::file > const & | file, |
| std::size_t | size ) |
Map a file. Map a file up to size bytes.
| file | a pointer to an open file. |
| size | Number of bytes from the start to map. |
| v1::file_mapping::file_mapping | ( | URL const & | path, |
| access_mode | accessMode, | ||
| std::size_t | size ) |
Map a file. Map a file up to size bytes. This function will automatically open a file and potentially share it with other file_mapping objects.
| path | a URL to a file. |
| accessMode | mode of how to access the file. |
| size | Number of bytes from the start to map. |
|
inlinenoexcept |
Get access mode of the file object.
| std::shared_ptr<file> v1::file_mapping::file |
A pointer to an open file.
| file_handle v1::file_mapping::mapHandle |
Operating system handle to a file mapping.
| std::size_t v1::file_mapping::size |
Size of the mapping.