Stxxl  1.4.0
include/stxxl/bits/io/syscall_file.h
Go to the documentation of this file.
00001 /***************************************************************************
00002  *  include/stxxl/bits/io/syscall_file.h
00003  *
00004  *  Part of the STXXL. See http://stxxl.sourceforge.net
00005  *
00006  *  Copyright (C) 2002 Roman Dementiev <dementiev@mpi-sb.mpg.de>
00007  *  Copyright (C) 2008 Andreas Beckmann <beckmann@cs.uni-frankfurt.de>
00008  *  Copyright (C) 2009 Johannes Singler <singler@ira.uka.de>
00009  *
00010  *  Distributed under the Boost Software License, Version 1.0.
00011  *  (See accompanying file LICENSE_1_0.txt or copy at
00012  *  http://www.boost.org/LICENSE_1_0.txt)
00013  **************************************************************************/
00014 
00015 #ifndef STXXL_SYSCALL_FILE_HEADER
00016 #define STXXL_SYSCALL_FILE_HEADER
00017 
00018 #include <stxxl/bits/io/ufs_file_base.h>
00019 #include <stxxl/bits/io/disk_queued_file.h>
00020 
00021 
00022 __STXXL_BEGIN_NAMESPACE
00023 
00024 //! \addtogroup fileimpl
00025 //! \{
00026 
00027 //! \brief Implementation of file based on UNIX syscalls
00028 class syscall_file : public ufs_file_base, public disk_queued_file
00029 {
00030 public:
00031     //! \brief constructs file object
00032     //! \param filename path of file
00033     //! \attention filename must be resided at memory disk partition
00034     //! \param mode open mode, see \c stxxl::file::open_modes
00035     //! \param disk disk(file) identifier
00036     syscall_file(
00037         const std::string & filename,
00038         int mode,
00039         int queue_id = DEFAULT_QUEUE,
00040         int allocator_id = NO_ALLOCATOR) : ufs_file_base(filename, mode), disk_queued_file(queue_id, allocator_id)
00041     { }
00042     void serve(const request * req) throw (io_error);
00043     const char * io_type() const;
00044 };
00045 
00046 //! \}
00047 
00048 __STXXL_END_NAMESPACE
00049 
00050 #endif // !STXXL_SYSCALL_FILE_HEADER
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines