Disk ARchive  2.7.14
Full featured and portable backup and archiving tool
terminateur.hpp
Go to the documentation of this file.
1 /*********************************************************************/
2 // dar - disk archive - a backup/restoration program
3 // Copyright (C) 2002-2024 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 
29 
30 #ifndef TERMINATEUR_HPP
31 #define TERMINATEUR_HPP
32 
33 #include "../my_config.h"
34 #include "infinint.hpp"
35 #include "generic_file.hpp"
36 #include "archive_version.hpp"
37 
38 namespace libdar
39 {
42 
44 
47  {
48  public :
49  terminateur() {}; // fields "pos" and "t_start" are objects initialized by their default constructor
50  terminateur(const terminateur & ref) = default;
51  terminateur(terminateur && ref) noexcept = default;
52  terminateur & operator = (const terminateur & ref) = default;
53  terminateur & operator = (terminateur && ref) noexcept = default;
54  ~terminateur() = default;
55 
56  void set_catalogue_start(infinint xpos) { pos = xpos; };
57  void dump(generic_file &f);
58  void read_catalogue(generic_file &f, bool with_elastic, const archive_version & reading_ver, const infinint & where_from = 0);
59  infinint get_catalogue_start() const { return pos; };
60  infinint get_terminateur_start() const { return t_start; };
61 
62  private :
63  infinint pos;
64  infinint t_start;
65  };
66 
68 
69 } // end of namespace
70 
71 #endif
class archive_version that rules which archive format to follow
class archive_version manages the version of the archive format
this is the interface class from which all other data transfer classes inherit
the arbitrary large positive integer class
terminateur class indicates the location of the beginning of the catalogue
Definition: terminateur.hpp:47
class generic_file is defined here as well as class fichier
switch module to limitint (32 ou 64 bits integers) or infinint
libdar namespace encapsulate all libdar symbols
Definition: archive.hpp:47