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); };
exception used when memory has been exhausted
the base class for all entry that have a name
realises the AND operator
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...
virtual criterium * clone() const override
clone construction method
virtual bool evaluate(const cat_nomme &first, const cat_nomme &second) const override
criterum interface method
returns true if the space used by EA of the first entry is greater or equal to the space used by the ...
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...
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 one of 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
virtual bool evaluate(const cat_nomme &first, const cat_nomme &second) const override
criterum interface 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
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
virtual criterium * clone() const override
clone construction method
return true if the entry is a dirty file (or hard linked dirty file)
virtual bool evaluate(const cat_nomme &first, const cat_nomme &second) const override
criterum interface method
virtual criterium * clone() const override
clone construction method
If the in_place entry is not an inode its date is considered equal to zero. Comparison is done on mti...
virtual criterium * clone() const override
clone construction method
virtual bool evaluate(const cat_nomme &first, const cat_nomme &second) const override
criterum interface 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 bool evaluate(const cat_nomme &first, const cat_nomme &second) const override
criterum interface method
virtual criterium * clone() const override
clone construction method
if the entry is not an inode the result is also true
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 bool evaluate(const cat_nomme &first, const cat_nomme &second) const override
criterum interface method
virtual criterium * clone() const override
clone construction method
return true if the entry has delta signature
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 first entry is a cat_directory (whatever is the second)
virtual criterium * clone() const override
clone construction method
virtual bool evaluate(const cat_nomme &first, const cat_nomme &second) const override
criterum interface method
returns true if the first entry is a plain file (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 first entry is a inode with several hard links (whatever is the second entry)
virtual criterium * clone() const override
clone construction 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 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
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 criterium * clone() const override
clone construction method
virtual bool evaluate(const cat_nomme &first, const cat_nomme &second) const override
criterum interface method
realises the negation of the criterium given in argument to its constructor
virtual criterium * clone() const override
clone construction method
virtual bool evaluate(const cat_nomme &first, const cat_nomme &second) const override
criterum interface method
returns true if both inputs are inode of the same type (file/pipe/device/...) and share inode informa...
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 two entries are of the same type (plain-file/char dev/block dev/named pipe/symlin...
virtual criterium * clone() const override
clone construction 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 criterium * clone() const =0
clone construction method
virtual bool evaluate(const cat_nomme &first, const cat_nomme &second) const =0
criterum interface method
the arbitrary large positive integer class
contains all the excetion class thrown by libdar
switch module to limitint (32 ou 64 bits integers) or infinint
libdar namespace encapsulate all libdar symbols