Loading...
Searching...
No Matches
ea.hpp
Go to the documentation of this file.
/*********************************************************************/
// dar - disk archive - a backup/restoration program
// Copyright (C) 2002-2026 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 EA_HPP
#define EA_HPP
#include "../my_config.h"
#include <map>
#include <string>
#include "infinint.hpp"
#include "mask.hpp"
namespace libdar
{
class archive_version;
class generic_file;
class ea_attributs
{
public:
ea_attributs() { alire = attr.begin(); };
ea_attributs(generic_file & f, const archive_version & edit);
ea_attributs(const ea_attributs & ref);
ea_attributs(ea_attributs && ref) noexcept;
ea_attributs & operator = (const ea_attributs & ref);
ea_attributs & operator = (ea_attributs && ref) noexcept;
~ea_attributs() = default;
bool operator == (const ea_attributs & ref) const { return attr == ref.attr; };
void dump(generic_file & f) const;
void add(const std::string & key, const std::string & value) { attr[key] = value; };
void reset_read() const;
bool read(std::string & key, std::string & value) const;
infinint size() const { return attr.size(); };
void clear() { attr.clear(); alire = attr.begin(); };
bool find(const std::string &key, std::string & found_value) const;
bool diff(const ea_attributs & other, const mask & filter) const;
infinint space_used() const;
ea_attributs operator + (const ea_attributs & arg) const;
private:
std::map<std::string, std::string> attr;
mutable std::map<std::string, std::string>::const_iterator alire;
};
} // end of namespace
#endif
libdar::archive_version
class archive_version manages the version of the archive format
Definition archive_version.hpp:47
libdar::ea_attributs::operator+
ea_attributs operator+(const ea_attributs &arg) const
addition operator.
libdar::generic_file
this is the interface class from which all other data transfer classes inherit
Definition generic_file.hpp:77
libdar::infinint
the arbitrary large positive integer class
Definition real_infinint.hpp:62
libdar::mask
the generic class, parent of all masks
Definition mask.hpp:62
infinint.hpp
switch module to limitint (32 ou 64 bits integers) or infinint
mask.hpp
here lies a collection of mask classes
my_config.h
include macro defined by the configure script and some specific additional ones
libdar
libdar namespace encapsulate all libdar symbols
Definition archive.hpp:47