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

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

database_options.hpp
Go to the documentation of this file.
1 /*********************************************************************/
2 // dar - disk archive - a backup/restoration program
3 // Copyright (C) 2002-2052 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 //
19 // to contact the author : http://dar.linux.free.fr/email.html
20 /*********************************************************************/
21
25
26 #ifndef DATABASE_OPTIONS_HPP
27 #define DATABASE_OPTIONS_HPP
28
29 #include "../my_config.h"
30
31 #include <string>
32 #include <vector>
33
34 namespace libdar
35 {
36
39
40
42
43 class database_open_options
44 {
45 public:
46 database_open_options() { clear(); };
47
48 void clear() { x_partial = false; x_partial_read_only = false; x_warn_order = true; };
49
50 // setings
51
53
56 void set_partial(bool value) { x_partial = value; };
57
58
60
65 void set_partial_read_only(bool value) { x_partial_read_only = value; if(value) x_partial = value; };
66
67
69
71 void set_warn_order(bool value) { x_warn_order = value; };
72
73 // gettings
74 bool get_partial() const { return x_partial; };
75 bool get_partial_read_only() const { return x_partial_read_only; };
76 bool get_warn_order() const { return x_warn_order; };
77
78 private:
79 bool x_partial;
80 bool x_partial_read_only;
81 bool x_warn_order;
82 };
83
85
86 class database_dump_options
87 {
88 public:
89 database_dump_options() { clear(); };
90
91 void clear() { x_overwrite = false; };
92
93 // settings
94
96
99 void set_overwrite(bool value) { x_overwrite = value; };
100
101 // gettings
102 bool get_overwrite() const { return x_overwrite; };
103
104 private:
105 bool x_overwrite;
106 };
107
109
110 class database_add_options
111 {
112 public:
113 database_add_options() { clear(); };
114
115 void clear() {};
116 };
117
119
120 class database_remove_options
121 {
122 public:
123 database_remove_options() { clear(); };
124
125 void clear() { x_revert_archive_numbering = false; };
126
128 void set_revert_archive_numbering(bool revert) { x_revert_archive_numbering = revert; };
129
130 bool get_revert_archive_numbering() const { return x_revert_archive_numbering; };
131
132 private:
133 bool x_revert_archive_numbering;
134
135 };
136
138
139 class database_change_basename_options
140 {
141 public:
142 database_change_basename_options() { clear(); };
143
144 void clear() { x_revert_archive_numbering = false; };
145
147 void set_revert_archive_numbering(bool revert) { x_revert_archive_numbering = revert; };
148
149 bool get_revert_archive_numbering() const { return x_revert_archive_numbering; };
150
151 private:
152 bool x_revert_archive_numbering;
153
154 };
155
156
158
159 class database_change_path_options
160 {
161 public:
162 database_change_path_options() { clear(); };
163
164 void clear() { x_revert_archive_numbering = false; };
165
167 void set_revert_archive_numbering(bool revert) { x_revert_archive_numbering = revert; };
168
169 bool get_revert_archive_numbering() const { return x_revert_archive_numbering; };
170
171 private:
172 bool x_revert_archive_numbering;
173
174 };
175
177
178 class database_restore_options
179 {
180 public:
181 database_restore_options() { clear(); };
182
183 void clear() { x_early_release = x_info_details = x_ignore_dar_options_in_database = x_even_when_removed = false; x_date = 0; x_extra_options_for_dar.clear(); };
184
185 // settings
186
187
189
193
194 void set_early_release(bool value) { x_early_release = value; };
195
197
199 void set_info_details(bool value) { x_info_details = value; };
200
202
204 void set_extra_options_for_dar(const std::vector<std::string> & value) { x_extra_options_for_dar = value; };
205
207
208 void set_ignore_dar_options_in_database(bool mode) { x_ignore_dar_options_in_database = mode; };
209
211
214 void set_date(const infinint & value) { x_date = value; };
215
217
220 void set_even_when_removed(bool value) { x_even_when_removed = value; };
221
222
223 // gettings
224 bool get_early_release() const { return x_early_release; };
225 bool get_info_details() const { return x_info_details; };
226 const std::vector<std::string> & get_extra_options_for_dar() const { return x_extra_options_for_dar; };
227 const infinint & get_date() const { return x_date; };
228 bool get_ignore_dar_options_in_database() const { return x_ignore_dar_options_in_database; };
229 bool get_even_when_removed() const { return x_even_when_removed; };
230
231 private:
232 bool x_early_release;
233 bool x_info_details;
234 std::vector<std::string> x_extra_options_for_dar;
235 infinint x_date;
236 bool x_ignore_dar_options_in_database;
237 bool x_even_when_removed;
238 };
239
240
242
243 class database_used_options
244 {
245 public:
246 database_used_options() { clear(); };
247
248 void clear() { x_revert_archive_numbering = false; };
249
251 void set_revert_archive_numbering(bool revert) { x_revert_archive_numbering = revert; };
252
253 bool get_revert_archive_numbering() const { return x_revert_archive_numbering; };
254
255 private:
256 bool x_revert_archive_numbering;
257
258 };
259
260
262
263
264 } // end of namespace
265 #endif
libdar::database_used_options
options for file "used" in archive
Definition: database_options.hpp:243
libdar::database_change_path_options
options for changing a given archive's path
Definition: database_options.hpp:159
libdar::database_add_options
options to add an archive to base
Definition: database_options.hpp:110
libdar::database_open_options::set_partial_read_only
void set_partial_read_only(bool value)
partial and read only option
Definition: database_options.hpp:65
libdar::database_restore_options::set_early_release
void set_early_release(bool value)
early_release option
Definition: database_options.hpp:194
libdar::database_restore_options::set_even_when_removed
void set_even_when_removed(bool value)
find data or EA if they have been removed at the requested data
Definition: database_options.hpp:220
libdar::database_open_options::set_partial
void set_partial(bool value)
partial option
Definition: database_options.hpp:56
libdar::database_change_basename_options
options for changing a given archive's basename
Definition: database_options.hpp:139
libdar::database_remove_options
options to remove an archive from the base
Definition: database_options.hpp:120
libdar::database_open_options
options to open a database
Definition: database_options.hpp:43
libdar::database_dump_options
options to write a database to file
Definition: database_options.hpp:86
libdar::database_used_options::set_revert_archive_numbering
void set_revert_archive_numbering(bool revert)
defines whether the archive number is counted from the beginning or from the end of the database ...
Definition: database_options.hpp:251
libdar::database_restore_options::set_date
void set_date(const infinint &value)
date option
Definition: database_options.hpp:214
libdar::database_dump_options::set_overwrite
void set_overwrite(bool value)
overwrite option
Definition: database_options.hpp:99
libdar::database_restore_options
options for restoration from database
Definition: database_options.hpp:178
libdar::database_restore_options::set_ignore_dar_options_in_database
void set_ignore_dar_options_in_database(bool mode)
ignore options to dar embedded in the database
Definition: database_options.hpp:208
libdar::database_restore_options::set_info_details
void set_info_details(bool value)
info_details option
Definition: database_options.hpp:199
libdar::infinint
the arbitrary large positive integer class
Definition: real_infinint.hpp:59
libdar::database_change_path_options::set_revert_archive_numbering
void set_revert_archive_numbering(bool revert)
defines whether the archive number is counted from the beginning or from the end of the database ...
Definition: database_options.hpp:167
libdar::database_restore_options::set_extra_options_for_dar
void set_extra_options_for_dar(const std::vector< std::string > &value)
extra options to dar
Definition: database_options.hpp:204
libdar::database_remove_options::set_revert_archive_numbering
void set_revert_archive_numbering(bool revert)
defines whether the archive number is counted from the beginning or from the end of the database ...
Definition: database_options.hpp:128
libdar::database_change_basename_options::set_revert_archive_numbering
void set_revert_archive_numbering(bool revert)
defines whether the archive number is counted from the beginning or from the end of the database ...
Definition: database_options.hpp:147
libdar
libdar namespace encapsulate all libdar symbols
Definition: archive.hpp:47
libdar::database_open_options::set_warn_order
void set_warn_order(bool value)
warning about file ordering in database
Definition: database_options.hpp:71