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

the data_tree class stores presence of a given file in a set of archives More...

#include <data_tree.hpp>

Inherits libdar::on_pool.

Inherited by libdar::data_dir.

Public Types

enum  lookup { found_present, found_removed, not_found, not_restorable }
enum  etat { et_saved, et_present, et_removed, et_absent }

Public Member Functions

 data_tree (const std::string &name)
 data_tree (generic_file &f, unsigned char db_version)
virtual void dump (generic_file &f) const
std::string get_name () const
void set_name (const std::string &name)
lookup get_data (archive_num &archive, const datetime &date, bool even_when_removed) const
 return the archive where to find the data that was defined just before or at the given date
lookup get_EA (archive_num &archive, const datetime &date, bool even_when_removed) const
 if EA has been saved alone later, returns in which version for the state of the file at the given date.
bool read_data (archive_num num, datetime &val, etat &present) const
 return the date of file's last modification date within the give archive and whether the file has been saved or deleted
bool read_EA (archive_num num, datetime &val, etat &present) const
 return the date of last inode change and whether the EA has been saved or deleted
void set_data (const archive_num &archive, const datetime &date, etat present)
void set_EA (const archive_num &archive, const datetime &date, etat present)
virtual bool check_order (user_interaction &dialog, const path &current_path, bool &initial_warn) const
 check date order between archives withing the database ; throw Erange if problem found with date order
virtual void finalize (const archive_num &archive, const datetime &deleted_date, const archive_num &ignore_archive_greater_or_equal)
 add deleted entry if no object of the current archive exist and the entry of the previous archive is already present.
virtual bool remove_all_from (const archive_num &archive_to_remove, const archive_num &last_archive)
 return true if the corresponding file is no more located in any archive (thus, the object is no more usefull in the base)
void listing (user_interaction &dialog) const
 list where is saved this file
virtual void apply_permutation (archive_num src, archive_num dst)
virtual void skip_out (archive_num num)
 decrement archive numbers above num
virtual void compute_most_recent_stats (std::vector< infinint > &data, std::vector< infinint > &ea, std::vector< infinint > &total_data, std::vector< infinint > &total_ea) const
virtual char obj_signature () const
virtual bool fix_corruption ()
- 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

Static Public Member Functions

static char signature ()

Additional Inherited Members

- 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 data_tree class stores presence of a given file in a set of archives

the data associated to a given file are the different modification dates that this file has been found in the archive the database has been feed by

Definition at line 59 of file data_tree.hpp.

Member Function Documentation

virtual void libdar::data_tree::finalize ( const archive_num archive,
const datetime &  deleted_date,
const archive_num ignore_archive_greater_or_equal 
)
virtual

add deleted entry if no object of the current archive exist and the entry of the previous archive is already present.

Parameters
[in]archiveis the number of the archive to finalize
[in]deleted_datedate of deletion to use for inode removal when no information can be grabbed from the archive (this date is taken from the parent dir last modification date)
[in]ignore_archive_greater_or_equalignore archives which number is greater or equal than "ignore_archive_greater_or_equal" as if they were not present in the database. If set to zero, no archive is ignored.

Reimplemented in libdar::data_dir.


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