31 #ifndef GENERIC_TO_GLOBAL_FILE_HPP
32 #define GENERIC_TO_GLOBAL_FILE_HPP
44 class generic_to_global_file :
public fichier_global
53 generic_to_global_file(user_interaction & dialog, generic_file *d,
gf_mode mode): fichier_global(dialog, mode) {
if(d ==
nullptr)
throw SRC_BUG;
if(d->get_mode() !=
gf_read_write && d->get_mode() != mode)
throw SRC_BUG; data = d; };
56 bool skippable(skippability direction,
const infinint & amount) {
return data->skippable(direction, amount); }
57 bool skip(
const infinint & pos) {
return data->skip(pos); };
58 bool skip_to_eof() {
return data->skip_to_eof(); };
59 bool skip_relative(S_I x) {
return data->skip_relative(x); };
60 infinint get_position()
const {
return data->get_position(); };
64 void change_ownership(
const std::string & user,
const std::string & group) {};
65 void change_permission(U_I perm) {};
66 infinint get_size()
const {
return data->get_position(); };
67 void fadvise(advise adv)
const {};
73 void inherited_read_ahead(
const infinint & amount) {};
74 void inherited_sync_write() {};
75 void inherited_flush_read() {};
76 void inherited_terminate() {};
79 U_I fichier_global_inherited_write(
const char *a, U_I size) { data->write(a, size);
return size; };
80 bool fichier_global_inherited_read(
char *a, U_I size, U_I & read, std::string & message) { read = data->read(a, size); message =
"THIS IS A BUG IN GENERIC_TO_GLOBAL_FILE, PLEASE REPORT TO THE MAINTAINER!";
return true; };
contains a class that permits arbitrary large data storage
gf_mode
generic_file openning modes
Memory_file is a generic_file class that only uses virtual memory.
class fichier_global definition. This class is a pure virtual class class fichier_global is an abstra...
generic_file(gf_mode m)
main constructor