16 #ifndef STXXL_IO_WBTL_FILE_HEADER
17 #define STXXL_IO_WBTL_FILE_HEADER
19 #ifndef STXXL_HAVE_WBTL_FILE
20 #define STXXL_HAVE_WBTL_FILE 1
23 #if STXXL_HAVE_WBTL_FILE
39 typedef std::pair<offset_type, offset_type>
place;
40 typedef std::map<offset_type, offset_type>
sortseq;
63 char* write_buffer[2];
69 struct FirstFit :
public std::binary_function<place, offset_type, bool>
75 return (entry.second >= size);
84 size_type write_buffer_size,
85 int write_buffers = 2,
86 int queue_id = DEFAULT_QUEUE,
87 int allocator_id = NO_ALLOCATOR);
90 void set_size(offset_type newsize);
93 void discard(offset_type offset, offset_type size);
94 const char * io_type()
const;
97 void _add_free_region(offset_type offset, offset_type size);
100 void sread(
void* buffer, offset_type offset, size_type
bytes);
101 void swrite(
void* buffer, offset_type offset, size_type
bytes);
102 offset_type get_next_write_block();
103 void check_corruption(offset_type region_pos, offset_type region_size,
104 sortseq::iterator pred, sortseq::iterator succ);
111 #endif // #if STXXL_HAVE_WBTL_FILE
113 #endif // !STXXL_IO_WBTL_FILE_HEADER
static const int bytes
number of bytes in uint_pair
std::map< offset_type, place > place_map
std::pair< offset_type, offset_type > place
std::map< offset_type, offset_type > sortseq
request::size_type size_type
the size of a request
Defines interface of file.
size_type write_block_size
#define STXXL_BEGIN_NAMESPACE
Implementation of some file methods based on serving_request.
request_ptr backend_request
place_map reverse_mapping
Implementation of file based on buffered writes and block remapping via a translation layer...
void discard(StreamAlgorithm_ &in)
Reads stream content and discards it. Useful where you do not need the processed stream anymore...
request::offset_type offset_type
the offset of a request, also the size of the file
Request with basic properties like file and offset.
#define STXXL_END_NAMESPACE