lean cpp library
A lean C++ library providing efficient utility classes for high-performance C++ applications.
|
Base class for mapped files. More...
#include <mapped_file.h>
Protected Member Functions | |
LEAN_MAYBE_EXPORT | mapped_file_base (const utf8_ntri &name, bool readonly, uint8 size, open_mode mode, uint4 hints, uint4 share) |
Opens the given file according to the given flags. Throws a runtime_exception on error. | |
LEAN_MAYBE_EXPORT | ~mapped_file_base () |
Closes this file. | |
LEAN_MAYBE_EXPORT void * | map (bool readonly, uint8 offset, size_t size) |
Maps the given view of this file. A size of 0 maps the entire file starting at the given offset. Throws a runtime_exception on error. | |
LEAN_MAYBE_EXPORT void | unmap (void *memory) |
Unmaps the given view of this file. | |
LEAN_MAYBE_EXPORT void | resize (uint8 newSize) |
Resizes the file, either extending or truncating it. Throws a runtime_exception on error. Destroys the mapping, re-mapping is only possible again after this method has returned successfully. |
Base class for mapped files.