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

Loading...
Searching...
No Matches
database_archives.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
26
27
28#ifndef DATABASE_ARCHIVE_HPP
29#define DATABASE_ARCHIVE_HPP
30
31#include "../my_config.h"
32
33#include <deque>
34#include <string>
35
36 namespace libdar
37{
38
41
43
47
48 class database_archives
49 {
50 public:
51 database_archives() {}; // fields "chemin" and "base" are objects and get initialized by the std::string default constructor
52 database_archives(const database_archives & ref) = default;
53 database_archives(database_archives && ref) noexcept = default;
54 database_archives & operator = (const database_archives & ref) = default;
55 database_archives & operator = (database_archives && ref) noexcept = default;
56 ~database_archives() = default;
57
58 void set_path(const std::string & val) { chemin = val; };
59 void set_basename(const std::string & val) { base = val; };
60
62 const std::string & get_path() const { return chemin; };
63
65 const std::string & get_basename() const { return base; };
66
67 private:
68 std::string chemin;
69 std::string base;
70 };
71
73
75 using database_archives_list = std::deque<database_archives>;
76
77
79
80} // end of namespace
81
82#endif
libdar::database_archives
datastructure managing a member of the list of archives used by a database
Definition database_archives.hpp:49
libdar::database_archives::get_basename
const std::string & get_basename() const
this provides the basename of the archive
Definition database_archives.hpp:65
libdar::database_archives::get_path
const std::string & get_path() const
this provides the path where is located this archive
Definition database_archives.hpp:62
libdar::database_archives_list
std::deque< database_archives > database_archives_list
list of archives found in a database
Definition database_archives.hpp:75
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