#include <user_interaction.hpp>
Inherited by libdar::user_interaction_callback.
Public Member Functions | |
| user_interaction () | |
| class constructor. | |
| virtual void | pause (const std::string &message) |
| method used to ask a boolean question to the user. | |
| virtual bool | pause2 (const std::string &message) |
| alternative method to the pause() method | |
| void | warning (const std::string &message) |
| method used to display a warning or a message to the user. | |
| virtual std::string | get_string (const std::string &message, bool echo)=0 |
| method used to ask a question that needs an arbitrary answer. | |
| virtual void | listing (const std::string &flag, const std::string &perm, const std::string &uid, const std::string &gid, const std::string &size, const std::string &date, const std::string &filename, bool is_dir, bool has_children) |
| virtual void | dar_manager_show_files (const std::string &filename, bool available_data, bool available_ea) |
| virtual void | dar_manager_contents (U_I number, const std::string &chemin, const std::string &archive_name) |
| virtual void | dar_manager_statistics (U_I number, const infinint &data_count, const infinint &total_data, const infinint &ea_count, const infinint &total_ea) |
| virtual void | dar_manager_show_version (U_I number, const std::string &data_date, const std::string &ea_date) |
| void | printf (char *format,...) |
| libdar uses this call to format output before send to warning() method. | |
| bool | get_use_listing () const |
| this is not a virtual method, it has not to be overwritten in inherited classes. | |
| bool | get_use_dar_manager_show_files () const |
| this is not a virtual method, it has not to be overwritten in inherited classes. | |
| bool | get_use_dar_manager_contents () const |
| this is not a virtual method, it has not to be overwritten in inherited classes. | |
| bool | get_use_dar_manager_statistics () const |
| this is not a virtual method, it has not to be overwritten in inherited classes. | |
| bool | get_use_dar_manager_show_version () const |
| this is not a virtual method, it has not to be overwritten in inherited classes. | |
| virtual user_interaction * | clone () const =0 |
| make a newly allocated object which has the same properties as "this". | |
| void | warning_with_more (U_I num) |
| make a pause each N line of output when calling the warning method | |
Protected Member Functions | |
| void | set_use_listing (bool val) |
| method to be called with true as argument if you have defined a listing() method. | |
| void | set_use_dar_manager_show_files (bool val) |
| method to be called with true as argument if you have defined a dar_manager_show_files() method. | |
| void | set_use_dar_manager_contents (bool val) |
| method to be called with true as argument if you have defined a dar_manager_contents() method. | |
| void | set_use_dar_manager_statistics (bool val) |
| method to be called with true as argument if you have defined a dar_manager_statistics() method. | |
| void | set_use_dar_manager_show_version (bool val) |
| method to be called with true as argument if you have defined a dar_manager_show_version() method. | |
| virtual void | inherited_warning (const std::string &message)=0 |
| need to be overwritten in place of the warning() method since API 3.1.x | |
You can base your own class on it using C++ inheritance or use the class user_interaction_callback which implements the interaction based on callback functions. The user_interaction class is used by libdar in the following circumpstances:
Definition at line 91 of file user_interaction.hpp.
|
|
make a newly allocated object which has the same properties as "this". This *is* a virtual method, it *must* be overwritten in any inherited class copy constructor and = operator may have to be overwrittent too if necessary Warning ! clone() must throw exception if necessary (Ememory), but never return a NULL pointer ! Implemented in libdar::user_interaction_callback. Referenced by libdar::generic_file::generic_file(). |
|
||||||||||||||||
|
Reimplemented in libdar::user_interaction_callback. |
|
||||||||||||||||
|
Reimplemented in libdar::user_interaction_callback. |
|
||||||||||||||||
|
Reimplemented in libdar::user_interaction_callback. |
|
||||||||||||||||||||||||
|
Reimplemented in libdar::user_interaction_callback. |
|
||||||||||||
|
method used to ask a question that needs an arbitrary answer.
Implemented in libdar::user_interaction_callback. |
|
|
this is not a virtual method, it has not to be overwritten in inherited classes. for libdar to know if it is interesting to use listing(), dar_manager_show_files(), dar_manager_contents(), dar_manager_statistics() or to keep reporting listing thanks to the warning() method, Definition at line 246 of file user_interaction.hpp. |
|
|
need to be overwritten in place of the warning() method since API 3.1.x
Implemented in libdar::user_interaction_callback. |
|
||||||||||||||||||||||||||||||||||||||||
|
Reimplemented in libdar::user_interaction_callback. |
|
|
method used to ask a boolean question to the user.
Reimplemented in libdar::user_interaction_callback. Definition at line 103 of file user_interaction.hpp. References pause2(). |
|
|
alternative method to the pause() method
Definition at line 117 of file user_interaction.hpp. Referenced by pause(). |
|
||||||||||||
|
libdar uses this call to format output before send to warning() method. This is not a virtual method, it has not to be overwritten, it is just a sublayer over warning() Supported masks for the format string are:
|
|
|
method to be called with true as argument if you have defined a listing() method. in the constructor of any inherited class that define a listing() method it is advisable to call set_use_listing() with true as argument for libdar knows that the listing() call has to be used in place of the warning() call for file listing. Definition at line 282 of file user_interaction.hpp. Referenced by libdar::user_interaction_callback::set_listing_callback(). |
|
|
method used to display a warning or a message to the user.
|
|
|
make a pause each N line of output when calling the warning method
Definition at line 272 of file user_interaction.hpp. |
1.4.2