Loading...
Searching...
No Matches
restore_tree.hpp
Go to the documentation of this file.
/*********************************************************************/
// dar - disk archive - a backup/restoration program
// Copyright (C) 2002-2025 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 RESTORE_TREE_HPP
#define RESTORE_TREE_HPP
#include "../my_config.h"
extern "C"
{
} // end extern "C"
#include <string>
#include <memory>
#include <map>
#include "path.hpp"
#include "data_tree.hpp"
#include "datetime.hpp"
namespace libdar
{
class restore_tree
{
public:
restore_tree(const data_tree* source, const datetime & ignore_more_recent_than_that);
restore_tree(const restore_tree & ref) = delete;
restore_tree(restore_tree && ref) noexcept = default;
restore_tree & operator = (const restore_tree & ref) = delete;
restore_tree & operator = (restore_tree && ref) noexcept = default;
~restore_tree() = default;
bool restore_from(const std::string & chem, archive_num num) const;
private:
std::set<archive_num> locations;
std::map<std::string, std::unique_ptr<restore_tree> > children;
const restore_tree* lookup(path & chem) const;
bool result_for(archive_num num) const { return locations.find(num) != locations.end(); };
};
} // end of namespace
#endif
data_tree.hpp
base classes used to store entree information in dar_manager databases
datetime.hpp
this file contains the definition of class datetime that stores unix times in a portable way
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
path.hpp
here is the definition of the path class