![]()  | 
  
    Disk ARchive 2.8.1
    
   Full featured and portable backup and archiving tool 
   | 
 
the root class from all other inherite for any entry in the catalogue More...
#include <cat_entree.hpp>
 Inheritance diagram for libdar::cat_entree:
 Collaboration diagram for libdar::cat_entree:Public Member Functions | |
| cat_entree (saved_status val) | |
| setup an object when read from filesystem  More... | |
| cat_entree (const smart_pointer< pile_descriptor > &pdesc, bool small, saved_status val) | |
| setup an object when read from an archive  More... | |
| 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  More... | |
| virtual bool | operator== (const cat_entree &ref) const =0 | 
| returns true if the two object are the same  More... | |
| 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  More... | |
| void | dump (const pile_descriptor &pdesc, bool small) const | 
| write down the object information to a stack  More... | |
| void | specific_dump (const pile_descriptor &pdesc, bool small) const | 
| this call gives an access to inherited_dump  More... | |
| virtual void | post_constructor (const pile_descriptor &pdesc) | 
| let inherited classes build object's data after CRC has been read from file in small read mode  More... | |
| virtual unsigned char | signature () const =0 | 
| inherited class signature  More... | |
| virtual std::string | get_description () const =0 | 
| inherited class designation  More... | |
| virtual cat_entree * | clone () const =0 | 
| a way to copy the exact type of an object even if pointed to by a parent class pointer  More... | |
| virtual void | change_location (const smart_pointer< pile_descriptor > &pdesc) | 
| saved_status | get_saved_status () const | 
| obtain the saved status of the object  More... | |
| void | set_saved_status (saved_status x) | 
| modify the saved_status of the object  More... | |
| 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  More... | |
Static Public Member Functions | |
| 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  More... | |
Protected Member Functions | |
| virtual 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 overloaded method  More... | |
| pile * | get_pile () const | 
| stack used to read object from (nullptr is returned for object created from filesystem)  More... | |
| proto_compressor * | get_compressor_layer () const | 
| compressor generic_file relative methods  More... | |
| escape * | get_escape_layer () const | 
| escape generic_file relative methods  More... | |
| 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 Attributes | |
| saved_status | xsaved | 
| inode data status, this field is stored with signature() in the cat_signature field -> must be managed by cat_entree  More... | |
| smart_pointer< pile_descriptor > | pdesc | 
Static Private Attributes | |
| static const U_I | ENTREE_CRC_SIZE | 
the root class from all other inherite for any entry in the catalogue
Definition at line 59 of file cat_entree.hpp.
      
  | 
  inline | 
setup an object when read from filesystem
Definition at line 84 of file cat_entree.hpp.
| libdar::cat_entree::cat_entree | ( | const smart_pointer< pile_descriptor > & | pdesc, | 
| bool | small, | ||
| saved_status | val | ||
| ) | 
setup an object when read from an archive
| [in] | pdesc | points to an existing stack that will be read from to setup fields of inherited classes, this pointed to pile object must survive the whole life of the cat_entree object | 
| [in] | small | whether a small or a whole read is to be read, (inode has been dump() with small set to true) | 
| [in] | val | saved_status to assign the the new object | 
      
  | 
  inlinevirtualnoexcept | 
destructor
Definition at line 107 of file cat_entree.hpp.
      
  | 
  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
Reimplemented in libdar::cat_directory, and libdar::cat_mirage.
Referenced by libdar::cat_mirage::change_location().
      
  | 
  pure virtual | 
a way to copy the exact type of an object even if pointed to by a parent class pointer
Implemented in libdar::cat_blockdev, libdar::cat_chardev, libdar::cat_detruit, libdar::cat_directory, libdar::cat_eod, libdar::cat_file, libdar::cat_ignored, libdar::cat_ignored_dir, libdar::cat_lien, libdar::cat_mirage, libdar::cat_prise, and libdar::cat_tube.
| void libdar::cat_entree::dump | ( | const pile_descriptor & | pdesc, | 
| bool | small | ||
| ) | const | 
write down the object information to a stack
| [in,out] | pdesc | is the stack where to write the data to | 
| [in] | small | defines whether to do a small or normal dump | 
      
  | 
  inlineprotected | 
compressor generic_file relative methods
Definition at line 193 of file cat_entree.hpp.
References libdar::smart_pointer< T >::is_null().
      
  | 
  pure virtual | 
inherited class designation
Implemented in libdar::cat_blockdev, libdar::cat_chardev, libdar::cat_detruit, libdar::cat_directory, libdar::cat_door, libdar::cat_eod, libdar::cat_file, libdar::cat_ignored, libdar::cat_ignored_dir, libdar::cat_lien, libdar::cat_mirage, libdar::cat_prise, and libdar::cat_tube.
      
  | 
  inlineprotected | 
escape generic_file relative methods
Definition at line 200 of file cat_entree.hpp.
References libdar::smart_pointer< T >::is_null().
      
  | 
  inlineprotected | 
stack used to read object from (nullptr is returned for object created from filesystem)
Definition at line 186 of file cat_entree.hpp.
References libdar::smart_pointer< T >::is_null().
      
  | 
  inline | 
obtain the saved status of the object
Definition at line 164 of file cat_entree.hpp.
References xsaved.
Referenced by libdar::cat_file::can_get_data().
      
  | 
  protectedvirtual | 
inherited class may overload this method but shall first call the parent's inherited_dump() in the overloaded method
Reimplemented in libdar::cat_detruit, libdar::cat_device, libdar::cat_directory, libdar::cat_file, libdar::cat_ignored, libdar::cat_ignored_dir, libdar::cat_inode, libdar::cat_lien, libdar::cat_mirage, and libdar::cat_nomme.
Referenced by specific_dump().
      
  | 
  inline | 
Definition at line 111 of file cat_entree.hpp.
      
  | 
  pure virtual | 
returns true if the two object are the same
Implemented in libdar::cat_blockdev, libdar::cat_chardev, libdar::cat_detruit, libdar::cat_device, libdar::cat_directory, libdar::cat_door, libdar::cat_eod, libdar::cat_file, libdar::cat_ignored, libdar::cat_ignored_dir, libdar::cat_lien, libdar::cat_mirage, libdar::cat_nomme, libdar::cat_prise, and libdar::cat_tube.
      
  | 
  inlinevirtual | 
let inherited classes build object's data after CRC has been read from file in small read mode
| [in] | pdesc | stack to read the data from | 
Reimplemented in libdar::cat_file, and libdar::cat_mirage.
Definition at line 139 of file cat_entree.hpp.
      
  | 
  static | 
read and create an object of inherited class of class cat_entree
| [in] | dialog | for user interaction | 
| [in] | f | where from to read data in order to create the object | 
| [in] | reading_ver | archive version format to use for reading | 
| [in,out] | stats | updated statistical fields | 
| [in,out] | corres | used to setup hard links | 
| [in] | default_algo | default compression algorithm | 
| [in] | lax | whether to use relax mode | 
| [in] | only_detruit | whether to only consider detruit objects (in addition to the directory tree) | 
| [in] | small | whether the dump() to read has been done with the small argument set | 
      
  | 
  inline | 
return true of the two objects would generate the same entry on filsystem
for a and b two cat_entree, if a == b, then a.same_as(b) is true also. But the opposit may be wrong if for example "a" is a hardlink pointing to an inode while b is a normal inode, restoring both could lead to having the same entry in filsystem while a and b are different for libdar: here they are objects of two different classes.
Definition at line 120 of file cat_entree.hpp.
Referenced by libdar::cat_nomme::same_as().
| void libdar::cat_entree::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
| [in] | sly | the slice layout that shall be used for file location in slices | 
| [in] | fetch_ea | whether to fetch EA and fill these values into the generated list_entry | 
| [out] | ent | the list_entry that will be setup by the call | 
      
  | 
  inline | 
modify the saved_status of the object
Definition at line 167 of file cat_entree.hpp.
References xsaved.
      
  | 
  pure virtual | 
inherited class signature
Implemented in libdar::cat_blockdev, libdar::cat_chardev, libdar::cat_detruit, libdar::cat_directory, libdar::cat_door, libdar::cat_eod, libdar::cat_file, libdar::cat_ignored, libdar::cat_ignored_dir, libdar::cat_lien, libdar::cat_mirage, libdar::cat_prise, and libdar::cat_tube.
      
  | 
  inline | 
this call gives an access to inherited_dump
| [in,out] | pdesc | is the stack where to write the data to | 
| [in] | small | defines whether to do a small or normal dump | 
Definition at line 132 of file cat_entree.hpp.
References inherited_dump().
      
  | 
  staticprivate | 
Definition at line 206 of file cat_entree.hpp.
      
  | 
  private | 
Definition at line 209 of file cat_entree.hpp.
      
  | 
  private | 
inode data status, this field is stored with signature() in the cat_signature field -> must be managed by cat_entree
Definition at line 208 of file cat_entree.hpp.
Referenced by get_saved_status(), and set_saved_status().