29 #include "../my_config.h"
48 data_preserve_mark_already_saved,
49 data_overwrite_mark_already_saved,
63 EA_preserve_mark_already_saved,
64 EA_overwrite_mark_already_saved,
173 const testing & operator = (
const testing & ref) { free(); copy_from(ref);
if(!check())
throw Ememory(
"testing::testing(const testing &)");
return *
this; };
180 if(x_input->
evaluate(first, second))
181 x_go_true->
get_action(first, second, data, ea);
183 x_go_false->
get_action(first, second, data, ea);
194 void copy_from(
const testing & ref);
209 const crit_chain & operator = (
const crit_chain & ref) { destroy(); copy_from(ref);
return *
this; };
213 void clear() { destroy(); };
221 std::vector<crit_action *> sequence;
374 return tmp !=
nullptr && tmp->ea_get_saved_status() != cat_inode::ea_none && tmp->ea_get_saved_status() != cat_inode::ea_removed;
476 const crit_not & operator = (
const crit_not & ref) { destroy(); copy_from(ref);
return *
this; };
486 void copy_from(
const crit_not & ref);
487 void destroy() {
if(x_crit !=
nullptr) {
delete x_crit; x_crit =
nullptr; } };
497 const crit_and & operator = (
const crit_and & ref) { detruit(); copy_from(ref);
return *
this; };
501 void clear() { detruit(); };
510 std::vector<criterium *> operand;
513 void copy_from(
const crit_and & ref);
517 class crit_or :
public crit_and
520 crit_or() { clear(); };
522 bool evaluate(
const cat_nomme & first,
const cat_nomme & second)
const;
523 criterium *clone()
const {
return new (
get_pool()) crit_or(*
this); };
527 class crit_invert :
public crit_not
530 crit_invert(
const criterium & crit) : crit_not(crit) {};
532 bool evaluate(
const cat_nomme & first,
const cat_nomme & second)
const {
return x_crit->
evaluate(second, first); };
533 criterium *clone()
const {
return new (
get_pool()) crit_invert(*
this); };
571 extern void crit_show_entry_info(user_interaction & dialog,
const std::string & full_name,
const cat_entree *already_here,
const cat_entree *dolly);
void get_action(const cat_nomme &first, const cat_nomme &second, over_action_data &data, over_action_ea &ea) const
the inherited pure virtual methods from class action that must be implemented
bool evaluate(const cat_nomme &first, const cat_nomme &second) const
criterum interface method
returns true if the first entry is a inode with several hard links (whatever is the second entry) and...
over_action_data crit_ask_user_for_data_action(user_interaction &dialog, const std::string &full_name, const cat_entree *already_here, const cat_entree *dolly)
ask user for Data action
bool evaluate(const cat_nomme &first, const cat_nomme &second) const
criterum interface method
base class of all objects contained in a catalogue and that can be named
criterium * clone() const
clone construction method
bool evaluate(const cat_nomme &first, const cat_nomme &second) const
criterum interface method
criterium * clone() const
clone construction method
class used to organize objects in tree in catalogue as like directories in a filesystem ...
return true if the entry is a sparse file (or hard linked sparse file)
bool evaluate(const cat_nomme &first, const cat_nomme &second) const
criterum interface method
bool evaluate(const cat_nomme &first, const cat_nomme &second) const
criterum interface method
over_action_data
the possible actions for overwriting data
virtual void get_action(const cat_nomme &first, const cat_nomme &second, over_action_data &data, over_action_ea &ea) const =0
the action to take based on the files to compare
returns true if the in place entry has its EA saved (not just marked as saved) in the archve of refer...
crit_action * clone() const
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...
returns true if the data of the first entry is more recent or of the same date as the fixed date give...
criterium * clone() const
clone construction method
virtual criterium * clone() const =0
clone construction method
bool ea()
returns whether EA support has been activated at compilation time
returns true if the first entry is a plain file (whatever is the second)
returns true if the space used by EA of the first entry is greater or equal to the space used by the ...
realises the negation of the criterium given in argument to its constructor
bool evaluate(const cat_nomme &first, const cat_nomme &second) const
criterum interface method
virtual bool evaluate(const cat_nomme &first, const cat_nomme &second) const =0
criterum interface method
criterium * clone() const
clone construction method
the basic constant action
criterium * clone() const
clone construction method
bool evaluate(const cat_nomme &first, const cat_nomme &second) const
criterum interface method
over_action_ea
the possible action for overwriting EA
realises the AND operator
returns true if the data of the first entry is bigger or equal to the one of the second entry ...
void crit_show_entry_info(user_interaction &dialog, const std::string &full_name, const cat_entree *already_here, const cat_entree *dolly)
show information suited for user comparison and decision for entry in conflict
bool evaluate(const cat_nomme &first, const cat_nomme &second) const
criterum interface method
bool evaluate(const cat_nomme &first, const cat_nomme &second) const
criterum interface method
bool evaluate(const cat_nomme &first, const cat_nomme &second) const
criterum interface method
over_action_ea crit_ask_user_for_FSA_action(user_interaction &dialog, const std::string &full_name, const cat_entree *already_here, const cat_entree *dolly)
ask user for FSA action
the cat_directory inode class
criterium * clone() const
clone construction method
returns true if the first entry is a inode with several hard links (whatever is the second entry) ...
return true if the entry is a dirty file (or hard linked dirty file)
the crit_chain class sequences crit_actions up to full definition of the action
void get_action(const cat_nomme &first, const cat_nomme &second, over_action_data &data, over_action_ea &ea) const
the action to take based on the files to compare
memory_pool * get_pool() const
criterium * clone() const
clone construction method
testing(const criterium &input, const crit_action &go_true, const crit_action &go_false)
the constructor
returns true if the EA of the first entry is more recent or equal to the one of the second entry ...
exception used when memory has been exhausted
bool evaluate(const cat_nomme &first, const cat_nomme &second) const
criterum interface method
criterium * clone() const
clone construction method
criterium * clone() const
clone construction method
criterium * clone() const
clone construction method
void get_action(const cat_nomme &first, const cat_nomme &second, over_action_data &data, over_action_ea &ea) const
the inherited pure virtual method from class action that must be gimplemented
bool evaluate(const cat_nomme &first, const cat_nomme &second) const
criterum interface method
the global action for overwriting
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
bool evaluate(const cat_nomme &first, const cat_nomme &second) const
criterum interface method
criterium * clone() const
clone construction method
criterium * clone() const
clone construction method
virtual crit_action * clone() const =0
clone construction method
bool evaluate(const cat_nomme &first, const cat_nomme &second) const
criterum interface method
criterium * clone() const
clone construction method
criterium * clone() const
clone construction method
criterium * clone() const
clone construction method
bool evaluate(const cat_nomme &first, const cat_nomme &second) const
criterum interface method
bool evaluate(const cat_nomme &first, const cat_nomme &second) const
criterum interface method
bool evaluate(const cat_nomme &first, const cat_nomme &second) const
criterum interface method
virtual bool evaluate(const cat_nomme &first, const cat_nomme &second) const
criterum interface method
exception used to signal a bug. A bug is triggered when reaching some code that should never be reach...
bool evaluate(const cat_nomme &first, const cat_nomme &second) const
criterum interface method
the generic criterium class, parent of all criterium
criterium * clone() const
clone construction method
this is the base class of object that can be allocated on a memory pool
the root class for all cat_inode
returns true if the first entry is an inode (whatever is the second)
returns true if the data of the first entry is more recent or of the same date of the one of the seco...
crit_action * clone() const
clone construction method
base object for all inode types, managed EA and FSA, dates, permissions, ownership, ...
the testing class binds criterium to actions
returns true if the data of the first entry is saved int the archive (not marked as unchanged since t...
over_action_ea crit_ask_user_for_EA_action(user_interaction &dialog, const std::string &full_name, const cat_entree *already_here, const cat_entree *dolly)
ask user for EA action
the arbitrary large positive integer class
criterium * clone() const
clone construction method
criterium * clone() const
clone construction method
crit_constant_action(over_action_data data, over_action_ea ea)
the constuctor
virtual ~crit_action()
the destructor
crit_action * clone() const
clone construction method
returns true if the first entry has more or even EA (in number not in size) than the second entry ...
criterium * clone() const
clone construction method
libdar namespace encapsulate all libdar symbols
returns true if the first entry is a cat_directory (whatever is the second)
criterium * clone() const
clone construction method
returns true if the EA of the first entry is more recent or equal to the fixed date given in argument...
bool evaluate(const cat_nomme &first, const cat_nomme &second) const
criterum interface method