STXXL  1.4-dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
request_queue.h
Go to the documentation of this file.
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.h>
19 
21 
22 //! \addtogroup reqlayer
23 //! \{
24 
25 //! Interface of a request_queue to which requests can be added and canceled.
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() noexcept(false) { }
35  virtual void set_priority_op(priority_op p) { STXXL_UNUSED(p); }
36 };
37 
38 //! \}
39 
41 
42 #endif // !STXXL_IO_REQUEST_QUEUE_HEADER
43 // vim: et:ts=4:sw=4
Interface of a request_queue to which requests can be added and canceled.
Definition: request_queue.h:26
virtual void set_priority_op(priority_op p)
Definition: request_queue.h:35
High-performance smart pointer used as a wrapping reference counting pointer.
Definition: counting_ptr.h:50
#define STXXL_BEGIN_NAMESPACE
Definition: namespace.h:16
void STXXL_UNUSED(const U &)
Definition: unused.h:22
virtual ~request_queue() noexcept(false)
Definition: request_queue.h:34
#define STXXL_END_NAMESPACE
Definition: namespace.h:17