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

Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
libdar::cat_mirage Class Reference
Private

the hard link implementation, cat_mirage is the named entry owned by a directory it points to a common "cat_etoile class" More...

`#include <cat_mirage.hpp>`

Inherits libdar::cat_nomme.

## Public Types
enum | mirage_format { fmt_mirage , fmt_hard_link , fmt_file_etiquette }
| format of mirage More...

## Public Member Functions
| cat_mirage (const std::string &name, cat_etoile *ref)
| cat_mirage (const std::shared_ptr< user_interaction > &dialog, const smart_pointer< pile_descriptor > &pdesc, const archive_version &reading_ver, saved_status saved, entree_stats &stats, std::map< infinint, cat_etoile * > &corres, compression default_algo, mirage_format fmt, bool lax, bool small)
| cat_mirage (const std::shared_ptr< user_interaction > &dialog, const smart_pointer< pile_descriptor > &pdesc, const archive_version &reading_ver, saved_status saved, entree_stats &stats, std::map< infinint, cat_etoile * > &corres, compression default_algo, bool lax, bool small)
| cat_mirage (const cat_mirage &ref)
| cat_mirage (cat_mirage &&ref) noexcept
cat_mirage & | operator= (const cat_mirage &ref)
cat_mirage & | operator= (cat_mirage &&ref)
virtual bool | operator== (const cat_entree &ref) const override
| returns true if the two object are the same
virtual unsigned char | signature () const override
| inherited class signature
virtual std::string | get_description () const override
| inherited class designation
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
cat_inode * | get_inode () const
infinint | get_etiquette () const
infinint | get_etoile_ref_count () const
cat_etoile * | get_etoile () const
bool | is_inode_counted () const
bool | is_inode_wrote () const
bool | is_inode_dumped () const
void | set_inode_counted (bool val) const
void | set_inode_wrote (bool val) const
void | set_inode_dumped (bool val) const
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
bool | is_first_mirage () const
| whether we are the mirage that triggered this hard link creation
virtual void | change_location (const smart_pointer< pile_descriptor > &pdesc) override
void | disable_reduction_to_normal_inode ()
| always write the inode as a hardlinked inode
Public Member Functions inherited from libdar::cat_nomme
| cat_nomme (const std::string &name, saved_status arg)
| cat_nomme (const smart_pointer< pile_descriptor > &pdesc, bool small, saved_status val)
| cat_nomme (const cat_nomme &ref)=default
| cat_nomme (cat_nomme &&ref) noexcept=default
cat_nomme & | operator= (const cat_nomme &ref)=default
cat_nomme & | operator= (cat_nomme &&ref)=default
virtual bool | operator< (const cat_nomme &ref) const
const std::string & | get_name () const
void | change_name (const std::string &x)
bool | same_as (const cat_nomme &ref) const
Public Member Functions inherited from libdar::cat_entree
| cat_entree (saved_status val)
| setup an object when read from filesystem
| cat_entree (const smart_pointer< pile_descriptor > &pdesc, bool small, saved_status val)
| setup an object when read from an archive
| cat_entree (const cat_entree &ref)=default
| cat_entree (cat_entree &&ref) noexcept=default
cat_entree & | operator= (const cat_entree &ref)=default
cat_entree & | operator= (cat_entree &&ref)=default
virtual | ~cat_entree () noexcept(false)
| destructor
bool | operator!= (const cat_entree &ref) const
bool | same_as (const cat_entree &ref) const
| return true of the two objects would generate the same entry on filsystem
void | dump (const pile_descriptor &pdesc, bool small) const
| write down the object information to a stack
void | specific_dump (const pile_descriptor &pdesc, bool small) const
| this call gives an access to inherited_dump
saved_status | get_saved_status () const
| obtain the saved status of the object
void | set_saved_status (saved_status x)
| modify the saved_status of the object
void | set_list_entry (const slice_layout *sly, bool fetch_ea, list_entry &ent) const
| setup a list_entry object relative to the current cat_entree object

## Protected Member Functions
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 overloaded method
Protected Member Functions inherited from libdar::cat_entree
pile * | get_pile () const
| stack used to read object from (nullptr is returned for object created from filesystem)
proto_compressor * | get_compressor_layer () const
| compressor generic_file relative methods
escape * | get_escape_layer () const
| escape generic_file relative methods
generic_file * | get_read_cat_layer (bool small) const
| return the adhoc layer in the stack to read from the catalogue objects (except the EA, FSA or Data part)

## Private Member Functions
void | init (const std::shared_ptr< user_interaction > &dialog, const smart_pointer< pile_descriptor > &pdesc, const archive_version &reading_ver, saved_status saved, entree_stats &stats, std::map< infinint, cat_etoile * > &corres, compression default_algo, mirage_format fmt, bool lax, bool small)
void | dup_on (cat_etoile *ref)

## Private Attributes
cat_etoile * | star_ref

## Additional Inherited Members
Static Public Member Functions inherited from libdar::cat_entree
static cat_entree * | read (const std::shared_ptr< user_interaction > &dialog, const smart_pointer< pile_descriptor > &f, const archive_version &reading_ver, entree_stats &stats, std::map< infinint, cat_etoile * > &corres, compression default_algo, bool lax, bool only_detruit, bool small)
| read and create an object of inherited class of class cat_entree

## Detailed Description

the hard link implementation, cat_mirage is the named entry owned by a directory it points to a common "cat_etoile class"

well, a mirage is this fake apparition of water in a desert... I guess you get the picture now... :-)

Definition at line 47 of file cat_mirage.hpp.

## Member Enumeration Documentation

## ◆ mirage_format

enum libdar::cat_mirage::mirage_format

format of mirage

Enumerator
fmt_mirage | new format
fmt_hard_link | old dual format

Definition at line 51 of file cat_mirage.hpp.

## Constructor & Destructor Documentation

## ◆ cat_mirage() [1/3]

libdar::cat_mirage::cat_mirage | ( | const std::string & | name,
|  | cat_etoile * | ref )
| inline

Definition at line 55 of file cat_mirage.hpp.

## ◆ cat_mirage() [2/3]

libdar::cat_mirage::cat_mirage | ( | const cat_mirage & | ref | ) |
| inline

Definition at line 75 of file cat_mirage.hpp.

## ◆ cat_mirage() [3/3]

libdar::cat_mirage::cat_mirage | ( | cat_mirage && | ref | ) |
| inline noexcept

Definition at line 76 of file cat_mirage.hpp.

## ◆ ~cat_mirage()

libdar::cat_mirage::~cat_mirage | ( |  | ) |
| inline

Definition at line 79 of file cat_mirage.hpp.

## Member Function Documentation

## ◆ change_location()

virtual void libdar::cat_mirage::change_location | ( | const smart_pointer< pile_descriptor > & | pdesc | ) |
| inline override virtual

for archive merging, will let the object drop EA, FSA and Data to an alternate stack than the one it has been read from

Note
  this is used when cloning an object from a catalogue to provide a merged archive. Such cloned object must point the stack of the archive under construction, so we use this call for that need,
  this is also used when opening a catalogue if an isolated catalogue in place of the internal catalogue of an archive
  this method is virtual in order for cat_directory to overwrite it and propagate the change to all entries of the directory tree as well for mirage to propagate the change to the hard linked inode

Reimplemented from libdar::cat_entree.

Definition at line 106 of file cat_mirage.hpp.

References libdar::cat_entree::change_location().

## ◆ clone()

virtual cat_entree * libdar::cat_mirage::clone | ( |  | ) | const
| inline override virtual

a way to copy the exact type of an object even if pointed to by a parent class pointer

Implements libdar::cat_entree.

Definition at line 86 of file cat_mirage.hpp.

## ◆ disable_reduction_to_normal_inode()

void libdar::cat_mirage::disable_reduction_to_normal_inode | ( |  | ) |
| inline

always write the inode as a hardlinked inode

Note
  when calling dump() on a mirage by default if the inode pointed by the mirage has is referred only once, it is saved as a normal inode that's to say a non hard linked inode. In some circumstances, the total number of hard link on that inode is not yet known at the time the inode is written (repair operation), we cannot assume the hard linked inode is a normal inode as new hard links pointing on that same inode may have not been read yet.

Definition at line 117 of file cat_mirage.hpp.

## ◆ get_description()

virtual std::string libdar::cat_mirage::get_description | ( |  | ) | const
| inline override virtual

inherited class designation

Implements libdar::cat_entree.

Definition at line 84 of file cat_mirage.hpp.

## ◆ get_etiquette()

infinint libdar::cat_mirage::get_etiquette | ( |  | ) | const
| inline

Definition at line 89 of file cat_mirage.hpp.

## ◆ get_etoile()

cat_etoile * libdar::cat_mirage::get_etoile | ( |  | ) | const
| inline

Definition at line 91 of file cat_mirage.hpp.

## ◆ get_etoile_ref_count()

infinint libdar::cat_mirage::get_etoile_ref_count | ( |  | ) | const
| inline

Definition at line 90 of file cat_mirage.hpp.

## ◆ get_inode()

cat_inode * libdar::cat_mirage::get_inode | ( |  | ) | const
| inline

Definition at line 88 of file cat_mirage.hpp.

## ◆ inherited_dump()

virtual void libdar::cat_mirage::inherited_dump | ( | const pile_descriptor & | pdesc,
|  | bool | small ) const
| override protected virtual

inherited class may overload this method but shall first call the parent's inherited_dump() in the overloaded method

Reimplemented from libdar::cat_nomme.

## ◆ is_first_mirage()

bool libdar::cat_mirage::is_first_mirage | ( |  | ) | const
| inline

whether we are the mirage that triggered this hard link creation

Definition at line 103 of file cat_mirage.hpp.

## ◆ is_inode_counted()

bool libdar::cat_mirage::is_inode_counted | ( |  | ) | const
| inline

Definition at line 93 of file cat_mirage.hpp.

## ◆ is_inode_dumped()

bool libdar::cat_mirage::is_inode_dumped | ( |  | ) | const
| inline

Definition at line 95 of file cat_mirage.hpp.

## ◆ is_inode_wrote()

bool libdar::cat_mirage::is_inode_wrote | ( |  | ) | const
| inline

Definition at line 94 of file cat_mirage.hpp.

## ◆ operator==()

virtual bool libdar::cat_mirage::operator== | ( | const cat_entree & | ref | ) | const
| override virtual

returns true if the two object are the same

Reimplemented from libdar::cat_nomme.

## ◆ post_constructor()

virtual void libdar::cat_mirage::post_constructor | ( | const pile_descriptor & | pdesc | ) |
| override virtual

let inherited classes build object's data after CRC has been read from file in small read mode

Parameters

  [in] | pdesc | stack to read the data from

Note
  used from cat_entree::read to complete small read
  this method is called by cat_entree::read and mirage::post_constructor only when contructing an object with small set to true

Reimplemented from libdar::cat_entree.

## ◆ set_inode_counted()

void libdar::cat_mirage::set_inode_counted | ( | bool | val | ) | const
| inline

Definition at line 96 of file cat_mirage.hpp.

## ◆ set_inode_dumped()

void libdar::cat_mirage::set_inode_dumped | ( | bool | val | ) | const
| inline

Definition at line 98 of file cat_mirage.hpp.

## ◆ set_inode_wrote()

void libdar::cat_mirage::set_inode_wrote | ( | bool | val | ) | const
| inline

Definition at line 97 of file cat_mirage.hpp.

## ◆ signature()

virtual unsigned char libdar::cat_mirage::signature | ( |  | ) | const
| inline override virtual

inherited class signature

Implements libdar::cat_entree.

Definition at line 83 of file cat_mirage.hpp.

## Member Data Documentation

## ◆ star_ref

cat_etoile* libdar::cat_mirage::star_ref
| private

Definition at line 123 of file cat_mirage.hpp.

The documentation for this class was generated from the following file:

- cat_mirage.hpp