32 #include "../my_config.h"
118 void set_back_current_position();
119 void detruit() noexcept {
if(
own_ref &&
ref !=
nullptr)
delete ref; };
this is the interface class from which all other data transfer classes inherit
virtual bool truncatable(const infinint &pos) const =0
whether the implementation is able to truncate to the given position
void terminate()
destructor-like call, except that it is allowed to throw exceptions
void sync_write()
write any pending data
the arbitrary large positive integer class
makes a segment of a generic_file appear like a real generic_file
virtual void inherited_write(const char *a, U_I size) override
inherited from generic_file
bool check_pos
whether to check and eventually adjust (seek) the position of the underlying layer at each read or wr...
void modify(const infinint &new_offset)
modify the tronc object to zoom on another (size unlimited) portion of the underlying object
virtual U_I inherited_read(char *a, U_I size) override
inherited from generic_file
virtual void inherited_terminate() override
destructor-like call, except that it is allowed to throw exceptions
virtual bool truncatable(const infinint &pos) const override
inherited from generic_file
void modify()
modify the tronc object to become transparent and allow unrestricted access to the underlyuing object
tronc(generic_file *f, const infinint &offset, const infinint &size, bool own_f=false)
constructor
infinint current
inside position of the next read or write
virtual infinint get_position() const override
get the current read/write position
virtual void inherited_read_ahead(const infinint &amount) override
inherited from generic_file
bool own_ref
whether we own ref (and must destroy it when no more needed)
generic_file * ref
global generic file of which to take a piece
infinint start
offset in the global generic file to start at
void modify(const infinint &new_offset, const infinint &new_size)
modify the tronc object to zoom on another (size limited) portion of the underlying object
virtual bool skip(const infinint &pos) override
inherited from generic_file
infinint sz
length of the portion to consider
void check_underlying_position_while_reading_or_writing(bool mode)
virtual void inherited_truncate(const infinint &pos) override
truncate file at the give offset
virtual bool skip_to_eof() override
inherited from generic_file
virtual bool skip_relative(S_I x) override
inherited from generic_file
virtual void inherited_sync_write() override
write down any pending data
bool limited
whether the sz argument is to be considered
virtual bool skippable(skippability direction, const infinint &amount) override
inherited from generic_file
virtual void inherited_flush_read() override
reset internal engine, flush caches in order to read the data at current position
tronc(generic_file *f, const infinint &offset, bool own_f=false)
class generic_file is defined here as well as class fichier
gf_mode
generic_file openning modes
switch module to limitint (32 ou 64 bits integers) or infinint
libdar namespace encapsulate all libdar symbols