Disk ARchive  2.5.2
Full featured and portable backup and archiving tool
cat_lien.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_LIEN_HPP
27 #define CAT_LIEN_HPP
28 
29 #include "../my_config.h"
30 
31 extern "C"
32 {
33 } // end extern "C"
34 
35 #include "cat_inode.hpp"
36 
37 namespace libdar
38 {
39 
42 
44  class cat_lien : public cat_inode
45  {
46  public :
47  cat_lien(const infinint & uid, const infinint & gid, U_16 perm,
48  const datetime & last_access,
49  const datetime & last_modif,
50  const datetime & last_change,
51  const std::string & name,
52  const std::string & target,
53  const infinint & fs_device);
54  cat_lien(user_interaction & dialog,
55  const pile_descriptor & pdesc,
56  const archive_version & reading_ver,
57  saved_status saved,
58  bool small);
59 
60  bool operator == (const cat_entree & ref) const;
61 
62  const std::string & get_target() const;
63  void set_target(std::string x);
64 
65  // using the method is_more_recent_than() from cat_inode
66  // using method has_changed_since() from cat_inode class
67 
69  unsigned char signature() const { return mk_signature('l', get_saved_status()); };
70 
72  cat_entree *clone() const { return new (get_pool()) cat_lien(*this); };
73 
74  protected :
75  void sub_compare(const cat_inode & other, bool isolated_mode) const;
76  void inherited_dump(const pile_descriptor & pdesc, bool small) const;
77 
78  private :
79  std::string points_to;
80  };
81 
83 
84 } // end of namespace
85 
86 #endif
unsigned char signature() const
inherited from cat_entree
Definition: cat_lien.hpp:69
the symbolic link inode class
Definition: cat_lien.hpp:44
This is a pure virtual class that is used by libdar when interaction with the user is required...
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...
cat_entree * clone() const
inherited from cat_entree
Definition: cat_lien.hpp:72
bool operator==(const cat_entree &ref) const
returns true if the two object have the same content
memory_pool * get_pool() const
Definition: on_pool.hpp:144
the root class for all cat_inode
Definition: cat_inode.hpp:54
base object for all inode types, managed EA and FSA, dates, permissions, ownership, ...
the arbitrary large positive integer class
class archive_version manages the version of the archive format
the root class from all other inherite for any entry in the catalogue
Definition: cat_entree.hpp:84
libdar namespace encapsulate all libdar symbols
Definition: archive.hpp:47