Implementation of memory mapped access file. More...
#include <mmap_file.h>
Public Member Functions | |
mmap_file (const std::string &filename, int mode, int disk=-1) | |
constructs file object | |
request_ptr | aread (void *buffer, stxxl::int64 pos, size_t bytes, completion_handler on_cmpl) |
Schedules asynchronous read request to the file. | |
request_ptr | awrite (void *buffer, stxxl::int64 pos, size_t bytes, completion_handler on_cmpl) |
Schedules asynchronous write request to the file. |
Implementation of memory mapped access file.
mmap_file::mmap_file | ( | const std::string & | filename, | |
int | mode, | |||
int | disk = -1 | |||
) | [inline] |
constructs file object
filename | path of file | |
mode | open mode, see stxxl::file::open_modes | |
disk | disk(file) identifier |
request_ptr mmap_file::aread | ( | void * | buffer, | |
stxxl::int64 | pos, | |||
size_t | bytes, | |||
completion_handler | on_cmpl | |||
) | [virtual] |
Schedules asynchronous read request to the file.
buffer | pointer to memory buffer to read into | |
pos | starting file position to read | |
bytes | number of bytes to transfer | |
on_cmpl | I/O completion handler |
request_ptr
object, that can be used to track the status of the operation Implements file.
References request_ptr::get(), and file::get_id().
request_ptr mmap_file::awrite | ( | void * | buffer, | |
stxxl::int64 | pos, | |||
size_t | bytes, | |||
completion_handler | on_cmpl | |||
) | [virtual] |
Schedules asynchronous write request to the file.
buffer | pointer to memory buffer to write from | |
pos | starting file position to write | |
bytes | number of bytes to transfer | |
on_cmpl | I/O completion handler |
request_ptr
object, that can be used to track the status of the operation Implements file.
References request_ptr::get(), and file::get_id().