STXXL  1.4-dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
wincall_file.h
Go to the documentation of this file.
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 <[email protected]>
7  * Copyright (C) 2008 Andreas Beckmann <[email protected]>
8  * Copyright (C) 2009-2010 Johannes Singler <[email protected]>
9  *
10  * Distributed under the Boost Software License, Version 1.0.
11  * (See accompanying file LICENSE_1_0.txt or copy at
12  * http://www.boost.org/LICENSE_1_0.txt)
13  **************************************************************************/
14 
15 #ifndef STXXL_IO_WINCALL_FILE_HEADER
16 #define STXXL_IO_WINCALL_FILE_HEADER
17 
18 #include <stxxl/bits/config.h>
19 
20 #ifndef STXXL_HAVE_WINCALL_FILE
21 #if STXXL_WINDOWS
22  #define STXXL_HAVE_WINCALL_FILE 1
23 #else
24  #define STXXL_HAVE_WINCALL_FILE 0
25 #endif
26 #endif
27 
28 #if STXXL_HAVE_WINCALL_FILE
29 
32 
34 
35 //! \addtogroup fileimpl
36 //! \{
37 
38 //! Implementation of file based on Windows native I/O calls.
40 {
41 public:
42  //! Constructs file object.
43  //! \param filename path of file
44  //! \param mode open mode, see \c stxxl::file::open_modes
45  //! \param queue_id disk queue identifier
46  //! \param allocator_id linked disk_allocator
47  //! \param device_id physical device identifier
49  const std::string& filename,
50  int mode,
51  int queue_id = DEFAULT_QUEUE,
52  int allocator_id = NO_ALLOCATOR,
53  unsigned int device_id = DEFAULT_DEVICE_ID)
54  : file(device_id),
55  wfs_file_base(filename, mode),
56  disk_queued_file(queue_id, allocator_id)
57  { }
58  void serve(void* buffer, offset_type offset, size_type bytes,
60  const char * io_type() const;
61 };
62 
63 //! \}
64 
66 
67 #endif // #if STXXL_HAVE_WINCALL_FILE
68 
69 #endif // !STXXL_IO_WINCALL_FILE_HEADER
wincall_file(const std::string &filename, int mode, int queue_id=DEFAULT_QUEUE, int allocator_id=NO_ALLOCATOR, unsigned int device_id=DEFAULT_DEVICE_ID)
Constructs file object.
Definition: wincall_file.h:48
Defines interface of file.
Definition: file.h:56
#define STXXL_BEGIN_NAMESPACE
Definition: namespace.h:16
Implementation of some file methods based on serving_request.
Implementation of file based on Windows native I/O calls.
Definition: wincall_file.h:39
static const size_t bytes
number of bytes in uint_pair
Definition: uint_types.h:96
Base for Windows file system implementations.
Definition: wfs_file_base.h:33
#define STXXL_END_NAMESPACE
Definition: namespace.h:17