Stxxl  1.2.1
Public Member Functions | Friends
request Class Reference

Defines interface of request. More...

#include <iobase.h>

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

List of all members.

Public Member Functions

virtual void wait ()=0
 Suspends calling thread until completion of the request.
virtual bool poll ()=0
 Polls the status of the request.
virtual const char * io_type ()
 Identifies the type of request I/O implementation.
void error_occured (const char *msg)
 Inform the request object that an error occurred during the I/O execution.
void error_occured (const std::string &msg)
 Inform the request object that an error occurred during the I/O execution.
void check_errors () throw (stxxl::io_error)
 Rises an exception if there were error with the I/O.

Friends

int wait_any (request_ptr req_array[], int count)
 Collection of functions to track statuses of a number of requests.

Detailed Description

Defines interface of request.

Since all library I/O operations are asynchronous, one needs to keep track of their status: whether an I/O completed or not.


Member Function Documentation

void request::check_errors ( ) throw (stxxl::io_error)
inline

Rises an exception if there were error with the I/O.

Referenced by ufs_request_base::poll(), mem_request::poll(), ufs_request_base::wait(), mem_request::wait(), and wait_any().

void request::error_occured ( const char *  msg)
inline

Inform the request object that an error occurred during the I/O execution.

void request::error_occured ( const std::string &  msg)
inline

Inform the request object that an error occurred during the I/O execution.

virtual const char* request::io_type ( )
inlinevirtual

Identifies the type of request I/O implementation.

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

Reimplemented in sim_disk_request, mem_request, ufs_request_base, mmap_request, and syscall_request.

virtual bool request::poll ( )
pure virtual

Polls the status of the request.

Returns:
true if request is completed, otherwise false

Implemented in mem_request, and ufs_request_base.

Referenced by buffered_writer< block_type >::get_free_block().

virtual void request::wait ( )
pure virtual

Friends And Related Function Documentation

int wait_any ( request_ptr  req_array[],
int  count 
)
friend

Collection of functions to track statuses of a number of requests.

Suspends calling thread until any of requests is completed

Parameters:
req_arrayarray of request_ptr objects
countsize of req_array
Returns:
index in req_array pointing to the first completed request

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