29 #include "../my_config.h" 47 data_preserve_mark_already_saved,
48 data_overwrite_mark_already_saved,
62 EA_preserve_mark_already_saved,
63 EA_overwrite_mark_already_saved,
142 virtual bool evaluate(
const nomme &first,
const nomme &second)
const = 0;
152 static const inode *get_inode(
const nomme * arg);
172 const testing & operator = (
const testing & ref) { free(); copy_from(ref);
if(!check())
throw Ememory(
"testing::testing(const testing &)");
return *
this; };
179 if(x_input->evaluate(first, second))
180 x_go_true->get_action(first, second, data, ea);
182 x_go_false->get_action(first, second, data, ea);
193 void copy_from(
const testing & ref);
208 const crit_chain & operator = (
const crit_chain & ref) { destroy(); copy_from(ref);
return *
this; };
212 void clear() { destroy(); };
220 std::vector<crit_action *> sequence;
239 bool evaluate(
const nomme &first,
const nomme &second)
const {
return dynamic_cast<const inode *
>(&first) != NULL || dynamic_cast<const mirage *>(&first) != NULL; };
259 bool evaluate(
const nomme &first,
const nomme &second)
const;
278 bool evaluate(
const nomme &first,
const nomme &second)
const 280 const mirage * tmp =
dynamic_cast<const mirage *
>(&first);
296 bool evaluate(
const nomme &first,
const nomme &second)
const;
314 bool evaluate(
const nomme &first,
const nomme &second)
const;
330 bool evaluate(
const nomme &first,
const nomme &second)
const;
343 bool evaluate(
const nomme &first,
const nomme &second)
const;
353 bool evaluate(
const nomme &first,
const nomme &second)
const;
362 bool evaluate(
const nomme &first,
const nomme &second)
const;
375 const inode *tmp =
dynamic_cast<const inode *
>(&first);
376 return tmp != NULL && tmp->ea_get_saved_status() != inode::ea_none && tmp->ea_get_saved_status() != inode::ea_removed;
394 bool evaluate(
const nomme &first,
const nomme &second)
const;
412 bool evaluate(
const nomme &first,
const nomme &second)
const;
428 bool evaluate(
const nomme &first,
const nomme &second)
const;
441 bool evaluate(
const nomme &first,
const nomme &second)
const;
453 bool evaluate(
const nomme &first,
const nomme &second)
const;
466 bool evaluate(
const nomme &first,
const nomme &second)
const;
478 const crit_not & operator = (
const crit_not & ref) { destroy(); copy_from(ref);
return *
this; };
481 bool evaluate(
const nomme & first,
const nomme & second)
const {
return ! x_crit->evaluate(first, second); };
488 void copy_from(
const crit_not & ref);
489 void destroy() {
if(x_crit != NULL) {
delete x_crit; x_crit = NULL; } };
508 virtual bool evaluate(
const nomme & first,
const nomme & second)
const;
512 std::vector<criterium *> operand;
515 void copy_from(
const crit_and & ref);
522 crit_or() { clear(); };
524 bool evaluate(
const nomme & first,
const nomme & second)
const;
525 criterium *
clone()
const {
return new (std::nothrow) crit_or(*
this); };
534 bool evaluate(
const nomme & first,
const nomme & second)
const {
return x_crit->
evaluate(second, first); };
535 criterium *
clone()
const {
return new (std::nothrow) crit_invert(*
this); };
returns true if the first entry is a inode with several hard links (whatever is the second entry) and...
bool evaluate(const nomme &first, const nomme &second) const
criterum interface method
return true if the entry is a sparse file (or hard linked sparse file)
criterium * clone() const
clone construction method
bool evaluate(const nomme &first, const nomme &second) const
criterum interface method
over_action_data
the possible actions for overwriting data
criterium * clone() const
clone construction method
returns true if the in place entry has its EA saved (not just marked as saved) in the archve of refer...
void get_action(const nomme &first, const nomme &second, over_action_data &data, over_action_ea &ea) const
the inherited pure virtual methods from class action that must be implemented
crit_action * clone() const
clone construction method
criterium * clone() const
clone construction method
bool evaluate(const nomme &first, const nomme &second) const
criterum interface method
returns true if the data of the first entry is more recent or of the same date as the fixed date give...
virtual criterium * clone() const =0
clone construction method
bool ea()
returns whether EA support has been activated at compilation time
criterium * clone() const
clone construction method
returns true if the first entry is a plain file (whatever is the second)
This is a pure virtual class that is used by libdar when interaction with the user is required...
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
the root class from all other inherite for any entry in the catalogue
the base class for all entry that have a name
the basic constant action
the hard link implementation, mirage is the named entry owned by a directory it points to a common "e...
criterium * clone() const
clone construction method
the directory inode class
over_action_ea
the possible action for overwriting EA
void get_action(const nomme &first, const nomme &second, over_action_data &data, over_action_ea &ea) const
the inherited pure virtual method from class action that must be gimplemented
realises the AND operator
returns true if the data of the first entry is bigger or equal to the one of the second entry ...
crit_action * 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
criterium * clone() const
clone construction method
criterium * clone() const
clone construction method
criterium * clone() const
clone construction method
the root class for all inode
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
the global action for overwriting
criterium * clone() const
clone construction method
returns true if the two entries are of the same type (plain-file/char dev/block dev/named pipe/symlin...
virtual crit_action * clone() const =0
clone construction method
over_action_data crit_ask_user_for_data_action(user_interaction &dialog, const std::string &full_name, const entree *already_here, const entree *dolly)
ask user for Data action
criterium * clone() const
clone construction method
void crit_show_entry_info(user_interaction &dialog, const std::string &full_name, const entree *already_here, const entree *dolly)
show information suited for user comparison and decision for entry in conflict
criterium * clone() const
clone construction method
criterium * clone() const
clone construction method
criterium * clone() const
clone construction method
over_action_ea crit_ask_user_for_EA_action(user_interaction &dialog, const std::string &full_name, const entree *already_here, const entree *dolly)
ask user for EA action
virtual void get_action(const nomme &first, const nomme &second, over_action_data &data, over_action_ea &ea) const =0
the action to take based on the files to compare
the generic criterium class, parent of all criterium
bool evaluate(const nomme &first, const nomme &second) const
criterum interface method
criterium * clone() const
clone construction method
returns true if the first entry is an inode (whatever is the second)
criterium * clone() const
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...
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...
the arbitrary large positive integer class
bool is_first_mirage() const
whether we are the mirage that triggered this hard link creation
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
returns true if the first entry has more or even EA (in number not in size) than the second entry ...
bool evaluate(const nomme &first, const nomme &second) const
criterum interface method
criterium * clone() const
clone construction method
libdar namespace encapsulate all libdar symbols
returns true if the first entry is a directory (whatever is the second)
here is defined the many classed which is build of the catalogue
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...
crit_action * clone() const
clone construction method