26 #ifndef CAT_MIRAGE_HPP
27 #define CAT_MIRAGE_HPP
29 #include "../my_config.h"
56 cat_mirage(
const std::shared_ptr<user_interaction> & dialog,
57 const smart_pointer<pile_descriptor> & pdesc,
58 const archive_version & reading_ver,
61 std::map <infinint, cat_etoile *> & corres,
66 cat_mirage(
const std::shared_ptr<user_interaction> & dialog,
67 const smart_pointer<pile_descriptor> & pdesc,
68 const archive_version & reading_ver,
71 std::map <infinint, cat_etoile *> & corres,
75 cat_mirage(
const cat_mirage & ref) : cat_nomme (ref) { dup_on(ref.star_ref); };
76 cat_mirage(cat_mirage && ref) noexcept: cat_nomme(std::move(ref)) {
try { dup_on(ref.star_ref); }
catch(...) {}; };
77 cat_mirage & operator = (
const cat_mirage & ref);
78 cat_mirage & operator = (cat_mirage && ref);
79 ~cat_mirage() { star_ref->drop_ref(
this); };
83 virtual unsigned char signature()
const override {
return 'm'; };
84 virtual std::string
get_description()
const override {
return "hard linked inode"; };
88 cat_inode *get_inode()
const {
if(star_ref ==
nullptr)
throw SRC_BUG;
return star_ref->get_inode(); };
89 infinint get_etiquette()
const {
return star_ref->get_etiquette(); };
90 infinint get_etoile_ref_count()
const {
return star_ref->get_ref_count(); };
91 cat_etoile *get_etoile()
const {
return star_ref; };
93 bool is_inode_counted()
const {
return star_ref->is_counted(); };
94 bool is_inode_wrote()
const {
return star_ref->is_wrote(); };
95 bool is_inode_dumped()
const {
return star_ref->is_dumped(); };
96 void set_inode_counted(
bool val)
const { star_ref->set_counted(val); };
97 void set_inode_wrote(
bool val)
const { star_ref->set_wrote(val); };
98 void set_inode_dumped(
bool val)
const { star_ref->set_dumped(val); };
120 virtual void inherited_dump(
const pile_descriptor & pdesc,
bool small)
const override;
125 void init(
const std::shared_ptr<user_interaction> & dialog,
130 std::map <infinint, cat_etoile *> & corres,
class holding an cat_inode object that get pointed by multiple mirage objects (smart pointers) to rec...
base class of all objects contained in a catalogue and that can be named
class archive_version manages the version of the archive format
the root class from all other inherite for any entry in the catalogue
virtual void change_location(const smart_pointer< pile_descriptor > &pdesc)
the hard link implementation
the root class for all cat_inode
the hard link implementation, cat_mirage is the named entry owned by a directory it points to a commo...
virtual std::string get_description() const override
inherited class designation
mirage_format
format of mirage
@ fmt_hard_link
old dual format
virtual void post_constructor(const pile_descriptor &pdesc) override
let inherited classes build object's data after CRC has been read from file in small read mode
virtual bool operator==(const cat_entree &ref) const override
returns true if the two object are the same
virtual void change_location(const smart_pointer< pile_descriptor > &pdesc) override
virtual void inherited_dump(const pile_descriptor &pdesc, bool small) const override
inherited class may overload this method but shall first call the parent's inherited_dump() in the ov...
virtual cat_entree * clone() const override
a way to copy the exact type of an object even if pointed to by a parent class pointer
bool is_first_mirage() const
whether we are the mirage that triggered this hard link creation
void disable_reduction_to_normal_inode()
always write the inode as a hardlinked inode
virtual unsigned char signature() const override
inherited class signature
the base class for all entry that have a name
compression
the different compression algorithm available
saved_status
data saved status for an entry
@ saved
inode is saved in the archive
libdar namespace encapsulate all libdar symbols
holds the statistics contents of a catalogue