STXXL  1.4-dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
syscall_file.h
Go to the documentation of this file.
1 /***************************************************************************
2  * include/stxxl/bits/io/syscall_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  * Copyright (C) 2014 Timo Bingmann <[email protected]>
10  *
11  * Distributed under the Boost Software License, Version 1.0.
12  * (See accompanying file LICENSE_1_0.txt or copy at
13  * http://www.boost.org/LICENSE_1_0.txt)
14  **************************************************************************/
15 
16 #ifndef STXXL_IO_SYSCALL_FILE_HEADER
17 #define STXXL_IO_SYSCALL_FILE_HEADER
18 
21 
23 
24 //! \addtogroup fileimpl
25 //! \{
26 
27 //! Implementation of file based on UNIX syscalls.
29 {
30 public:
31  //! Constructs file object.
32  //! \param filename path of file
33  //! \param mode open mode, see \c stxxl::file::open_modes
34  //! \param queue_id disk queue identifier
35  //! \param allocator_id linked disk_allocator
36  //! \param device_id physical device identifier
38  const std::string& filename,
39  int mode,
40  int queue_id = DEFAULT_QUEUE,
41  int allocator_id = NO_ALLOCATOR,
42  unsigned int device_id = DEFAULT_DEVICE_ID)
43  : file(device_id),
44  ufs_file_base(filename, mode),
45  disk_queued_file(queue_id, allocator_id)
46  { }
47  void serve(void* buffer, offset_type offset, size_type bytes,
49  const char * io_type() const;
50 };
51 
52 //! \}
53 
55 
56 #endif // !STXXL_IO_SYSCALL_FILE_HEADER
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.
static const size_t bytes
number of bytes in uint_pair
Definition: uint_types.h:96
Base for UNIX file system implementations.
Definition: ufs_file_base.h:33
Implementation of file based on UNIX syscalls.
Definition: syscall_file.h:28
syscall_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: syscall_file.h:37
#define STXXL_END_NAMESPACE
Definition: namespace.h:17