Stxxl  1.2.1
wincall_file.h
1 /***************************************************************************
2  * include/stxxl/bits/io/wincall_file.h
3  *
4  * Part of the STXXL. See http://stxxl.sourceforge.net
5  *
6  * Copyright (C) 2005-2006 Roman Dementiev <dementiev@ira.uka.de>
7  *
8  * Distributed under the Boost Software License, Version 1.0.
9  * (See accompanying file LICENSE_1_0.txt or copy at
10  * http://www.boost.org/LICENSE_1_0.txt)
11  **************************************************************************/
12 
13 #ifndef STXXL_WINCALL_FILE_HEADER
14 #define STXXL_WINCALL_FILE_HEADER
15 
16 #ifdef STXXL_BOOST_CONFIG
17  #include <boost/config.hpp>
18 #endif
19 
20 #ifdef BOOST_MSVC
21 
22 #include <stxxl/bits/io/wfs_file.h>
23 #include <stxxl/bits/common/debug.h>
24 
25 
26 __STXXL_BEGIN_NAMESPACE
27 
30 
32 class wincall_file : public wfs_file_base
33 {
34 public:
40  wincall_file(
41  const std::string & filename,
42  int mode,
43  int disk = -1);
44  request_ptr aread(
45  void * buffer,
46  stxxl::int64 pos,
47  size_t bytes,
48  completion_handler on_cmpl);
49  request_ptr awrite(
50  void * buffer,
51  stxxl::int64 pos,
52  size_t bytes,
53  completion_handler on_cmpl);
54 };
55 
57 class wincall_request : public wfs_request_base
58 {
59  friend class wincall_file;
60 
61 protected:
62  wincall_request(
63  wincall_file * f,
64  void * buf,
65  stxxl::int64 off,
66  size_t b,
67  request_type t,
68  completion_handler on_cmpl);
69  void serve();
70 
71 public:
72  const char * io_type();
73 };
74 
76 
77 __STXXL_END_NAMESPACE
78 
79 #endif // #ifdef BOOST_MSVC
80 
81 #endif // !STXXL_WINCALL_FILE_HEADER