#include <cstdint>
#include <deque>
#include <functional>
+#include <ostream>
#include <utility>
#include <vector>
*/
class AsyncIOOp : private boost::noncopyable {
friend class AsyncIO;
+ friend std::ostream& operator<<(std::ostream& stream, const AsyncIOOp& o);
public:
typedef std::function<void(AsyncIOOp*)> NotificationCallback;
// There would be a cancel() method here if Linux AIO actually implemented
// it. But let's not get your hopes up.
- enum State {
+ enum class State {
UNINITIALIZED,
INITIALIZED,
PENDING,
ssize_t result_;
};
+std::ostream& operator<<(std::ostream& stream, const AsyncIOOp& o);
+std::ostream& operator<<(std::ostream& stream, AsyncIOOp::State state);
+
/**
* C++ interface around Linux Async IO.
*/