Stxxl
1.3.1
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
include
stxxl
bits
io
request_with_state.h
1
/***************************************************************************
2
* include/stxxl/bits/io/request_with_state.h
3
*
4
* Part of the STXXL. See http://stxxl.sourceforge.net
5
*
6
* Copyright (C) 2008 Andreas Beckmann <beckmann@cs.uni-frankfurt.de>
7
* Copyright (C) 2009 Johannes Singler <singler@ira.uka.de>
8
*
9
* Distributed under the Boost Software License, Version 1.0.
10
* (See accompanying file LICENSE_1_0.txt or copy at
11
* http://www.boost.org/LICENSE_1_0.txt)
12
**************************************************************************/
13
14
#ifndef STXXL_IO__REQUEST_WITH_STATE_H_
15
#define STXXL_IO__REQUEST_WITH_STATE_H_
16
17
#include <stxxl/bits/common/state.h>
18
#include <stxxl/bits/io/request.h>
19
#include <stxxl/bits/io/request_with_waiters.h>
20
21
22
__STXXL_BEGIN_NAMESPACE
23
26
28
class
request_with_state
:
public
request
,
public
request_with_waiters
29
{
30
protected
:
33
enum
request_state
{ OP = 0, DONE = 1, READY2DIE = 2 };
34
35
state<request_state> _state;
36
37
protected
:
38
request_with_state
(
39
const
completion_handler
& on_cmpl,
40
file
* f,
41
void
* buf,
42
offset_type off,
43
size_type b,
44
request_type t) :
45
request
(on_cmpl, f, buf, off, b, t),
46
_state(OP)
47
{ }
48
49
public
:
50
virtual
~
request_with_state
();
51
void
wait
(
bool
measure_time =
true
);
52
bool
poll
();
53
bool
cancel
();
54
};
55
57
58
__STXXL_END_NAMESPACE
59
60
#endif // !STXXL_IO__REQUEST_WITH_STATE_H_
61
// vim: et:ts=4:sw=4
Generated by
1.8.4