Stxxl  1.4.0
include/stxxl/bits/io/serving_request.h
Go to the documentation of this file.
00001 /***************************************************************************
00002  *  include/stxxl/bits/io/serving_request.h
00003  *
00004  *  Part of the STXXL. See http://stxxl.sourceforge.net
00005  *
00006  *  Copyright (C) 2002 Roman Dementiev <dementiev@mpi-sb.mpg.de>
00007  *  Copyright (C) 2008 Andreas Beckmann <beckmann@cs.uni-frankfurt.de>
00008  *
00009  *  Distributed under the Boost Software License, Version 1.0.
00010  *  (See accompanying file LICENSE_1_0.txt or copy at
00011  *  http://www.boost.org/LICENSE_1_0.txt)
00012  **************************************************************************/
00013 
00014 #ifndef STXXL_IO__SERVING_REQUEST_H_
00015 #define STXXL_IO__SERVING_REQUEST_H_
00016 
00017 #include <stxxl/bits/io/request_with_state.h>
00018 
00019 
00020 __STXXL_BEGIN_NAMESPACE
00021 
00022 //! \addtogroup iolayer
00023 //! \{
00024 
00025 //! \brief Request which serves an I/O by calling the synchronous routine of the file.
00026 class serving_request : public request_with_state
00027 {
00028     template <class base_file_type>
00029     friend class fileperblock_file;
00030 
00031 public:
00032     serving_request(
00033         const completion_handler & on_cmpl,
00034         file * f,
00035         void * buf,
00036         offset_type off,
00037         size_type b,
00038         request_type t);
00039 
00040 protected:
00041     void serve();
00042     void completed();
00043 
00044 public:
00045     const char * io_type() const;
00046 };
00047 
00048 //! \}
00049 
00050 __STXXL_END_NAMESPACE
00051 
00052 #endif // !STXXL_IO__SERVING_REQUEST_H_
00053 // vim: et:ts=4:sw=4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines