Disk ARchive  2.5.2
Full featured and portable backup and archiving tool
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 
00025 
00026 #ifndef DATABASE_OPTIONS_HPP
00027 #define DATABASE_OPTIONS_HPP
00028 
00029 #include "../my_config.h"
00030 
00031 #include <string>
00032 #include <vector>
00033 
00034 namespace libdar
00035 {
00036 
00039 
00040 
00042 
00043     class database_open_options
00044     {
00045     public:
00046     database_open_options() { clear(); };
00047 
00048     void clear() { x_partial = false; x_partial_read_only = false; x_warn_order = true; };
00049 
00050         // setings
00051 
00053 
00056     void set_partial(bool value) { x_partial = value; };
00057 
00058 
00060 
00065     void set_partial_read_only(bool value) { x_partial_read_only = value; if(value) x_partial = value; };
00066 
00067 
00069 
00071     void set_warn_order(bool value) { x_warn_order = value; };
00072 
00073         // gettings
00074     bool get_partial() const { return x_partial; };
00075     bool get_partial_read_only() const { return x_partial_read_only; };
00076     bool get_warn_order() const { return x_warn_order; };
00077 
00078     private:
00079     bool x_partial;
00080     bool x_partial_read_only;
00081     bool x_warn_order;
00082     };
00083 
00085 
00086     class database_dump_options
00087     {
00088     public:
00089     database_dump_options() { clear(); };
00090 
00091     void clear() { x_overwrite = false; };
00092 
00093         // settings
00094 
00096 
00099     void set_overwrite(bool value) { x_overwrite = value; };
00100 
00101         // gettings
00102     bool get_overwrite() const { return x_overwrite; };
00103 
00104     private:
00105     bool x_overwrite;
00106     };
00107 
00109 
00110     class database_add_options
00111     {
00112     public:
00113     database_add_options() { clear(); };
00114 
00115     void clear() {};
00116     };
00117 
00119 
00120     class database_remove_options
00121     {
00122     public:
00123     database_remove_options() { clear(); };
00124 
00125     void clear() { x_revert_archive_numbering = false; };
00126 
00128     void set_revert_archive_numbering(bool revert) { x_revert_archive_numbering = revert; };
00129 
00130     bool get_revert_archive_numbering() const { return x_revert_archive_numbering; };
00131 
00132     private:
00133     bool x_revert_archive_numbering;
00134 
00135     };
00136 
00138 
00139     class database_change_basename_options
00140     {
00141     public:
00142     database_change_basename_options() { clear(); };
00143 
00144     void clear() { x_revert_archive_numbering = false; };
00145 
00147     void set_revert_archive_numbering(bool revert) { x_revert_archive_numbering = revert; };
00148 
00149     bool get_revert_archive_numbering() const { return x_revert_archive_numbering; };
00150 
00151     private:
00152     bool x_revert_archive_numbering;
00153 
00154     };
00155 
00156 
00158 
00159     class database_change_path_options
00160     {
00161     public:
00162     database_change_path_options() { clear(); };
00163 
00164     void clear() { x_revert_archive_numbering = false; };
00165 
00167     void set_revert_archive_numbering(bool revert) { x_revert_archive_numbering = revert; };
00168 
00169     bool get_revert_archive_numbering() const { return x_revert_archive_numbering; };
00170 
00171     private:
00172     bool x_revert_archive_numbering;
00173 
00174     };
00175 
00177 
00178     class database_restore_options
00179     {
00180     public:
00181     database_restore_options() { clear(); };
00182 
00183     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(); };
00184 
00185         // settings
00186 
00187 
00189 
00193 
00194     void set_early_release(bool value) { x_early_release = value; };
00195 
00197 
00199     void set_info_details(bool value) { x_info_details = value; };
00200 
00202 
00204     void set_extra_options_for_dar(const std::vector<std::string> & value) { x_extra_options_for_dar = value; };
00205 
00207 
00208     void set_ignore_dar_options_in_database(bool mode) { x_ignore_dar_options_in_database = mode; };
00209 
00211 
00214     void set_date(const infinint & value) { x_date = value; };
00215 
00217 
00220     void set_even_when_removed(bool value) { x_even_when_removed = value; };
00221 
00222 
00223         // gettings
00224     bool get_early_release() const { return x_early_release; };
00225     bool get_info_details() const { return x_info_details; };
00226     const std::vector<std::string> & get_extra_options_for_dar() const { return x_extra_options_for_dar; };
00227     const infinint & get_date() const { return x_date; };
00228     bool get_ignore_dar_options_in_database() const { return x_ignore_dar_options_in_database; };
00229     bool get_even_when_removed() const { return x_even_when_removed; };
00230 
00231     private:
00232     bool x_early_release;
00233     bool x_info_details;
00234     std::vector<std::string> x_extra_options_for_dar;
00235     infinint x_date;
00236     bool x_ignore_dar_options_in_database;
00237     bool x_even_when_removed;
00238     };
00239 
00240 
00242 
00243     class database_used_options
00244     {
00245     public:
00246     database_used_options() { clear(); };
00247 
00248     void clear() { x_revert_archive_numbering = false; };
00249 
00251     void set_revert_archive_numbering(bool revert) { x_revert_archive_numbering = revert; };
00252 
00253     bool get_revert_archive_numbering() const { return x_revert_archive_numbering; };
00254 
00255     private:
00256     bool x_revert_archive_numbering;
00257 
00258     };
00259 
00260 
00262 
00263 
00264 } // end of namespace
00265 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines