http://stxxl.sourceforge.net
<dementiev@ira.uka.de>
<beckmann@cs.uni-frankfurt.de>
<singler@ira.uka.de>
http://www.boost.org/LICENSE_1_0.txt
#ifndef STXXL_BOOSTFD_FILE_H_
#define STXXL_BOOSTFD_FILE_H_
#ifndef STXXL_HAVE_BOOSTFD_FILE
#ifdef STXXL_BOOST_CONFIG
#define STXXL_HAVE_BOOSTFD_FILE 1
#else
#define STXXL_HAVE_BOOSTFD_FILE 0
#endif
#endif
#if STXXL_HAVE_BOOSTFD_FILE
#include <stxxl/bits/io/disk_queued_file.h>
#include <stxxl/bits/io/request.h>
#include <boost/iostreams/device/file_descriptor.hpp>
__STXXL_BEGIN_NAMESPACE
class boostfd_file : public disk_queued_file
{
typedef boost::iostreams::file_descriptor fd_type;
protected:
mutex fd_mutex;
fd_type file_des;
int mode_;
offset_type _size();
public:
boostfd_file(const std::string & filename, int mode, int queue_id = DEFAULT_QUEUE, int allocator_id = NO_ALLOCATOR);
~boostfd_file();
offset_type size();
void set_size(offset_type newsize);
void lock();
void serve(const request * req) throw (io_error);
const char * io_type() const;
};
__STXXL_END_NAMESPACE
#endif
#endif