Disk ARchive  2.4.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines
database_options.hpp
Go to the documentation of this file.
00001 /*********************************************************************/
00002 // dar - disk archive - a backup/restoration program
00003 // Copyright (C) 2002-2052 Denis Corbin
00004 //
00005 // This program is free software; you can redistribute it and/or
00006 // modify it under the terms of the GNU General Public License
00007 // as published by the Free Software Foundation; either version 2
00008 // of the License, or (at your option) any later version.
00009 //
00010 // This program is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 // GNU General Public License for more details.
00014 //
00015 // You should have received a copy of the GNU General Public License
00016 // along with this program; if not, write to the Free Software
00017 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00018 //
00019 // to contact the author : http://dar.linux.free.fr/email.html
00020 /*********************************************************************/
00021 // $Id$
00022 //
00023 /*********************************************************************/
00024 
00028 
00029 #ifndef DATABASE_OPTIONS_HPP
00030 #define DATABASE_OPTIONS_HPP
00031 
00032 #include "../my_config.h"
00033 
00034 #include <string>
00035 #include <vector>
00036 
00037 namespace libdar
00038 {
00039 
00042 
00043 
00045 
00046     class database_open_options
00047     {
00048     public:
00049         database_open_options() { clear(); };
00050 
00051         void clear() { x_partial = false; x_warn_order = true; };
00052 
00053             // setings
00054 
00056 
00059         void set_partial(bool value) { x_partial = value; };
00060 
00062 
00064         void set_warn_order(bool value) { x_warn_order = value; };
00065 
00066             // gettings
00067         bool get_partial() const { return x_partial; };
00068         bool get_warn_order() const { return x_warn_order; };
00069 
00070     private:
00071         bool x_partial;
00072         bool x_warn_order;
00073     };
00074 
00076 
00077     class database_dump_options
00078     {
00079     public:
00080         database_dump_options() { clear(); };
00081 
00082         void clear() { x_overwrite = false; };
00083 
00084             // settings
00085 
00087 
00090         void set_overwrite(bool value) { x_overwrite = value; };
00091 
00092             // gettings
00093         bool get_overwrite() const { return x_overwrite; };
00094 
00095     private:
00096         bool x_overwrite;
00097     };
00098 
00100 
00101     class database_add_options
00102     {
00103     public:
00104         database_add_options() { clear(); };
00105 
00106         void clear() {};
00107     };
00108 
00110 
00111     class database_remove_options
00112     {
00113     public:
00114         database_remove_options() { clear(); };
00115 
00116         void clear() { x_revert_archive_numbering = false; };
00117 
00119         void set_revert_archive_numbering(bool revert) { x_revert_archive_numbering = revert; };
00120 
00121         bool get_revert_archive_numbering() const { return x_revert_archive_numbering; };
00122 
00123     private:
00124         bool x_revert_archive_numbering;
00125 
00126     };
00127 
00129 
00130     class database_change_basename_options
00131     {
00132     public:
00133         database_change_basename_options() { clear(); };
00134 
00135         void clear() { x_revert_archive_numbering = false; };
00136 
00138         void set_revert_archive_numbering(bool revert) { x_revert_archive_numbering = revert; };
00139 
00140         bool get_revert_archive_numbering() const { return x_revert_archive_numbering; };
00141 
00142     private:
00143         bool x_revert_archive_numbering;
00144 
00145     };
00146 
00147 
00149 
00150     class database_change_path_options
00151     {
00152     public:
00153         database_change_path_options() { clear(); };
00154 
00155         void clear() { x_revert_archive_numbering = false; };
00156 
00158         void set_revert_archive_numbering(bool revert) { x_revert_archive_numbering = revert; };
00159 
00160         bool get_revert_archive_numbering() const { return x_revert_archive_numbering; };
00161 
00162     private:
00163         bool x_revert_archive_numbering;
00164 
00165     };
00166 
00168 
00169     class database_restore_options
00170     {
00171     public:
00172         database_restore_options() { clear(); };
00173 
00174         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(); };
00175 
00176             // settings
00177 
00178 
00180 
00184 
00185         void set_early_release(bool value) { x_early_release = value; };
00186 
00188 
00190         void set_info_details(bool value) { x_info_details = value; };
00191 
00193 
00195         void set_extra_options_for_dar(const std::vector<std::string> & value) { x_extra_options_for_dar = value; };
00196 
00198 
00199         void set_ignore_dar_options_in_database(bool mode) { x_ignore_dar_options_in_database = mode; };
00200 
00202 
00205         void set_date(const infinint & value) { x_date = value; };
00206 
00208 
00211         void set_even_when_removed(bool value) { x_even_when_removed = value; };
00212 
00213 
00214             // gettings
00215         bool get_early_release() const { return x_early_release; };
00216         bool get_info_details() const { return x_info_details; };
00217         const std::vector<std::string> & get_extra_options_for_dar() const { return x_extra_options_for_dar; };
00218         const infinint & get_date() const { return x_date; };
00219         bool get_ignore_dar_options_in_database() const { return x_ignore_dar_options_in_database; };
00220         bool get_even_when_removed() const { return x_even_when_removed; };
00221 
00222     private:
00223         bool x_early_release;
00224         bool x_info_details;
00225         std::vector<std::string> x_extra_options_for_dar;
00226         infinint x_date;
00227         bool x_ignore_dar_options_in_database;
00228         bool x_even_when_removed;
00229     };
00230 
00231 
00233 
00234     class database_used_options
00235     {
00236     public:
00237         database_used_options() { clear(); };
00238 
00239         void clear() { x_revert_archive_numbering = false; };
00240 
00242         void set_revert_archive_numbering(bool revert) { x_revert_archive_numbering = revert; };
00243 
00244         bool get_revert_archive_numbering() const { return x_revert_archive_numbering; };
00245 
00246     private:
00247         bool x_revert_archive_numbering;
00248 
00249     };
00250 
00251 
00253 
00254 
00255 } // end of namespace
00256 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines