|
| | basic_shared_mmap ()=default |
| |
| | basic_shared_mmap (const basic_shared_mmap &)=default |
| |
| basic_shared_mmap & | operator= (const basic_shared_mmap &)=default |
| |
| | basic_shared_mmap (basic_shared_mmap &&)=default |
| |
| basic_shared_mmap & | operator= (basic_shared_mmap &&)=default |
| |
| | basic_shared_mmap (mmap_type &&mmap) |
| |
| basic_shared_mmap & | operator= (mmap_type &&mmap) |
| |
| | basic_shared_mmap (std::shared_ptr< mmap_type > mmap) |
| |
| basic_shared_mmap & | operator= (std::shared_ptr< mmap_type > mmap) |
| |
| | ~basic_shared_mmap ()=default |
| |
| std::shared_ptr< mmap_type > | get_shared_ptr () |
| |
| handle_type | file_handle () const noexcept |
| |
| handle_type | mapping_handle () const noexcept |
| |
| bool | is_open () const noexcept |
| |
| bool | empty () const noexcept |
| |
| size_type | size () const noexcept |
| |
| size_type | length () const noexcept |
| |
| size_type | mapped_length () const noexcept |
| |
| template<access_mode A = AccessMode, typename = typename std::enable_if<A == access_mode::write>::type> |
| pointer | data () noexcept |
| |
| const_pointer | data () const noexcept |
| |
| iterator | begin () noexcept |
| |
| const_iterator | begin () const noexcept |
| |
| const_iterator | cbegin () const noexcept |
| |
| template<access_mode A = AccessMode, typename = typename std::enable_if<A == access_mode::write>::type> |
| iterator | end () noexcept |
| |
| const_iterator | end () const noexcept |
| |
| const_iterator | cend () const noexcept |
| |
| template<access_mode A = AccessMode, typename = typename std::enable_if<A == access_mode::write>::type> |
| reverse_iterator | rbegin () noexcept |
| |
| const_reverse_iterator | rbegin () const noexcept |
| |
| const_reverse_iterator | crbegin () const noexcept |
| |
| template<access_mode A = AccessMode, typename = typename std::enable_if<A == access_mode::write>::type> |
| reverse_iterator | rend () noexcept |
| |
| const_reverse_iterator | rend () const noexcept |
| |
| const_reverse_iterator | crend () const noexcept |
| |
| reference | operator[] (const size_type &i) noexcept |
| |
| const_reference | operator[] (const size_type &i) const noexcept |
| |
| template<typename String > |
| void | map (const String &path, const size_type &offset, const size_type &length, std::error_code &error) |
| |
| template<typename String > |
| void | map (const String &path, std::error_code &error) |
| |
| void | map (const handle_type &handle, const size_type &offset, const size_type &length, std::error_code &error) |
| |
| void | map (const handle_type &handle, std::error_code &error) |
| |
| void | unmap () |
| |
| void | swap (basic_shared_mmap &other) |
| |
| template<access_mode A = AccessMode, typename = typename std::enable_if<A == access_mode::write>::type> |
| void | sync (std::error_code &error) |
| |
Exposes (nearly) the same interface as basic_mmap, but endowes it with std::shared_ptr semantics.
This is not the default behaviour of basic_mmap to avoid allocating on the heap if shared semantics are not required.
Establishes a memory mapping with AccessMode. If the mapping is unsuccesful, the reason is reported via error and the object remains in a state as if this function hadn't been called.
handle, which must be a valid file handle, which is used to memory map the requested region. Upon failure, error is set to indicate the reason and the object remains in an unmapped state.
offset is the number of bytes, relative to the start of the file, where the mapping should begin. When specifying it, there is no need to worry about providing a value that is aligned with the operating system's page allocation granularity. This is adjusted by the implementation such that the first requested byte (as returned by data or begin), so long as offset is valid, will be at offset from the start of the file.
length is the number of bytes to map. It may be map_entire_file, in which case a mapping of the entire file is created.
Establishes a memory mapping with AccessMode. If the mapping is unsuccesful, the reason is reported via error and the object remains in a state as if this function hadn't been called.
handle, which must be a valid file handle, which is used to memory map the requested region. Upon failure, error is set to indicate the reason and the object remains in an unmapped state.
The entire file is mapped.
Establishes a memory mapping with AccessMode. If the mapping is unsuccesful, the reason is reported via error and the object remains in a state as if this function hadn't been called.
path, which must be a path to an existing file, is used to retrieve a file handle (which is closed when the object destructs or unmap is called), which is then used to memory map the requested region. Upon failure, error is set to indicate the reason and the object remains in an unmapped state.
offset is the number of bytes, relative to the start of the file, where the mapping should begin. When specifying it, there is no need to worry about providing a value that is aligned with the operating system's page allocation granularity. This is adjusted by the implementation such that the first requested byte (as returned by data or begin), so long as offset is valid, will be at offset from the start of the file.
length is the number of bytes to map. It may be map_entire_file, in which case a mapping of the entire file is created.
Establishes a memory mapping with AccessMode. If the mapping is unsuccesful, the reason is reported via error and the object remains in a state as if this function hadn't been called.
path, which must be a path to an existing file, is used to retrieve a file handle (which is closed when the object destructs or unmap is called), which is then used to memory map the requested region. Upon failure, error is set to indicate the reason and the object remains in an unmapped state.
The entire file is mapped.