|
HikoGUI
A low latency retained GUI
|
#include <TTauri/Foundation/FileMapping.hpp>
Public Member Functions | |
| FileMapping (std::shared_ptr< File > const &file, size_t size) | |
| FileMapping (URL const &path, AccessMode accessMode, size_t size) | |
| FileMapping (FileMapping const &other)=delete | |
| FileMapping (FileMapping &&other)=delete | |
| FileMapping & | operator= (FileMapping const &other)=delete |
| FileMapping & | operator= (FileMapping &&other)=delete |
| AccessMode | accessMode () const noexcept |
| URL const & | location () const noexcept |
Data Fields | |
| std::shared_ptr< File > | file |
| size_t | size |
| FileHandle | 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.
| tt::FileMapping::FileMapping | ( | std::shared_ptr< File > const & | file, |
| 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. |
| tt::FileMapping::FileMapping | ( | URL const & | path, |
| AccessMode | accessMode, | ||
| 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 FileMapping 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> tt::FileMapping::file |
A pointer to an open file.
| FileHandle tt::FileMapping::mapHandle |
Operating system handle to a file mapping.
| size_t tt::FileMapping::size |
Size of the mapping.