Stxxl  1.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Member Functions | Private Attributes
stxxl::request_ptr Class Reference

Implemented as reference counting smart pointer. More...

#include <request_ptr.h>

Collaboration diagram for stxxl::request_ptr:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 request_ptr (request *ptr_=NULL)
 Constructs an request_ptr from request pointer.
 request_ptr (const request_ptr &p)
 Constructs an request_ptr from a request_ptr object.
 ~request_ptr ()
 Destructor.
request_ptroperator= (const request_ptr &p)
 Assignment operator from request_ptr object.
request_ptroperator= (request *p)
 Assignment operator from request pointer.
requestoperator* () const
 "Star" operator
requestoperator-> () const
 "Arrow" operator
bool operator== (const request_ptr &rp2) const
requestget () const
 Access to owned request object (synonym for operator->() )
bool valid () const
 Returns true if object is initialized.
bool empty () const
 Returns true if object is not initialized.

Private Member Functions

void add_ref ()
void sub_ref ()

Private Attributes

requestptr

Detailed Description

Implemented as reference counting smart pointer.

Examples:
algo/sort_file.cpp, io/test_cancel.cpp, io/test_io.cpp, io/test_io_sizes.cpp, and mng/test_mng.cpp.

Definition at line 34 of file request_ptr.h.


Constructor & Destructor Documentation

stxxl::request_ptr::request_ptr ( request ptr_ = NULL) [inline]

Constructs an request_ptr from request pointer.

Definition at line 63 of file request_ptr.h.

References STXXL_VERBOSE_request_ptr.

Constructs an request_ptr from a request_ptr object.

Definition at line 69 of file request_ptr.h.

References STXXL_VERBOSE_request_ptr.

Destructor.

Definition at line 75 of file request_ptr.h.

References STXXL_VERBOSE_request_ptr.


Member Function Documentation

void stxxl::request_ptr::add_ref ( ) [inline, private]

Definition at line 37 of file request_ptr.h.

References stxxl::request::add_ref().

bool stxxl::request_ptr::empty ( ) const [inline]
request* stxxl::request_ptr::get ( ) const [inline]

Access to owned request object (synonym for operator->() )

Returns:
reference to owned request object
Warning:
Creation another request_ptr from the returned request or deletion causes unpredictable behaviour. Do not do that!

Definition at line 125 of file request_ptr.h.

Referenced by stxxl::request_queue_impl_qwqr::add_request(), and stxxl::request_queue_impl_qwqr::cancel_request().

request& stxxl::request_ptr::operator* ( ) const [inline]

"Star" operator

Returns:
reference to owned request object

Definition at line 103 of file request_ptr.h.

request* stxxl::request_ptr::operator-> ( ) const [inline]

"Arrow" operator

Returns:
pointer to owned request object

Definition at line 110 of file request_ptr.h.

request_ptr& stxxl::request_ptr::operator= ( const request_ptr p) [inline]

Assignment operator from request_ptr object.

Returns:
reference to itself

Definition at line 82 of file request_ptr.h.

References ptr.

request_ptr& stxxl::request_ptr::operator= ( request p) [inline]

Assignment operator from request pointer.

Returns:
reference to itself

Definition at line 89 of file request_ptr.h.

References STXXL_VERBOSE_request_ptr.

bool stxxl::request_ptr::operator== ( const request_ptr rp2) const [inline]

Definition at line 116 of file request_ptr.h.

References ptr.

void stxxl::request_ptr::sub_ref ( ) [inline, private]

Definition at line 44 of file request_ptr.h.

References STXXL_VERBOSE_request_ptr.

bool stxxl::request_ptr::valid ( ) const [inline]

Member Data Documentation

Definition at line 36 of file request_ptr.h.

Referenced by operator=(), and operator==().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines