/usr/include/stxxl/bits/io
NameSizeModeActions
boostfd_file.h21210644editdlrm
completion_handler.h28340644editdlrm
create_file.h13310644editdlrm
disk_queued_file.h17460644editdlrm
disk_queues.h39620644editdlrm
file.h76760644editdlrm
fileperblock_file.h25380644editdlrm
io.h12710644editdlrm
iostats.h162380644editdlrm
linuxaio_file.h25740644editdlrm
linuxaio_queue.h31090644editdlrm
linuxaio_request.h20990644editdlrm
mem_file.h17440644editdlrm
mmap_file.h18700644editdlrm
request.h31450644editdlrm
request_interface.h26820644editdlrm
request_operations.h51880644editdlrm
request_queue.h12450644editdlrm
request_queue_impl_1q.h21030644editdlrm
request_queue_impl_qwqr.h22740644editdlrm
request_queue_impl_worker.h20290644editdlrm
request_with_state.h16990644editdlrm
request_with_waiters.h15760644editdlrm
serving_request.h13870644editdlrm
simdisk_file.h42830644editdlrm
syscall_file.h18440644editdlrm
ufs_file_base.h18650644editdlrm
wbtl_file.h34150644editdlrm
wfs_file_base.h16630644editdlrm
wincall_file.h20450644editdlrm
Edit: /usr/include/stxxl/bits/io/completion_handler.h (2834B)
/*************************************************************************** * include/stxxl/bits/io/completion_handler.h * * Loki-style completion handler (functors) * * Part of the STXXL. See http://stxxl.sourceforge.net * * Copyright (C) 2003 Roman Dementiev * Copyright (C) 2008 Andreas Beckmann * * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) **************************************************************************/ #ifndef STXXL_IO_COMPLETION_HANDLER_HEADER #define STXXL_IO_COMPLETION_HANDLER_HEADER #include #include #include STXXL_BEGIN_NAMESPACE class request; class completion_handler_impl { public: virtual void operator () (request*) = 0; virtual completion_handler_impl * clone() const = 0; virtual ~completion_handler_impl() { } }; template class completion_handler1 : public completion_handler_impl { private: HandlerType m_handler; public: completion_handler1(const HandlerType& handler) : m_handler(handler) { } completion_handler1 * clone() const { return new completion_handler1(*this); } void operator () (request* req) { m_handler(req); } }; //! Completion handler class (Loki-style). //! //! In some situations one needs to execute some actions after completion of an //! I/O request. In these cases one can use an I/O completion handler - a //! function object that can be passed as a parameter to asynchronous I/O calls //! \c stxxl::file::aread and \c stxxl::file::awrite . class completion_handler { compat_unique_ptr::result m_ptr; public: //! Construct default, no operation completion handler. completion_handler() : m_ptr(static_cast(NULL)) { } //! Copy constructor. completion_handler(const completion_handler& obj) : m_ptr(obj.m_ptr.get() ? obj.m_ptr.get()->clone() : NULL) { } //! Construct a completion handler which calls some function. template completion_handler(const HandlerType& handler) : m_ptr(new completion_handler1(handler)) { } //! Assignment operator completion_handler& operator = (const completion_handler& obj) { m_ptr.reset(obj.m_ptr.get() ? obj.m_ptr.get()->clone() : NULL); return *this; } //! Call the enclosed completion handler. void operator () (request* req) { if (m_ptr.get()) (* m_ptr)(req); } }; STXXL_END_NAMESPACE #endif // !STXXL_IO_COMPLETION_HANDLER_HEADER // vim: et:ts=4:sw=4