STXXL  1.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
mmap_file.h
Go to the documentation of this file.
1 /***************************************************************************
2  * include/stxxl/bits/io/mmap_file.h
3  *
4  * Part of the STXXL. See http://stxxl.sourceforge.net
5  *
6  * Copyright (C) 2002 Roman Dementiev <[email protected]>
7  * Copyright (C) 2008 Andreas Beckmann <[email protected]>
8  * Copyright (C) 2009 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_MMAP_FILE_HEADER
16 #define STXXL_IO_MMAP_FILE_HEADER
17 
18 #include <stxxl/bits/config.h>
19 
20 #if STXXL_HAVE_MMAP_FILE
21 
24 
25 
27 
28 //! \addtogroup fileimpl
29 //! \{
30 
31 //! Implementation of memory mapped access file.
33 {
34 public:
35  //! Constructs file object.
36  //! \param filename path of file
37  //! \param mode open mode, see \c stxxl::file::open_modes
38  //! \param queue_id disk queue identifier
39  //! \param allocator_id linked disk_allocator
40  inline mmap_file(const std::string& filename, int mode, int queue_id = DEFAULT_QUEUE, int allocator_id = NO_ALLOCATOR) :
41  ufs_file_base(filename, mode), disk_queued_file(queue_id, allocator_id)
42  { }
43  void serve(const request* req) throw (io_error);
44  const char * io_type() const;
45 };
46 
47 //! \}
48 
50 
51 #endif // #if STXXL_HAVE_MMAP_FILE
52 
53 #endif // !STXXL_IO_MMAP_FILE_HEADER
Implementation of memory mapped access file.
Definition: mmap_file.h:32
#define STXXL_BEGIN_NAMESPACE
Definition: namespace.h:16
Implementation of some file methods based on serving_request.
Base for UNIX file system implementations.
Definition: ufs_file_base.h:34
Request with basic properties like file and offset.
Definition: request.h:39
mmap_file(const std::string &filename, int mode, int queue_id=DEFAULT_QUEUE, int allocator_id=NO_ALLOCATOR)
Constructs file object.
Definition: mmap_file.h:40
#define STXXL_END_NAMESPACE
Definition: namespace.h:17