Stxxl
1.3.1
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
include
stxxl
bits
io
mem_file.h
1
/***************************************************************************
2
* include/stxxl/bits/io/mem_file.h
3
*
4
* Part of the STXXL. See http://stxxl.sourceforge.net
5
*
6
* Copyright (C) 2008 Andreas Beckmann <beckmann@cs.uni-frankfurt.de>
7
* Copyright (C) 2009 Johannes Singler <singler@ira.uka.de>
8
*
9
* Distributed under the Boost Software License, Version 1.0.
10
* (See accompanying file LICENSE_1_0.txt or copy at
11
* http://www.boost.org/LICENSE_1_0.txt)
12
**************************************************************************/
13
14
#ifndef STXXL_MEM_FILE_HEADER
15
#define STXXL_MEM_FILE_HEADER
16
17
#include <stxxl/bits/io/disk_queued_file.h>
18
#include <stxxl/bits/io/request.h>
19
20
21
__STXXL_BEGIN_NAMESPACE
22
25
27
class
mem_file
:
public
disk_queued_file
28
{
29
char
* ptr;
30
offset_type sz;
31
32
public
:
35
mem_file
(
36
int
queue_id = DEFAULT_QUEUE,
int
allocator_id = NO_ALLOCATOR) :
disk_queued_file
(queue_id, allocator_id), ptr(NULL), sz(0)
37
{ }
38
void
serve(
const
request
* req)
throw
(io_error);
39
~
mem_file
();
40
offset_type
size
();
41
void
set_size
(offset_type newsize);
42
void
lock
();
43
void
discard
(offset_type offset, offset_type
size
);
44
const
char
*
io_type
()
const
;
45
};
46
48
49
__STXXL_END_NAMESPACE
50
51
#endif // !STXXL_MEM_FILE_HEADER
Generated by
1.8.4