Stxxl  1.3.2
request_queue.h
1 /***************************************************************************
2  * include/stxxl/bits/io/request_queue.h
3  *
4  * Part of the STXXL. See http://stxxl.sourceforge.net
5  *
6  * Copyright (C) 2009 Andreas Beckmann <[email protected]>
7  * Copyright (C) 2011 Johannes Singler <[email protected]>
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_QUEUE_HEADER
15 #define STXXL_IO_REQUEST_QUEUE_HEADER
16 
17 #include <stxxl/bits/noncopyable.h>
18 #include <stxxl/bits/io/request_ptr.h>
19 
20 
21 __STXXL_BEGIN_NAMESPACE
22 
25 
26 class request_queue : private noncopyable
27 {
28 public:
29  enum priority_op { READ, WRITE, NONE };
30 
31 public:
32  virtual void add_request(request_ptr & req) = 0;
33  virtual bool cancel_request(request_ptr & req) = 0;
34  virtual ~request_queue() { }
35  virtual void set_priority_op(priority_op p) { STXXL_UNUSED(p); }
36 };
37 
39 
40 __STXXL_END_NAMESPACE
41 
42 #endif // !STXXL_IO_REQUEST_QUEUE_HEADER
43 // vim: et:ts=4:sw=4
Implemented as reference counting smart pointer.
Definition: request_ptr.h:34