• Main Page
  • Related Pages
  • Modules
  • Namespaces
  • Classes
  • Files
  • Examples
  • File List

mem_file.h

00001 /***************************************************************************
00002  *  include/stxxl/bits/io/mem_file.h
00003  *
00004  *  Part of the STXXL. See http://stxxl.sourceforge.net
00005  *
00006  *  Copyright (C) 2008 Andreas Beckmann <[email protected]>
00007  *
00008  *  Distributed under the Boost Software License, Version 1.0.
00009  *  (See accompanying file LICENSE_1_0.txt or copy at
00010  *  http://www.boost.org/LICENSE_1_0.txt)
00011  **************************************************************************/
00012 
00013 #ifndef STXXL_MEM_FILE_HEADER
00014 #define STXXL_MEM_FILE_HEADER
00015 
00016 #include <stxxl/bits/io/disk_queued_file.h>
00017 #include <stxxl/bits/io/request.h>
00018 
00019 
00020 __STXXL_BEGIN_NAMESPACE
00021 
00024 
00026 class mem_file : public disk_queued_file
00027 {
00028     char * ptr;
00029     offset_type sz;
00030 
00031 public:
00034     mem_file(
00035         int queue_id = DEFAULT_QUEUE, int allocator_id = NO_ALLOCATOR) : disk_queued_file(queue_id, allocator_id), ptr(NULL), sz(0)
00036     { }
00037     void serve(const request * req) throw (io_error);
00038     ~mem_file();
00039     offset_type size();
00040     void set_size(offset_type newsize);
00041     void lock();
00042     void discard(offset_type offset, offset_type size);
00043     const char * io_type() const;
00044 };
00045 
00047 
00048 __STXXL_END_NAMESPACE
00049 
00050 #endif // !STXXL_MEM_FILE_HEADER

Generated by  doxygen 1.7.1