sim_disk_file Class Reference
[File implementations]

Implementation of disk emulation. More...

#include <simdisk_file.h>

Inheritance diagram for sim_disk_file:

Inheritance graph
[legend]
Collaboration diagram for sim_disk_file:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 sim_disk_file (const std::string &filename, int mode, int disk)
 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.
void set_size (stxxl::int64 newsize)
 Changes the size of the file.


Detailed Description

Implementation of disk emulation.

Remarks:
It is emulation of IBM IC35L080AVVA07 disk's timings

Constructor & Destructor Documentation

sim_disk_file::sim_disk_file ( const std::string &  filename,
int  mode,
int  disk 
) [inline]

constructs file object

Parameters:
filename path of file
Attention:
filename must be resided at memory disk partition
Parameters:
mode open mode, see stxxl::file::open_modes
disk disk(file) identifier


Member Function Documentation

request_ptr sim_disk_file::aread ( void *  buffer,
stxxl::int64  pos,
size_t  bytes,
completion_handler  on_cmpl 
) [virtual]

Schedules asynchronous read request to the file.

Parameters:
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
Returns:
request_ptr object, that can be used to track the status of the operation

Implements file.

References disk_queues::add_readreq(), request_ptr::get(), and file::get_id().

request_ptr sim_disk_file::awrite ( void *  buffer,
stxxl::int64  pos,
size_t  bytes,
completion_handler  on_cmpl 
) [virtual]

Schedules asynchronous write request to the file.

Parameters:
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
Returns:
request_ptr object, that can be used to track the status of the operation

Implements file.

References disk_queues::add_writereq(), request_ptr::get(), and file::get_id().

void sim_disk_file::set_size ( stxxl::int64  newsize  )  [virtual]

Changes the size of the file.

Parameters:
newsize value of the new file size

Reimplemented from ufs_file_base.

References ufs_file_base::size().


The documentation for this class was generated from the following files:

Generated on Wed Apr 21 06:45:49 2010 for Stxxl by  doxygen 1.5.6