![]() |
Disk ARchive 2.7.18
Full featured and portable backup and archiving tool
|
This is a pure virtual class that is used by libdar when interaction with the user is required. More...
#include <user_interaction.hpp>
Inherited by libdar5::user_interaction, , and libdar::user_interaction_blind.
Public Member Functions | |
| user_interaction (const user_interaction &ref)=default | |
| user_interaction (user_interaction &&ref) noexcept=default | |
| user_interaction & | operator= (const user_interaction &ref)=default |
| user_interaction & | operator= (user_interaction &&ref) noexcept=default |
| void | message (const std::string &message) |
| void | pause (const std::string &message) |
| std::string | get_string (const std::string &message, bool echo) |
| secu_string | get_secu_string (const std::string &message, bool echo) |
| virtual void | printf (const char *format,...) |
| libdar uses this call to format output before sending to the message() method. | |
Protected Member Functions | |
| virtual void | inherited_message (const std::string &message)=0 |
| virtual bool | inherited_pause (const std::string &message)=0 |
| method used to ask a boolean question to the user. | |
| virtual std::string | inherited_get_string (const std::string &message, bool echo)=0 |
| method used to ask a question that needs an arbitrary answer. | |
| virtual secu_string | inherited_get_secu_string (const std::string &message, bool echo)=0 |
| same a get_string() but uses libdar::secu_string instead of std::string | |
This is a pure virtual class that is used by libdar when interaction with the user is required.
You can base your own class on it using C++ inheritance or use the predifined inherited classes user_interaction_callback which implements the interaction based on callback functions.
Definition at line 46 of file user_interaction.hpp.
|
inline |
Definition at line 49 of file user_interaction.hpp.
|
protectedpure virtual |
same a get_string() but uses libdar::secu_string instead of std::string
| [in] | message | is the question to display to the user. |
| [in] | echo | is set to false is the answer must not be shown while the user answers. |
Implemented in libdar5::user_interaction, libdar::user_interaction_blind, and libdar::user_interaction_callback.
|
protectedpure virtual |
method used to ask a question that needs an arbitrary answer.
| [in] | message | is the question to display to the user. |
| [in] | echo | is set to false is the answer must not be shown while the user answers. |
Implemented in libdar5::user_interaction, libdar::user_interaction_blind, and libdar::user_interaction_callback.
|
protectedpure virtual |
method used to display a warning or a message to the user.
| [in] | message | is the message to display. |
Implemented in libdar5::user_interaction, libdar::user_interaction_blind, and libdar::user_interaction_callback.
|
protectedpure virtual |
method used to ask a boolean question to the user.
| [in] | message | The boolean question to ask to the user |
Implemented in libdar5::user_interaction, libdar::user_interaction_blind, and libdar::user_interaction_callback.
|
virtual |
libdar uses this call to format output before sending to the message() 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:
Reimplemented in libdar5::user_interaction.