Public Member Functions | Protected Member Functions | Protected Attributes | Friends

request Class Reference
[I/O primitives layer]

Basic properties of a request. More...

#include <request.h>

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

List of all members.

Public Member Functions

 request (const completion_handler &on_compl, file *file__, void *buffer_, offset_type offset_, size_type bytes_, request_type type_)
fileget_file () const
void * get_buffer () const
offset_type get_offset () const
size_type get_size () const
request_type get_type () const
void check_alignment () const
virtual std::ostream & print (std::ostream &out) const
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.

Protected Member Functions

void completed ()
int nref ()
void check_nref (bool after=false)

Protected Attributes

completion_handler on_complete
int ref_cnt
compat_unique_ptr
< stxxl::io_error >::result 
error
mutex ref_cnt_mutex
filefile_
void * buffer
offset_type offset
size_type bytes
request_type type

Friends

int wait_any (request_ptr req_array[], int count)
 Suspends calling thread until any of requests is completed.
template<class request_iterator_ >
request_iterator_ wait_any (request_iterator_ reqs_begin, request_iterator_ reqs_end)
 Suspends calling thread until any of requests is completed.

Detailed Description

Basic properties of a request.


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 request_state_impl_basic::poll(), and request_state_impl_basic::wait().

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

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

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

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


Friends And Related Function Documentation

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

Suspends calling thread until any of requests is completed.

Parameters:
req_array array of request_ptr objects
count size of req_array
Returns:
index in req_array pointing to the first completed request
template<class request_iterator_ >
request_iterator_ wait_any ( request_iterator_  reqs_begin,
request_iterator_  reqs_end 
) [friend]

Suspends calling thread until any of requests is completed.

Parameters:
reqs_begin begin of request sequence to wait for
reqs_end end of request sequence to wait for
Returns:
index in req_array pointing to the first completed request

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