#include <winstl/filesystem/memory_mapped_file.hpp>
Public Types | |
Member Types | |
typedef memory_mapped_file | class_type |
This type. | |
typedef ws_uint32_t | size_type |
The size type. | |
typedef ws_dword_t | error_type |
The error type. | |
typedef bool | bool_type |
The boolean type. | |
Public Member Functions | |
Construction | |
memory_mapped_file (char const *fileName) | |
Maps an entire file into memory. | |
memory_mapped_file (wchar_t const *fileName) | |
Maps an entire file into memory. | |
template<typename S> | |
memory_mapped_file (S const &fileName) | |
Maps an entire file into memory. | |
~memory_mapped_file () throw () | |
Closes the view on the mapped file. | |
void | swap (class_type &rhs) throw () |
Swaps the state of this instance with another. | |
Accessors | |
void const * | memory () const |
Non-mutating (const) pointer to the start of the mapped region. | |
size_type | size () const |
The number of bytes in the mapped region. |
typedef memory_mapped_file class_type |
This type.
typedef ws_uint32_t size_type |
The size type.
typedef ws_dword_t error_type |
The error type.
typedef bool bool_type |
The boolean type.
memory_mapped_file | ( | char const * | fileName | ) | [inline, explicit] |
Maps an entire file into memory.
fileName | The name of the file to map into memory |
winstl::windows_exception | Thrown if the map cannot be created. May be any value returned by the Windows API; known values include ERROR_NOT_ENOUGH_MEMORY (when the map size is too large to fit into memory) and ERROR_INVALID_PARAMETER (when the allocated size is too large to be valid |
memory_mapped_file | ( | wchar_t const * | fileName | ) | [inline, explicit] |
Maps an entire file into memory.
memory_mapped_file | ( | S const & | fileName | ) | [inline, explicit] |
~memory_mapped_file | ( | ) | throw () [inline] |
void swap | ( | class_type & | rhs | ) | throw () [inline] |
void const* memory | ( | ) | const [inline] |
Non-mutating (const) pointer to the start of the mapped region.
size_type size | ( | ) | const [inline] |
The number of bytes in the mapped region.