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
38 typedef std::pair<offset_type, offset_type>
place;
39 typedef std::map<offset_type, offset_type>
sortseq;
62 char* write_buffer[2];
68 struct FirstFit :
public std::binary_function<place, offset_type, bool>
74 return (entry.second >= size);
83 size_type write_buffer_size,
84 int write_buffers = 2,
85 int queue_id = DEFAULT_QUEUE,
86 int allocator_id = NO_ALLOCATOR);
89 void set_size(offset_type newsize);
91 void serve(
void* buffer, offset_type offset, size_type
bytes,
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
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...
static const size_t bytes
number of bytes in uint_pair
request::offset_type offset_type
the offset of a request, also the size of the file
void discard(StreamAlgorithm &in)
Reads stream content and discards it. Useful where you do not need the processed stream anymore...
#define STXXL_END_NAMESPACE