Disk ARchive  2.5.2
Full featured and portable backup and archiving tool
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines
Public Member Functions | Static Public Member Functions | Protected Member Functions
libdar::cat_entree Class Reference

the root class from all other inherite for any entry in the catalogue More...

#include <cat_entree.hpp>

Inherits libdar::on_pool.

Inherited by libdar::cat_eod, and libdar::cat_nomme.

List of all members.

Public Member Functions

 cat_entree (const pile_descriptor &pdesc, bool small)
 cat_entree ()
 setup an object when read from filesystem
virtual ~cat_entree () throw (Ebug)
 destructor
virtual bool operator== (const cat_entree &ref) const
 returns true if the two object have the same content
bool operator!= (const cat_entree &ref) const
void dump (const pile_descriptor &pdesc, bool small) const
void specific_dump (const pile_descriptor &pdesc, bool small) const
virtual void post_constructor (const pile_descriptor &pdesc)
virtual unsigned char signature () const =0
 inherited class signature
virtual cat_entreeclone () const =0
 a way to copy the exact type of an object even if pointed to by a parent class pointer
virtual void change_location (const pile_descriptor &pdesc)

Static Public Member Functions

static cat_entreeread (user_interaction &dialog, memory_pool *pool, const 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)

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
pile * get_pile () const
 stack used to read object from (nullptr is returned for object created from filesystem)
compressorget_compressor_layer () const
escape * get_escape_layer () const
generic_fileget_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)

Detailed Description

the root class from all other inherite for any entry in the catalogue

Definition at line 84 of file cat_entree.hpp.


Constructor & Destructor Documentation

libdar::cat_entree::cat_entree ( const pile_descriptor &  pdesc,
bool  small 
)

setup an object when read from an archive

Parameters:
[in]pdescpoints 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]smallwhether a small or a whole read is to be read, (inode has been dump() with small set to true)

Member Function Documentation

virtual void libdar::cat_entree::change_location ( const pile_descriptor &  pdesc) [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 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 in libdar::cat_directory, and libdar::cat_mirage.

Referenced by libdar::cat_mirage::change_location().

void libdar::cat_entree::dump ( const pile_descriptor &  pdesc,
bool  small 
) const

write down the object information to a stack

Parameters:
[in,out]pdescis the stack where to write the data to
[in]smalldefines whether to do a small or normal dump
compressor* libdar::cat_entree::get_compressor_layer ( ) const [inline, protected]

compressor generic_file relative methods

Note:
CAUTION: the pointer to object is member of the get_pile() stack and may be managed by another thread all precaution like get_pile()->flush_read_above(get_compressor_layer() shall be take to avoid concurrent access to the compressor object by the current thread and the thread managing this object

Definition at line 179 of file cat_entree.hpp.

escape* libdar::cat_entree::get_escape_layer ( ) const [inline, protected]

escape generic_file relative methods

Note:
CAUTION: the pointer to object is member of the get_pile() stack and may be managed by another thread all precaution like get_pile()->flush_read_above(get_escape_layer() shall be take to avoid concurrent access to the compressor object by the current thread and the thread managing this object

Definition at line 186 of file cat_entree.hpp.

virtual void libdar::cat_entree::post_constructor ( const pile_descriptor &  pdesc) [inline, virtual]

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

Parameters:
[in]pdescstack 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 in libdar::cat_file, and libdar::cat_mirage.

Definition at line 148 of file cat_entree.hpp.

static cat_entree* libdar::cat_entree::read ( user_interaction dialog,
memory_pool *  pool,
const 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 
) [static]

read and create an object of inherited class of class cat_entree

Parameters:
[in]dialogfor user interaction
[in]poolfor memory allocation (nullptr if special_alloc not activated)
[in]fwhere from to read data in order to create the object
[in]reading_verarchive version format to use for reading
[in,out]statsupdated statistical fields
[in,out]corresused to setup hard links
[in]default_algodefault compression algorithm
[in]laxwhether to use relax mode
[in]only_detruitwhether to only consider detruit objects (in addition to the directory tree)
[in]smallwhether the dump() to read has been done with the small argument set
void libdar::cat_entree::specific_dump ( const pile_descriptor &  pdesc,
bool  small 
) const [inline]

this call gives an access to inherited_dump

Parameters:
[in,out]pdescis the stack where to write the data to
[in]smalldefines whether to do a small or normal dump

Definition at line 141 of file cat_entree.hpp.

References inherited_dump().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines