17 #ifndef STXXL_BOOSTFD_FILE_H_
18 #define STXXL_BOOSTFD_FILE_H_
20 #ifndef STXXL_HAVE_BOOSTFD_FILE
21 #ifdef STXXL_BOOST_CONFIG // if boost is available
22 #define STXXL_HAVE_BOOSTFD_FILE 1
24 #define STXXL_HAVE_BOOSTFD_FILE 0
28 #if STXXL_HAVE_BOOSTFD_FILE
30 #include <stxxl/bits/io/disk_queued_file.h>
31 #include <stxxl/bits/io/request.h>
33 #include <boost/iostreams/device/file_descriptor.hpp>
36 __STXXL_BEGIN_NAMESPACE
44 typedef boost::iostreams::file_descriptor fd_type;
53 boostfd_file(
const std::string & filename,
int mode,
int queue_id = DEFAULT_QUEUE,
int allocator_id = NO_ALLOCATOR);
58 void serve(
const request * req)
throw (io_error);
66 #endif // #if STXXL_HAVE_BOOSTFD_FILE
68 #endif // !STXXL_BOOSTFD_FILE_H_
virtual void set_size(offset_type newsize)=0
Changes the size of the file.
virtual const char * io_type() const
Identifies the type of I/O implementation.
Definition: file.h:214
Request with basic properties like file and offset.
Definition: request.h:39
virtual offset_type size()=0
Returns size of the file.
Implementation of some file methods based on serving_request.
Definition: disk_queued_file.h:26
virtual void lock()=0
Locks file for reading and writing (acquires a lock in the file system)