Loading...
Searching...
No Matches
proto_generic_file.hpp
Go to the documentation of this file.
/*********************************************************************/
// dar - disk archive - a backup/restoration program
// Copyright (C) 2002-2024 Denis Corbin
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
//
// to contact the author, see the AUTHOR file
/*********************************************************************/
#ifndef PROTO_GENERIC_FILE_HPP
#define PROTO_GENERIC_FILE_HPP
#include "../my_config.h"
extern "C"
{
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
} // end extern "C"
#include "integers.hpp"
#include "erreurs.hpp"
#include <string>
namespace libdar
{
class proto_generic_file
{
public :
proto_generic_file() {};
proto_generic_file(const proto_generic_file &ref) = default;
proto_generic_file(proto_generic_file && ref) noexcept = default;
proto_generic_file & operator = (const proto_generic_file & ref) = default;
proto_generic_file & operator = (proto_generic_file && ref) noexcept = default;
virtual ~proto_generic_file() noexcept(false) {};
virtual U_I read(char *a, U_I size) = 0;
virtual void write(const char *a, U_I size) = 0;
};
} // end of namespace
#endif
libdar::proto_generic_file
ancestor class of generic_file
Definition proto_generic_file.hpp:55
libdar::proto_generic_file::~proto_generic_file
virtual ~proto_generic_file() noexcept(false)
virtual destructor
Definition proto_generic_file.hpp:74
libdar::proto_generic_file::operator=
proto_generic_file & operator=(const proto_generic_file &ref)=default
assignment operator
libdar::proto_generic_file::write
virtual void write(const char *a, U_I size)=0
write data to the proto_generic_file
libdar::proto_generic_file::proto_generic_file
proto_generic_file(proto_generic_file &&ref) noexcept=default
move constructor
libdar::proto_generic_file::proto_generic_file
proto_generic_file(const proto_generic_file &ref)=default
copy constructor
libdar::proto_generic_file::read
virtual U_I read(char *a, U_I size)=0
read data from the proto_generic_file
erreurs.hpp
contains all the excetion class thrown by libdar
integers.hpp
are defined here basic integer types that tend to be portable
libdar
libdar namespace encapsulate all libdar symbols
Definition archive.hpp:47