 |
Disk ARchive
2.6.8
Full featured and portable backup and archiving tool
|
Go to the documentation of this file.
26 #ifndef CRIT_ACTION_HPP
27 #define CRIT_ACTION_HPP
29 #include "../my_config.h"
153 testing & operator = (
const testing & ref) { free(); copy_from(ref);
if(!
check())
throw Ememory(
"testing::testing(const testing &)");
return *
this; };
154 testing & operator = (
testing && ref) noexcept { crit_action::operator = (std::move(ref)); move_from(std::move(ref));
return *
this; };
161 if(x_input->
evaluate(first, second))
174 void nullifyptr() noexcept { x_input =
nullptr; x_go_true = x_go_false =
nullptr; };
175 void free() noexcept;
176 void copy_from(const
testing & ref);
177 void move_from(
testing && ref) noexcept;
194 crit_chain & operator = (
crit_chain && ref) noexcept { crit_action::operator = (std::move(ref)); sequence = std::move(ref.sequence);
return *
this; };
198 void clear() { destroy(); };
206 std::deque<crit_action *> sequence;
merge EA but if both inode share an EA with the same name, take keep the one of the 'to be added' ino...
do not overwrite (keep the 'in place' entry)
action still undefined at this step of the evaluation
virtual void get_action(const cat_nomme &first, const cat_nomme &second, over_action_data &data, over_action_ea &ea) const override
the inherited pure virtual method from class crit_action that must be implemented
virtual void get_action(const cat_nomme &first, const cat_nomme &second, over_action_data &data, over_action_ea &ea) const override
the inherited pure virtual methods from class action that must be implemented
the basic constant action
contains classes that let the user define the policy for overwriting files
the base class for all entry that have a name
over_action_ea
the possible action for overwriting EA
merge EA but do not overwrite existing EA of 'in place' by one of the same name of 'to be added' inod...
crit_constant_action(over_action_data data, over_action_ea ea)
the constuctor
action still undefined at this step of the evaluation
virtual bool evaluate(const cat_nomme &first, const cat_nomme &second) const =0
criterum interface method
ask for user decision about EA
remove the original data/EA (file is completely deleted)
the generic criterium class, parent of all criterium
drop the EA for the elected entry
virtual crit_action * clone() const =0
clone construction method
ask for user decision about file's data
exception used when memory has been exhausted
virtual ~crit_action()=default
the destructor
bool check() const
returns false if an field is nullptr
keep the EA of the 'to be added' entry
drop any EA but mark them as already saved in the archive of reference (ctime is the one of the 'in p...
drop any EA but mark them as already saved in the archive of reference (ctime is the one of the 'to b...
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
virtual crit_action * clone() const override
clone construction method
the testing class binds criterium to actions
the crit_chain class sequences crit_actions up to full definition of the action
keep the EA of the 'in place' entry
virtual crit_action * clone() const override
clone construction method
testing(const criterium &input, const crit_action &go_true, const crit_action &go_false)
the constructor
overwrite the 'in place' but mark the 'to be added' as already saved in the archive of reference
the global action for overwriting
keep the 'in place' but mark it as already saved in the archive of reference
over_action_data
the possible actions for overwriting data
bool ea() noexcept
returns whether EA support has been activated at compilation time
overwirte the 'in place' entry by the 'to be added' one
virtual crit_action * clone() const override
clone construction method
libdar namespace encapsulate all libdar symbols