
Hi! Benjamin Collins schrieb:
class window_manager { public: struct iterator { operator++() { if(current_ptr+1 >= current_map_end) // remap file to the next block, re-adjust pointers }
operator--() { if(current_ptr-1 <= current_map_begin) // remap file to the previous block, re-adjust pointers }
How is that different from using "buffers"? The regular std::fstream shows just this behavior: when reading it fills a buffer; when the end of the buffer is reached it loads the next part of the file into memory, and so on. The only difference is that writing to a memory location does not implicitly change the file content. But do you need this kind of random access for writing? Frank