this is the interface class from which all other data transfer classes inherit More...
#include <generic_file.hpp>
Inherited by hide_file, libdar::cache, libdar::compressor, libdar::contextual, libdar::fichier, libdar::null_file, libdar::scrambler, libdar::string_file, libdar::trivial_sar, libdar::tronc, libdar::tronconneuse, and libdar::tuyau.
Public Member Functions | |
generic_file (user_interaction &dialog, gf_mode m) | |
main constructor | |
generic_file (const generic_file &ref) | |
copy constructor | |
generic_file & | operator= (const generic_file &ref) |
assignment operator | |
virtual | ~generic_file () |
destructor | |
gf_mode | get_mode () const |
retreive the openning mode for this object | |
S_I | read (char *a, size_t size) |
read data from the generic_file | |
S_I | write (const char *a, size_t size) |
write data to the generic_file | |
S_I | write (const std::string &arg) |
write a string to the generic_file | |
S_I | read_back (char &a) |
skip back one char, read on char and skip back one char | |
S_I | read_forward (char &a) |
read one char | |
virtual bool | skip (const infinint &pos)=0 |
skip at the absolute position | |
virtual bool | skip_to_eof ()=0 |
skip to the end of file | |
virtual bool | skip_relative (S_I x)=0 |
skip relatively to the current position | |
virtual infinint | get_position ()=0 |
get the current read/write position | |
void | copy_to (generic_file &ref) |
copy all data from current position to the object in argument | |
void | copy_to (generic_file &ref, crc &value) |
copy all data from the current position to the object in argument and computes a CRC value of the transmitted data | |
U_32 | copy_to (generic_file &ref, U_32 size) |
small copy (up to 4GB) with CRC calculation | |
infinint | copy_to (generic_file &ref, infinint size) |
copy the given amount to the object in argument | |
bool | diff (generic_file &f) |
compares the contents with the object in argument | |
void | reset_crc () |
reset CRC on read or writen data | |
void | get_crc (crc &val) |
get CRC of the transfered date since last reset | |
user_interaction & | get_gf_ui () const |
get the cached user_interaction for inherited classes in particular (this stay a public method, not a protected one) | |
Protected Member Functions | |
void | set_mode (gf_mode x) |
virtual S_I | inherited_read (char *a, size_t size)=0 |
virtual S_I | inherited_write (const char *a, size_t size)=0 |
this is the interface class from which all other data transfer classes inherit
it provides mainly read and write operations, skip operations and few other functions.
Definition at line 108 of file generic_file.hpp.