47 #ifndef GENERIC_FILE_HPP
48 #define GENERIC_FILE_HPP
51 #include "../my_config.h"
85 extern gf_mode generic_file_get_mode(S_I fd);
86 extern const char * generic_file_get_name(
gf_mode mode);
131 U_I
read(
char *a, U_I size);
136 void write(
const char *a, U_I size);
141 void write(
const std::string & arg);
199 bool crc_status()
const {
return active_read == &generic_file::read_crc; };
212 void set_mode(
gf_mode x) { rw = x; };
257 void (
generic_file::* active_write)(
const char *a, U_I size);
259 void enable_crc(
bool mode);
261 U_I read_crc(
char *a, U_I size);
262 void write_crc(
const char *a, U_I size);
267 #define CONTEXT_INIT "init"
268 #define CONTEXT_OP "operation"
269 #define CONTEXT_LAST_SLICE "last_slice"
293 contextual() { status =
""; };
294 virtual ~contextual() {};
296 virtual void set_info_status(
const std::string & s) { status = s; };
297 virtual std::string get_info_status()
const {
return status; };
298 virtual bool is_an_old_start_end_archive()
const = 0;
300 virtual const label & get_data_name()
const = 0;