Disk ARchive  2.5.15
Full featured and portable backup and archiving tool
cat_chardev.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_CHARDEV_HPP
27 #define CAT_CHARDEV_HPP
28 
29 #include "../my_config.h"
30 
31 extern "C"
32 {
33 } // end extern "C"
34 
35 #include "cat_device.hpp"
36 #include "cat_tools.hpp"
37 
38 namespace libdar
39 {
40 
43 
45  class cat_chardev : public cat_device
46  {
47  public:
48  cat_chardev(const infinint & uid, const infinint & gid, U_16 perm,
49  const datetime & last_access,
50  const datetime & last_modif,
51  const datetime & last_change,
52  const std::string & name,
53  U_16 major,
54  U_16 minor,
55  const infinint & fs_device) : cat_device(uid, gid, perm,
56  last_access,
57  last_modif,
58  last_change,
59  name,
60  major, minor, fs_device) {};
62  const smart_pointer<pile_descriptor> & pdesc,
63  const archive_version & reading_ver,
64  saved_status saved,
65  bool small) : cat_device(dialog, pdesc, reading_ver, saved, small) {};
66 
67  bool operator == (const cat_entree & ref) const;
68 
69  // using dump from cat_device class
70  // using method is_more_recent_than() from cat_device class
71  // using method has_changed_since() from cat_device class
72  unsigned char signature() const { return mk_signature('c', get_saved_status()); };
73  cat_entree *clone() const { return new (get_pool()) cat_chardev(*this); };
74  };
75 
77 
78 } // end of namespace
79 
80 #endif
memory_pool * get_pool() const
Definition: on_pool.hpp:144
This is a pure virtual class that is used by libdar when interaction with the user is required...
unsigned char signature() const
inherited class signature
Definition: cat_chardev.hpp:72
parent class for all special devices inodes
cat_entree * clone() const
a way to copy the exact type of an object even if pointed to by a parent class pointer ...
Definition: cat_chardev.hpp:73
bool operator==(const cat_entree &ref) const
returns true if the two object have the same content
the special cat_device root class
Definition: cat_device.hpp:45
the arbitrary large positive integer class
the root class from all other inherite for any entry in the catalogue
Definition: cat_entree.hpp:85
the char device class
Definition: cat_chardev.hpp:45
set of routines used by catalogue related classes
libdar namespace encapsulate all libdar symbols
Definition: archive.hpp:47