Disk ARchive  2.5.13
Full featured and portable backup and archiving tool
ea.hpp
Go to the documentation of this file.
1 /*********************************************************************/
2 // dar - disk archive - a backup/restoration program
3 // Copyright (C) 2002-2052 Denis Corbin
4 //
5 // This program is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU General Public License
7 // as published by the Free Software Foundation; either version 2
8 // of the License, or (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 //
19 // to contact the author : http://dar.linux.free.fr/email.html
20 /*********************************************************************/
21 
25 
26 
27 #ifndef EA_HPP
28 #define EA_HPP
29 
30 #include "../my_config.h"
31 #include <map>
32 #include <string>
33 #include "infinint.hpp"
34 #include "generic_file.hpp"
35 #include "mask.hpp"
36 #include "header_version.hpp"
37 #include "on_pool.hpp"
38 
39 namespace libdar
40 {
41 
44 
46 
47  class ea_attributs : public on_pool
48  {
49  public:
50  ea_attributs() { alire = attr.begin(); };
51  ea_attributs(generic_file & f, const archive_version & edit);
52  ea_attributs(const ea_attributs & ref);
53 
54  bool operator == (const ea_attributs & ref) const { return attr == ref.attr; };
55 
56  void dump(generic_file & f) const;
57  void add(const std::string & key, const std::string & value) { attr[key] = value; };
58  void reset_read() const;
59  bool read(std::string & key, std::string & value) const;
60  infinint size() const { return attr.size(); };
61  void clear() { attr.clear(); alire = attr.begin(); };
62  bool find(const std::string &key, std::string & found_value) const;
63  bool diff(const ea_attributs & other, const mask & filter) const;
64  infinint space_used() const;
65 
67 
73  ea_attributs operator + (const ea_attributs & arg) const;
74 
75  private:
76  std::map<std::string, std::string> attr;
77  std::map<std::string, std::string>::iterator alire;
78  };
79 
81 
82 } // end of namespace
83 
84 #endif
the generic class, parent of all masks
Definition: mask.hpp:62
class generic_file is defined here as well as class fichierthe generic_file interface is widely used ...
ea_attributs operator+(const ea_attributs &arg) const
addition operator.
archive global header/trailer structure is defined here
switch module to limitint (32 ou 64 bits integers) or infinint
here lies a collection of mask classes
this is the interface class from which all other data transfer classes inherit
this is the base class of object that can be allocated on a memory pool
the arbitrary large positive integer class
libdar namespace encapsulate all libdar symbols
Definition: archive.hpp:47