29 #include "../my_config.h"
489 crit_not & operator = (
const crit_not & ref) { destroy(); copy_from(ref);
return *
this; };
490 crit_not & operator = (
crit_not && ref) noexcept { criterium::operator = (std::move(ref)); std::swap(x_crit, ref.x_crit);
return *
this; };
500 void copy_from(
const crit_not & ref);
501 void destroy() {
if(x_crit !=
nullptr) {
delete x_crit; x_crit =
nullptr; } };
512 crit_and & operator = (
const crit_and & ref) { detruit(); copy_from(ref);
return *
this; };
517 void clear() { detruit(); };
526 std::deque<criterium *> operand;
529 void copy_from(
const crit_and & ref);
533 class crit_or :
public crit_and
536 crit_or() { clear(); };
537 crit_or(
const crit_or & ref) =
default;
538 crit_or(crit_or && ref) =
default;
539 crit_or & operator = (
const crit_or & ref) =
default;
540 crit_or & operator = (crit_or && ref) noexcept = default;
541 ~crit_or() = default;
543 virtual
bool evaluate(const cat_nomme & first, const cat_nomme & second) const override;
544 virtual criterium *clone()
const override {
return new (std::nothrow) crit_or(*
this); };
548 class crit_invert :
public crit_not
551 crit_invert(
const criterium & crit) : crit_not(crit) {};
552 crit_invert(
const crit_invert & ref) =
default;
553 crit_invert(crit_invert && ref) noexcept = default;
554 crit_invert & operator = (const crit_invert & ref) = default;
555 crit_invert & operator = (crit_invert && ref) noexcept = default;
556 ~crit_invert() = default;
558 virtual
bool evaluate(const cat_nomme & first, const cat_nomme & second)
const override {
return x_crit->
evaluate(second, first); };
559 virtual criterium *clone()
const override {
return new (std::nothrow) crit_invert(*
this); };
virtual criterium * clone() const override
clone construction method
virtual criterium * clone() const override
clone construction method
virtual bool evaluate(const cat_nomme &first, const cat_nomme &second) const override
criterum interface method
return true if the entry is a sparse file (or hard linked sparse file)
virtual criterium * clone() const override
clone construction method
virtual bool evaluate(const cat_nomme &first, const cat_nomme &second) const override
criterum interface method
virtual bool evaluate(const cat_nomme &first, const cat_nomme &second) const override
criterum interface method
virtual criterium * clone() const override
clone construction method
returns true if the in place entry has its EA saved (not just marked as saved) in the archve of refer...
virtual bool evaluate(const cat_nomme &first, const cat_nomme &second) const override
criterum interface method
virtual criterium * clone() const override
clone construction method
virtual criterium * clone() const override
clone construction method
void gobe(crit_and &to_be_voided)
this call merges to the current call the arguments of another "crit_and", the given argument is clear...
If the in_place entry is not an inode its date is considered equal to zero. Comparison is done on mti...
returns true if the first entry is a plain file (whatever is the second)
virtual criterium * clone() const =0
clone construction method
returns true if the space used by EA of the first entry is greater or equal to the space used by the ...
virtual criterium * clone() const override
clone construction method
realises the negation of the criterium given in argument to its constructor
virtual bool evaluate(const cat_nomme &first, const cat_nomme &second) const override
criterum interface method
virtual criterium * clone() const override
clone construction method
virtual criterium * clone() const override
clone construction method
virtual bool evaluate(const cat_nomme &first, const cat_nomme &second) const override
criterum interface method
virtual criterium * clone() const override
clone construction method
realises the AND operator
returns true if the data of the first entry is bigger or equal to the one of the second entry ...
virtual bool evaluate(const cat_nomme &first, const cat_nomme &second) const override
criterum interface method
returns true if the first entry is a inode with several hard links (whatever is the second entry) ...
virtual bool evaluate(const cat_nomme &first, const cat_nomme &second) const override
criterum interface method
return true if the entry is a dirty file (or hard linked dirty file)
virtual criterium * clone() const override
clone construction method
virtual bool evaluate(const cat_nomme &first, const cat_nomme &second) const override
criterum interface method
virtual bool evaluate(const cat_nomme &first, const cat_nomme &second) const override
criterum interface method
virtual bool evaluate(const cat_nomme &first, const cat_nomme &second) const override
criterum interface method
returns true if the EA of the first entry is more recent or equal to the one of the second entry ...
virtual criterium * clone() const override
clone construction method
exception used when memory has been exhausted
virtual criterium * clone() const override
clone construction method
virtual criterium * clone() const override
clone construction method
virtual bool evaluate(const cat_nomme &first, const cat_nomme &second) const =0
criterum interface method
returns true if both inputs are inode of the same type (file/pipe/device/...) and share inode informa...
virtual criterium * clone() const override
clone construction method
returns true if the two entries are of the same type (plain-file/char dev/block dev/named pipe/symlin...
the base class for all entry that have a name
virtual bool evaluate(const cat_nomme &first, const cat_nomme &second) const override
criterum interface method
virtual bool evaluate(const cat_nomme &first, const cat_nomme &second) const override
criterum interface method
contains all the excetion class thrown by libdar
return true if the entry has delta signature
switch module to limitint (32 ou 64 bits integers) or infinint
virtual bool evaluate(const cat_nomme &first, const cat_nomme &second) const override
criterum interface method
virtual bool evaluate(const cat_nomme &first, const cat_nomme &second) const override
criterum interface method
the generic criterium class, parent of all criterium
virtual bool evaluate(const cat_nomme &first, const cat_nomme &second) const override
criterum interface method
virtual bool evaluate(const cat_nomme &first, const cat_nomme &second) const override
criterum interface method
returns true if the first entry is an inode (whatever is the second)
virtual bool evaluate(const cat_nomme &first, const cat_nomme &second) const override
criterum interface method
virtual criterium * clone() const override
clone construction method
returns true if the data of the first entry is more recent or of the same date of the one of the seco...
virtual criterium * clone() const override
clone construction method
virtual criterium * clone() const override
clone construction method
if the entry is not an inode the result is also true
the arbitrary large positive integer class
virtual criterium * clone() const override
clone construction method
virtual bool evaluate(const cat_nomme &first, const cat_nomme &second) const override
criterum interface method
virtual bool evaluate(const cat_nomme &first, const cat_nomme &second) const override
criterum interface method
returns true if the first entry has more or even EA (in number not in size) than the second entry ...
virtual bool evaluate(const cat_nomme &first, const cat_nomme &second) const override
criterum interface method
virtual criterium * clone() const override
clone construction method
virtual criterium * clone() const override
clone construction method
libdar namespace encapsulate all libdar symbols
returns true if the first entry is a cat_directory (whatever is the second)
virtual bool evaluate(const cat_nomme &first, const cat_nomme &second) const override
criterum interface method
virtual criterium * clone() const override
clone construction method
returns true if the EA of the first entry is more recent or equal to the fixed date given in argument...