| Disk ARchive 2.8.1 Full featured and portable backup and archiving tool

Loading...
Searching...
No Matches
mask_database.hpp
Go to the documentation of this file.
1/*********************************************************************/
2// dar - disk archive - a backup/restoration program
3// Copyright (C) 2002-2025 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
40
41#ifndef MASK_DATABASE_HPP
42#define MASK_DATABASE_HPP
43
44#include "../my_config.h"
45
46extern "C"
47{
48} // end extern "C"
49
50
51#include "mask.hpp"
52#include "data_dir.hpp"
53#include "datetime.hpp"
54#include "restore_tree.hpp"
55
56
58
60
63
64namespace libdar
65{
66
67 class mask_database: public mask
68 {
69 public:
71
79 mask_database(const data_dir* racine,
80 const path & fs_root,
81 const datetime & ignore_older_than_that);
82 mask_database(const mask_database & ref) = default;
83 mask_database(mask_database && ref) noexcept = default;
84 mask_database & operator = (const mask_database & ref) = default;
85 mask_database & operator = (mask_database && ref) noexcept = default;
86 virtual ~mask_database() = default; // base is not
87
89 void set_focus(archive_num focus) const { zoom = focus; };
90
92 virtual bool is_covered(const std::string &expression) const override;
93
95
98 virtual std::string dump(const std::string & prefix = "") const override { return "database mask"; };
99
101 virtual mask_database *clone() const override { return new (std::nothrow) mask_database(*this); };
102
103 private:
104
105 std::string fs_racine;
106 mutable archive_num zoom;
107 std::shared_ptr<restore_tree> tree;
108
109 };
110
111
112} // end of namespace
113
114#endif
data_dir.hpp
classes used to store directory tree information in dar_manager databases
datetime.hpp
this file contains the definition of class datetime that stores unix times in a portable way
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
restore_tree.hpp
restore_tree class stores archive location needed to restore files