15 #ifndef STXXL_IO__REQUEST_INTERFACE_H_
16 #define STXXL_IO__REQUEST_INTERFACE_H_
20 #include <stxxl/bits/namespace.h>
21 #include <stxxl/bits/noncopyable.h>
22 #include <stxxl/bits/common/types.h>
25 __STXXL_BEGIN_NAMESPACE
40 typedef stxxl::external_size_type offset_type;
41 typedef stxxl::internal_size_type size_type;
42 enum request_type { READ, WRITE };
45 virtual bool add_waiter(onoff_switch * sw) = 0;
46 virtual void delete_waiter(onoff_switch * sw) = 0;
49 virtual void notify_waiters() = 0;
53 virtual void serve() = 0;
56 virtual void completed() = 0;
60 virtual void wait(
bool measure_time =
true) = 0;
73 virtual bool poll() = 0;
77 virtual const char *
io_type()
const = 0;
80 virtual std::ostream &
print(std::ostream & out)
const = 0;
90 #endif // !STXXL_IO__REQUEST_INTERFACE_H_