14 #ifndef STXXL_IO__REQUEST_PTR_H_
15 #define STXXL_IO__REQUEST_PTR_H_
19 #include <stxxl/bits/namespace.h>
20 #include <stxxl/bits/io/request.h>
21 #include <stxxl/bits/verbose.h>
24 __STXXL_BEGIN_NAMESPACE
31 #define STXXL_VERBOSE_request_ptr(msg) STXXL_VERBOSE3("[" << static_cast<void *>(this) << "] request_ptr::" << msg << " ptr=" << static_cast<void *>(ptr))
85 return (*
this = p.ptr);
118 return ptr == rp2.ptr;
128 bool valid()
const {
return ptr != NULL; }
131 bool empty()
const {
return ptr == NULL; }
136 __STXXL_END_NAMESPACE
138 #endif // !STXXL_IO__REQUEST_PTR_H_
bool empty() const
Returns true if object is not initialized.
Definition: request_ptr.h:131
Request with basic properties like file and offset.
Definition: request.h:39
request_ptr(const request_ptr &p)
Constructs an request_ptr from a request_ptr object.
Definition: request_ptr.h:69
request_ptr(request *ptr_=NULL)
Constructs an request_ptr from request pointer.
Definition: request_ptr.h:63
request & operator*() const
"Star" operator
Definition: request_ptr.h:103
request_ptr & operator=(const request_ptr &p)
Assignment operator from request_ptr object.
Definition: request_ptr.h:82
request * operator->() const
"Arrow" operator
Definition: request_ptr.h:110
Implemented as reference counting smart pointer.
Definition: request_ptr.h:34
~request_ptr()
Destructor.
Definition: request_ptr.h:75
#define STXXL_VERBOSE_request_ptr(msg)
A smart wrapper for request pointer.
Definition: request_ptr.h:31
bool valid() const
Returns true if object is initialized.
Definition: request_ptr.h:128