50 #ifndef GENERIC_FILE_HPP
51 #define GENERIC_FILE_HPP
54 #include "../my_config.h"
88 extern gf_mode generic_file_get_mode(S_I fd);
89 extern const char * generic_file_get_name(
gf_mode mode);
134 U_I
read(
char *a, U_I size);
139 void write(
const char *a, U_I size);
144 void write(
const std::string & arg);
202 bool crc_status()
const {
return active_read == &generic_file::read_crc; };
215 void set_mode(
gf_mode x) { rw = x; };
260 void (
generic_file::* active_write)(
const char *a, U_I size);
262 void enable_crc(
bool mode);
264 U_I read_crc(
char *a, U_I size);
265 void write_crc(
const char *a, U_I size);
270 #define CONTEXT_INIT "init"
271 #define CONTEXT_OP "operation"
272 #define CONTEXT_LAST_SLICE "last_slice"
296 contextual() { status =
""; };
297 virtual ~contextual() {};
299 virtual void set_info_status(
const std::string & s) { status = s; };
300 virtual std::string get_info_status()
const {
return status; };
301 virtual bool is_an_old_start_end_archive()
const = 0;
303 virtual const label & get_data_name()
const = 0;