Disk ARchive  2.7.15
Full featured and portable backup and archiving tool
candidates.hpp
Go to the documentation of this file.
1 /*********************************************************************/
2 // dar - disk archive - a backup/restoration program
3 // Copyright (C) 2002-2024 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 //
19 // to contact the author, see the AUTHOR file
20 /*********************************************************************/
21 
25 
26 
27 #ifndef CANDIDATES_HPP
28 #define CANDIDATES_HPP
29 
30 #include "../my_config.h"
31 
32 #include "database_aux.hpp"
33 #include "archive_num.hpp"
34 
35 #include <deque>
36 #include <set>
37 
38 namespace libdar
39 {
40 
43 
45 
46  class candidates
47  {
48  public:
49  candidates(bool even_when_removed): ewr(even_when_removed) { clear(); };
50 
51  void clear() { num.clear(); status.clear(); };
52  void add(archive_num val, db_etat st);
53  db_lookup get_status() const;
54  void set_the_set(std::set<archive_num> & archive) const;
55 
56  private:
57  bool ewr;
58  std::deque<archive_num> num;
59  std::deque<db_etat> status;
60  };
61 
63 
64 } // end of namespace
65 
66 #endif
class storing the position of an archive inside a database
class archive_num stores the position of an archive inside a dar_manager database
Definition: archive_num.hpp:47
the archive class realizes the most general operations on archives
Definition: archive.hpp:65
helper class for data_tree
Definition: candidates.hpp:47
bool ewr
even when removed, ignore removed status
Definition: candidates.hpp:57
set of datastructures used to interact with a database object
db_lookup
the available status of a lookup
db_etat
the status for a founded entry
libdar namespace encapsulate all libdar symbols
Definition: archive.hpp:47