26 #ifndef STATISTICS_HPP 27 #define STATISTICS_HPP 29 #include "../my_config.h" 47 #define LOCK_IN pthread_mutex_lock(&lock_mutex) 48 #define LOCK_OUT pthread_mutex_unlock(&lock_mutex) 49 #define LOCK_IN_CONST pthread_mutex_lock(const_cast<pthread_mutex_t *>(&lock_mutex)) 50 #define LOCK_OUT_CONST pthread_mutex_unlock(const_cast<pthread_mutex_t *>(&lock_mutex)) 54 #define LOCK_IN_CONST // 55 #define LOCK_OUT_CONST // 91 void incr_treated() { (this->*increment)(&treated); };
106 void sub_from_ea_treated(
const infinint & val) { (this->*sub_from)(&ea_treated, val); };
107 void sub_from_hard_links(
const infinint & val) { (this->*sub_from)(&hard_links, val); };
109 infinint get_treated()
const {
return (this->*returned)(&treated); };
135 pthread_mutex_t lock_mutex;
157 void increment_locked(
infinint * var)
164 void increment_unlocked(
infinint * var)
197 void decrement_locked(
infinint * var)
204 void decrement_unlocked(
infinint * var)
234 void init(
bool lock);
void decr_deleted()
decrement by one the errored counter
void decr_errored()
decrement by one the toold counter
void decr_skipped()
decrement by one the hard_links counter
void clear()
reset counters to zero
void decr_tooold()
decrement by one the ignored counter
void incr_deleted()
increment by one the errored counter
void add_to_ignored(const infinint &val)
increment by one the ea_treated counter
void sub_from_treated(const infinint &val)
increment the byte amount counter by a given value
void decr_hard_links()
decrement by one the treated counter
infinint get_ignored() const
returns the current value of the skipped counter
This is a pure virtual class that is used by libdar when interaction with the user is required...
void incr_ea_treated()
increment by one the deleted counter
the present file to ignore (not to be recorded as deleted later)
statistics(bool lock=true)
constructor
void add_to_deleted(const infinint &val)
increment the errored counter by a given value
void decr_treated()
returns the current value of the byte_amount counter
infinint get_byte_amount() const
returns the current value of the ea_treated counter
infinint get_errored() const
returns the current value of the tooold counter
defines the interaction between libdar and the user.Three classes are defined
void incr_ignored()
increment by one the skipped counter
void decr_ea_treated()
decrement by one the deleted counter
void incr_skipped()
increment by one the hard_links counter
infinint total() const
total number of file treated
void add_to_byte_amount(const infinint &val)
increment the deleted counter by a given value
infinint get_deleted() const
returns the current value of the errored counter
void incr_hard_links()
increment by one the treated counter
void incr_errored()
increment by one the tooold counter
infinint get_hard_links() const
returns the current value of the treated counter
infinint get_tooold() const
returns the current value of the ignored counter
void incr_tooold()
increment by one the ignored counter
void dump(user_interaction &dialog) const
set to the given value the byte_amount counter
switch module to limitint (32 ou 64 bits integers) or infinint
the arbitrary large positive integer class
infinint get_ea_treated() const
returns the current value of the deleted counter
void set_byte_amount(const infinint &val)
decrement by one the ea_treated counter
libdar namespace encapsulate all libdar symbols
infinint get_skipped() const
returns the current value of the hard_links counter
void decr_ignored()
decrement by one the skipped counter
structure returned by libdar call to give a summary of the operation done in term of file treated ...
void add_to_errored(const infinint &val)
increment the ignored counter by a given value