Disk ARchive: libdar::proto_generic_file Class Reference

| Disk ARchive 2.8.1 Full featured and portable backup and archiving tool

Loading...
Searching...
No Matches
Public Member Functions | List of all members
libdar::proto_generic_file Class Referenceabstract
Private

ancestor class of generic_file More...

`#include <proto_generic_file.hpp>`

Inherited by libdar::generic_file.

## Public Member Functions
| proto_generic_file (const proto_generic_file &ref)=default
| copy constructor
| proto_generic_file (proto_generic_file &&ref) noexcept=default
| move constructor
proto_generic_file & | operator= (const proto_generic_file &ref)=default
| assignment operator
proto_generic_file & | operator= (proto_generic_file &&ref) noexcept=default
| move operator
virtual | ~proto_generic_file () noexcept(false)
| virtual destructor
virtual U_I | read (char *a, U_I size)=0
| read data from the proto_generic_file
virtual void | write (const char *a, U_I size)=0
| write data to the proto_generic_file

## Detailed Description

ancestor class of generic_file

this class exist to avoid cyclic dependency between generic_file and infinint

Definition at line 54 of file proto_generic_file.hpp.

## Constructor & Destructor Documentation

## ◆ proto_generic_file()

libdar::proto_generic_file::proto_generic_file | ( |  | ) |
| inline

Definition at line 57 of file proto_generic_file.hpp.

## ◆ ~proto_generic_file()

virtual libdar::proto_generic_file::~proto_generic_file | ( |  | ) |
| inlinevirtual

virtual destructor

Note
  this let inherited destructor to be called even from a proto_generic_file pointer to an inherited class

Definition at line 74 of file proto_generic_file.hpp.

## Member Function Documentation

## ◆ read()

virtual U_I libdar::proto_generic_file::read | ( | char * | a,
|  | U_I | size )
| pure virtual

read data from the proto_generic_file

Parameters

  [in,out] | a | is where to put the data to read
  [in] | size | is how much data to read

Returns
  the exact number of byte read.

Note
  read as much as requested data, unless EOF is met (only EOF can lead to reading less than requested data)
  EOF is met if read() returns less than size

Implemented in libdar::generic_file.

## ◆ write()

virtual void libdar::proto_generic_file::write | ( | const char * | a,
|  | U_I | size )
| pure virtual

write data to the proto_generic_file

Note
  throws a exception if not all data could be written as expected

Implemented in libdar::generic_file.

The documentation for this class was generated from the following file:

- proto_generic_file.hpp