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

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

cat_detruit.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 CAT_DETRUIT_HPP
27 #define CAT_DETRUIT_HPP
28
29 #include "../my_config.h"
30
31 extern "C"
32 {
33 } // end extern "C"
34
35 #include "cat_nomme.hpp"
36 #include "datetime.hpp"
37 #include "archive_version.hpp"
38
39 namespace libdar
40 {
41
44
45
47 class cat_detruit : public cat_nomme
48 {
49 public :
50 cat_detruit(const std::string & name, unsigned char firm, const datetime & date) : cat_nomme(name) , del_date(date) { signe = firm; };
51 cat_detruit(const smart_pointer<pile_descriptor> & pdesc, const archive_version & reading_ver, bool small);
52 cat_detruit(const cat_nomme & ref) : cat_nomme(ref.get_name()), del_date(0) { signe = ref.signature(); };
53
54 bool operator == (const cat_entree & ref) const;
55
56 unsigned char get_signature() const { return signe; };
57 void set_signature(unsigned char x) { signe = x; };
58
59 const datetime & get_date() const { return del_date; };
60 void set_date(const datetime & ref) { del_date = ref; };
61
63 unsigned char signature() const { return 'x'; };
65 cat_entree *clone() const { return new (get_pool()) cat_detruit(*this); };
66
67 protected:
68 void inherited_dump(const pile_descriptor & pdesc, bool small) const;
69
70 private :
71 unsigned char signe;
72 datetime del_date;
73 };
74
76
77 } // end of namespace
78
79 #endif
cat_nomme.hpp
base class of all objects contained in a catalogue and that can be named
libdar::cat_detruit
the deleted file entry
Definition: cat_detruit.hpp:47
libdar::on_pool::get_pool
memory_pool * get_pool() const
Definition: on_pool.hpp:144
libdar::cat_entree::signature
virtual unsigned char signature() const =0
inherited class signature
libdar::cat_detruit::clone
cat_entree * clone() const
inherited from cat_entree
Definition: cat_detruit.hpp:65
libdar::cat_detruit::signature
unsigned char signature() const
inherited from cat_entree
Definition: cat_detruit.hpp:63
libdar::cat_nomme
the base class for all entry that have a name
Definition: cat_nomme.hpp:44
libdar::smart_pointer< pile_descriptor >
datetime.hpp
this file contains the definition of class datetime that stores unix times in a portable way ...
libdar::cat_detruit::operator==
bool operator==(const cat_entree &ref) const
returns true if the two object have the same content
archive_version.hpp
class archive_version that rules which archive format to follow
libdar::archive_version
class archive_version manages the version of the archive format
Definition: archive_version.hpp:44
libdar::cat_entree
the root class from all other inherite for any entry in the catalogue
Definition: cat_entree.hpp:85
libdar::cat_detruit::inherited_dump
void inherited_dump(const pile_descriptor &pdesc, bool small) const
inherited class may overload this method but shall first call the parent's inherited_dump() in the ov...
libdar
libdar namespace encapsulate all libdar symbols
Definition: archive.hpp:47