Implementation of file based on new[] and memcpy. More...
#include <mem_file.h>


Public Member Functions | |
| mem_file (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.   | |
| stxxl::int64 | size () | 
| Returns size of the file.   | |
| void | set_size (stxxl::int64 newsize) | 
| Changes the size of the file.   | |
| void | lock () | 
| Locks file for reading and writing.   | |
| void | delete_region (int64 offset, unsigned_type size) | 
| Some specialized file types may need to know freed regions.   | |
Implementation of file based on new[] and memcpy.
| mem_file::mem_file | ( | int |  disk = -1 | 
          ) | 
constructs file object
| disk | disk(file) identifier | 
| request_ptr mem_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 mem_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().
| void mem_file::delete_region | ( | int64 | offset, | |
| unsigned_type | size | |||
| ) |  [virtual] | 
        
Some specialized file types may need to know freed regions.
Reimplemented from file.
| void mem_file::lock | ( | ) |  [virtual] | 
        
Locks file for reading and writing.
Reimplemented from file.
| void mem_file::set_size | ( | stxxl::int64 | newsize | ) |  [virtual] | 
        
| stxxl::int64 mem_file::size | ( | ) |  [virtual] | 
        
 1.7.1