Disk ARchive  2.5.3
Full featured and portable backup and archiving tool
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
Public Member Functions | Protected Member Functions | List of all members
libdar::catalogue Class Reference

the catalogue class which gather all objects contained in a give archive More...

#include <catalogue.hpp>

Inherits libdar::mem_ui, and libdar::on_pool.

Inherited by libdar::escape_catalogue.

Public Member Functions

 catalogue (const user_interaction &dialog, const datetime &root_last_modif, const label &data_name)
 catalogue (const user_interaction &dialog, const pile_descriptor &pdesc, const archive_version &reading_ver, compression default_algo, bool lax, const label &lax_layer1_data_name, bool only_detruit=false)
 catalogue (const catalogue &ref)
const catalogueoperator= (const catalogue &ref)
virtual void reset_read () const
virtual void end_read () const
virtual void skip_read_to_parent_dir () const
virtual bool read (const cat_entree *&ref) const
virtual bool read_if_present (std::string *name, const cat_nomme *&ref) const
void remove_read_entry (std::string &name)
const cat_directoryget_current_reading_dir () const
void tail_catalogue_to_current_read ()
void reset_sub_read (const path &sub)
bool sub_read (const cat_entree *&ref)
virtual bool read_second_time_dir () const
void reset_add ()
virtual void pre_add (const cat_entree *ref) const
 catalogue extension routines for escape sequence
virtual void pre_add_ea (const cat_entree *ref) const
virtual void pre_add_crc (const cat_entree *ref) const
virtual void pre_add_dirty () const
virtual void pre_add_ea_crc (const cat_entree *ref) const
virtual void pre_add_waste_mark () const
virtual void pre_add_failed_mark () const
virtual void pre_add_fsa (const cat_entree *ref) const
virtual void pre_add_fsa_crc (const cat_entree *ref) const
virtual escape * get_escape_layer () const
void add (cat_entree *ref)
void re_add_in (const std::string &subdirname)
void re_add_in_replace (const cat_directory &dir)
void add_in_current_read (cat_nomme *ref)
const cat_directoryget_current_add_dir () const
void reset_compare () const
bool compare (const cat_entree *name, const cat_entree *&extracted) const
infinint update_destroyed_with (const catalogue &ref)
void update_absent_with (const catalogue &ref, infinint aborting_next_etoile)
void drop_all_non_detruits ()
 remove/destroy from "this" all objects that are neither directory nor detruit objects
bool is_subset_of (const catalogue &ref) const
void reset_dump () const
 before dumping the catalogue, need to set all hardlinked inode they have not been saved once
void dump (const pile_descriptor &pdesc) const
 write down the whole catalogue to file
void listing (bool isolated, const mask &selection, const mask &subtree, bool filter_unsaved, bool list_ea, std::string marge) const
void tar_listing (bool isolated, const mask &selection, const mask &subtree, bool filter_unsaved, bool list_ea, std::string beginning) const
void xml_listing (bool isolated, const mask &selection, const mask &subtree, bool filter_unsaved, bool list_ea, std::string beginning) const
void slice_listing (bool isolated, const mask &selection, const mask &subtree, const slice_layout &slicing) const
entree_stats get_stats () const
bool is_empty () const
 whether the catalogue is empty or not
const cat_directoryget_contenu () const
const label & get_data_name () const
datetime get_root_dir_last_modif () const
void launch_recursive_has_changed_update () const
 recursive evaluation of directories that have changed (make the cat_directory::get_recurisve_has_changed() method of entry in this catalogue meaningful)
datetime get_root_mtime () const
void reset_all ()
 reset all pointers to the root (a bit better than reset_add() + reset_read() + reset_compare() + reset_sub_read())
void set_to_unsaved_data_and_FSA ()
void change_location (const pile_descriptor &pdesc)
 change location where to find EA, FSA and DATA for all the objects of the catalogue
- Public Member Functions inherited from libdar::on_pool
void * operator new (size_t n_byte)
void * operator new (size_t n_byte, const std::nothrow_t &nothrow_value)
void * operator new[] (size_t n_byte)
void * operator new[] (size_t n_byte, const std::nothrow_t &nothrow_value)
void * operator new (size_t n_byte, memory_pool *p)
void * operator new[] (size_t n_byte, memory_pool *p)
void operator delete (void *ptr, memory_pool *p)
 this operator is called by the compiler if an exception is throw from the constructor of the allocated object
void operator delete[] (void *ptr, memory_pool *p)
 this operator is called by the compiler if an exception is throw from the constructor of the allocated objects
void operator delete (void *ptr)
 this is the usual delete operator, modified to handle allocated objects allocated on a memory pool or not
void operator delete[] (void *ptr)
 this is the usual delete[] operator, modified to handle allocated objects allocated on a memory pool or not

Protected Member Functions

entree_statsaccess_stats ()
void set_data_name (const label &val)
void copy_detruits_from (const catalogue &ref)
const cat_eodget_r_eod_address () const
void swap_stuff (catalogue &ref)
- Protected Member Functions inherited from libdar::mem_ui
 mem_ui (const user_interaction &dialog)
 constructor
 mem_ui (user_interaction *dialog)
 mem_ui (const mem_ui &ref)
 the copy constructor
virtual ~mem_ui () throw (Ebug)
 destructor
const mem_uioperator= (const mem_ui &ref)
 assignement operator
user_interactionget_ui () const
 get access to the user_interaction cloned object
- Protected Member Functions inherited from libdar::on_pool
memory_pool * get_pool () const
template<class T >
void meta_new (T *&ptr, size_t num)
template<class T >
void meta_delete (T *ptr)

Detailed Description

the catalogue class which gather all objects contained in a give archive

Definition at line 62 of file catalogue.hpp.

Member Function Documentation

bool libdar::catalogue::is_subset_of ( const catalogue ref) const

check whether all inode existing in the "this" and ref have the same attributes

Note
stops at the first inode found in both catalogue that do not match for at least one attribute including CRC for DATA, EA or FSA if present, then return false.
void libdar::catalogue::swap_stuff ( catalogue ref)
protected

invert the data tree memory management responsibility pointed to by "contenu" pointers between the current catalogue and the catalogue given in argument.

void libdar::catalogue::update_absent_with ( const catalogue ref,
infinint  aborting_next_etoile 
)

copy from ref missing files in "this" and mark then as "not_saved" (no change since reference)

in case of abortion, completes missing files as if what could not be inspected had not changed since the reference was done aborting_last_etoile is the highest etoile reference withing "this" current object.

infinint libdar::catalogue::update_destroyed_with ( const catalogue ref)

add into "this" detruit object corresponding to object of ref absent in "this"

Note
ref must have the same directory tree "this", else the operation generates an exception

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