Disk ARchive  2.4.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
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 // $Id: database_options.hpp,v 1.6.2.2 2011/12/13 21:24:54 edrusb Rel $
22 //
23 /*********************************************************************/
24 
28 
29 #ifndef DATABASE_OPTIONS_HPP
30 #define DATABASE_OPTIONS_HPP
31 
32 #include "../my_config.h"
33 
34 #include <string>
35 #include <vector>
36 
37 namespace libdar
38 {
39 
42 
43 
45 
47  {
48  public:
49  database_open_options() { clear(); };
50 
51  void clear() { x_partial = false; x_warn_order = true; };
52 
53  // setings
54 
56 
59  void set_partial(bool value) { x_partial = value; };
60 
62 
64  void set_warn_order(bool value) { x_warn_order = value; };
65 
66  // gettings
67  bool get_partial() const { return x_partial; };
68  bool get_warn_order() const { return x_warn_order; };
69 
70  private:
71  bool x_partial;
72  bool x_warn_order;
73  };
74 
76 
78  {
79  public:
80  database_dump_options() { clear(); };
81 
82  void clear() { x_overwrite = false; };
83 
84  // settings
85 
87 
90  void set_overwrite(bool value) { x_overwrite = value; };
91 
92  // gettings
93  bool get_overwrite() const { return x_overwrite; };
94 
95  private:
96  bool x_overwrite;
97  };
98 
100 
102  {
103  public:
104  database_add_options() { clear(); };
105 
106  void clear() {};
107  };
108 
110 
112  {
113  public:
114  database_remove_options() { clear(); };
115 
116  void clear() { x_revert_archive_numbering = false; };
117 
119  void set_revert_archive_numbering(bool revert) { x_revert_archive_numbering = revert; };
120 
121  bool get_revert_archive_numbering() const { return x_revert_archive_numbering; };
122 
123  private:
124  bool x_revert_archive_numbering;
125 
126  };
127 
129 
131  {
132  public:
133  database_change_basename_options() { clear(); };
134 
135  void clear() { x_revert_archive_numbering = false; };
136 
138  void set_revert_archive_numbering(bool revert) { x_revert_archive_numbering = revert; };
139 
140  bool get_revert_archive_numbering() const { return x_revert_archive_numbering; };
141 
142  private:
143  bool x_revert_archive_numbering;
144 
145  };
146 
147 
149 
151  {
152  public:
153  database_change_path_options() { clear(); };
154 
155  void clear() { x_revert_archive_numbering = false; };
156 
158  void set_revert_archive_numbering(bool revert) { x_revert_archive_numbering = revert; };
159 
160  bool get_revert_archive_numbering() const { return x_revert_archive_numbering; };
161 
162  private:
163  bool x_revert_archive_numbering;
164 
165  };
166 
168 
170  {
171  public:
172  database_restore_options() { clear(); };
173 
174  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(); };
175 
176  // settings
177 
178 
180 
184 
185  void set_early_release(bool value) { x_early_release = value; };
186 
188 
190  void set_info_details(bool value) { x_info_details = value; };
191 
193 
195  void set_extra_options_for_dar(const std::vector<std::string> & value) { x_extra_options_for_dar = value; };
196 
198 
199  void set_ignore_dar_options_in_database(bool mode) { x_ignore_dar_options_in_database = mode; };
200 
202 
205  void set_date(const infinint & value) { x_date = value; };
206 
208 
211  void set_even_when_removed(bool value) { x_even_when_removed = value; };
212 
213 
214  // gettings
215  bool get_early_release() const { return x_early_release; };
216  bool get_info_details() const { return x_info_details; };
217  const std::vector<std::string> & get_extra_options_for_dar() const { return x_extra_options_for_dar; };
218  const infinint & get_date() const { return x_date; };
219  bool get_ignore_dar_options_in_database() const { return x_ignore_dar_options_in_database; };
220  bool get_even_when_removed() const { return x_even_when_removed; };
221 
222  private:
223  bool x_early_release;
224  bool x_info_details;
225  std::vector<std::string> x_extra_options_for_dar;
226  infinint x_date;
227  bool x_ignore_dar_options_in_database;
228  bool x_even_when_removed;
229  };
230 
231 
233 
235  {
236  public:
237  database_used_options() { clear(); };
238 
239  void clear() { x_revert_archive_numbering = false; };
240 
242  void set_revert_archive_numbering(bool revert) { x_revert_archive_numbering = revert; };
243 
244  bool get_revert_archive_numbering() const { return x_revert_archive_numbering; };
245 
246  private:
247  bool x_revert_archive_numbering;
248 
249  };
250 
251 
253 
254 
255 } // end of namespace
256 #endif