Stxxl  1.3.1
Public Member Functions
syscall_file Class Reference

Implementation of file based on UNIX syscalls. More...

#include <syscall_file.h>

Inheritance diagram for syscall_file:
Inheritance graph
[legend]
Collaboration diagram for syscall_file:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 syscall_file (const std::string &filename, int mode, int queue_id=DEFAULT_QUEUE, int allocator_id=NO_ALLOCATOR)
 constructs file object
void serve (const request *req) throw (io_error)
const char * io_type () const
 Identifies the type of I/O implementation.
- Public Member Functions inherited from ufs_file_base
offset_type size ()
 Returns size of the file.
void set_size (offset_type newsize)
 Changes the size of the file.
void lock ()
 Locks file for reading and writing (acquires a lock in the file system)
void remove ()
- Public Member Functions inherited from file
void add_request_ref ()
void delete_request_ref ()
int get_request_nref ()
virtual int get_physical_device_id () const
virtual void discard (offset_type offset, offset_type size)
 Discard a region of the file (mark it unused) some specialized file types may need to know freed regions.
virtual void export_files (offset_type offset, offset_type length, std::string prefix)
- Public Member Functions inherited from disk_queued_file
 disk_queued_file (int queue_id, int allocator_id)
request_ptr aread (void *buffer, offset_type pos, size_type bytes, const completion_handler &on_cmpl)
 Schedules an asynchronous read request to the file.
request_ptr awrite (void *buffer, offset_type pos, size_type bytes, const completion_handler &on_cmpl)
 Schedules an asynchronous write request to the file.
virtual int get_queue_id () const
 Returns the identifier of the file's queue.
virtual int get_allocator_id () const
 Returns the file's allocator.

Additional Inherited Members

- Protected Member Functions inherited from ufs_file_base
 ufs_file_base (const std::string &filename, int mode)
offset_type _size ()
void close ()
- Protected Member Functions inherited from file
 file ()
 Initializes file object.
- Protected Attributes inherited from ufs_file_base
mutex fd_mutex
int file_des
int mode_
const std::string filename

Detailed Description

Implementation of file based on UNIX syscalls.


Constructor & Destructor Documentation

syscall_file::syscall_file ( const std::string &  filename,
int  mode,
int  queue_id = DEFAULT_QUEUE,
int  allocator_id = NO_ALLOCATOR 
)
inline

constructs file object

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

Member Function Documentation

const char * syscall_file::io_type ( ) const
virtual

Identifies the type of I/O implementation.

Returns:
pointer to null terminated string of characters, containing the name of I/O implementation

Reimplemented from ufs_file_base.


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