![]() |
Disk ARchive
2.5.2
Full featured and portable backup and archiving tool
|
pipe implementation under the generic_file interface. More...
#include <tuyau.hpp>
Inherits libdar::generic_file, libdar::thread_cancellation, and libdar::mem_ui.
Public Member Functions | |
tuyau (const user_interaction &dialog, int fd) | |
tuyau (const user_interaction &dialog, int fd, gf_mode mode) | |
tuyau (const user_interaction &dialog, const std::string &filename, gf_mode mode) | |
tuyau (const user_interaction &dialog) | |
int | get_read_fd () const |
void | close_read_fd () |
closes the read fd of the anonymous pipe (this is to be used by a writer) | |
void | do_not_close_read_fd () |
ask to not close the read descriptor upon object destruction (the fd survives the object) | |
bool | skippable (skippability direction, const infinint &amount) |
bool | skip (const infinint &pos) |
bool | skip_to_eof () |
skip to the end of file | |
bool | skip_relative (signed int x) |
infinint | get_position () const |
get the current read/write position | |
bool | has_next_to_read () |
Protected Member Functions | |
void | inherited_read_ahead (const infinint &amount) |
virtual U_I | inherited_read (char *a, U_I size) |
implementation of read() operation | |
virtual void | inherited_write (const char *a, U_I size) |
implementation of the write() operation | |
void | inherited_sync_write () |
write down any pending data | |
void | inherited_flush_read () |
void | inherited_terminate () |
destructor-like call, except that it is allowed to throw exceptions |
pipe implementation under the generic_file interface.
void libdar::tuyau::close_read_fd | ( | ) |
closes the read fd of the anonymous pipe (this is to be used by a writer)
void libdar::tuyau::inherited_flush_read | ( | ) | [inline, protected, virtual] |
reset internal engine, flush caches in order to read the data at current position
Implements libdar::generic_file.
virtual U_I libdar::tuyau::inherited_read | ( | char * | a, |
U_I | size | ||
) | [protected, virtual] |
implementation of read() operation
[in,out] | a | where to put the data to read |
[in] | size | says how much data to read |
Implements libdar::generic_file.
void libdar::tuyau::inherited_read_ahead | ( | const infinint & | amount | ) | [inline, protected, virtual] |
tells the object that several calls to read() will follow to probably obtain at least the given amount of data
[in] | amount | is the maximum expected amount of data that is known to be read |
Implements libdar::generic_file.
void libdar::tuyau::inherited_sync_write | ( | ) | [inline, protected, virtual] |
write down any pending data
Implements libdar::generic_file.
void libdar::tuyau::inherited_terminate | ( | ) | [protected, virtual] |
destructor-like call, except that it is allowed to throw exceptions
Implements libdar::generic_file.
virtual void libdar::tuyau::inherited_write | ( | const char * | a, |
U_I | size | ||
) | [protected, virtual] |
implementation of the write() operation
[in] | a | what data to write |
[in] | size | amount of data to write |
Implements libdar::generic_file.
bool libdar::tuyau::skip | ( | const infinint & | pos | ) | [virtual] |
skip at the absolute position
[in] | pos | the offset in byte where next read/write operation must start |
Implements libdar::generic_file.
bool libdar::tuyau::skippable | ( | skippability | direction, |
const infinint & | amount | ||
) | [virtual] |
whether the implementation is able to skip
Implements libdar::generic_file.