Disk ARchive  2.4.17
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 "special_alloc.hpp"
36 #include "mask.hpp"
37 #include "header_version.hpp"
38 
39 namespace libdar
40 {
41 
44 
46 
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  void dump(generic_file & f) const;
55  void add(const std::string & key, const std::string & value) { attr[key] = value; };
56  void reset_read() const;
57  bool read(std::string & key, std::string & value) const;
58  infinint size() const { return attr.size(); };
59  void clear() { attr.clear(); alire = attr.begin(); };
60  bool find(const std::string &key, std::string & found_value) const;
61  bool diff(const ea_attributs & other, const mask & filter) const;
62  infinint space_used() const;
63 
65 
71  ea_attributs operator + (const ea_attributs & arg) const;
72 
73 #ifdef LIBDAR_SPECIAL_ALLOC
74  USE_SPECIAL_ALLOC(ea_attributs);
75 #endif
76 
77  private:
78  std::map<std::string, std::string> attr;
79  std::map<std::string, std::string>::iterator alire;
80  };
81 
83 
84 } // end of namespace
85 
86 #endif
the generic class, parent of all masks
Definition: mask.hpp:61
class generic_file is defined here as well as class fichierthe generic_file interface is widely used ...
re-definition of new and delete class operatorthis is a set of macro that makes the new and delete op...
archive global header structure is defined here
ea_attributs operator+(const ea_attributs &arg) const
addition operator.
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
the arbitrary large positive integer class
class archive_version manages the version of the archive format
the class ea_attributs manages the set of EA that can be associated to an inode
Definition: ea.hpp:47
libdar namespace encapsulate all libdar symbols
Definition: archive.hpp:43