Loading...
Searching...
No Matches
mask_database.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 MASK_DATABASE_HPP
#define MASK_DATABASE_HPP
#include "../my_config.h"
extern "C"
{
} // end extern "C"
#include "mask.hpp"
#include "data_dir.hpp"
#include "datetime.hpp"
#include "restore_tree.hpp"
namespace libdar
{
class mask_database: public mask
{
public:
mask_database(const data_dir* racine,
const path & fs_root,
const datetime & ignore_older_than_that);
mask_database(const mask_database & ref) = default;
mask_database(mask_database && ref) noexcept = default;
mask_database & operator = (const mask_database & ref) = default;
mask_database & operator = (mask_database && ref) noexcept = default;
virtual ~mask_database() = default; // base is not
void compose_with(const mask & ref);
std::set<archive_num> get_locations() const;
void set_focus(archive_num focus) const { zoom = focus; };
virtual bool is_covered(const std::string & expression) const;
virtual bool is_covered(const path & expression) const override;
virtual std::string dump(const std::string & prefix = "") const override { return "database mask"; };
virtual mask_database *clone() const override { return new (std::nothrow) mask_database(*this); };
private:
path fs_racine;
mutable archive_num zoom;
std::shared_ptr<restore_tree> tree;
std::shared_ptr<mask> composition;
};
} // end of namespace
#endif
libdar::mask
the generic class, parent of all masks
Definition mask.hpp:62
libdar::mask::clone
virtual mask * clone() const =0
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