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);
210 bool crc_status()
const {
return active_read == &generic_file::read_crc; };
223 void set_mode(
gf_mode x) { rw = x; };
268 void (
generic_file::* active_write)(
const char *a, U_I size);
270 void enable_crc(
bool mode);
272 U_I read_crc(
char *a, U_I size);
273 void write_crc(
const char *a, U_I size);
278 #define CONTEXT_INIT "init"
279 #define CONTEXT_OP "operation"
280 #define CONTEXT_LAST_SLICE "last_slice"
304 contextual() { status =
""; };
305 virtual ~contextual() {};
307 virtual void set_info_status(
const std::string & s) { status = s; };
308 virtual std::string get_info_status()
const {
return status; };
309 virtual bool is_an_old_start_end_archive()
const = 0;
311 virtual const label & get_data_name()
const = 0;