full implemented class for user_interaction based on callback functions.
More...
#include <user_interaction_callback.hpp>
full implemented class for user_interaction based on callback functions.
this class is an inherited class of user_interaction it is used by dar command line programs, but you can use it if you wish.
Definition at line 57 of file user_interaction_callback.hpp.
◆ get_secu_string_callback
using libdar::user_interaction_callback::get_secu_string_callback = secu_string (*)(const std::string &x, bool echo, void *context) |
◆ get_string_callback
using libdar::user_interaction_callback::get_string_callback = std::string (*)(const std::string &x, bool echo, void *context) |
◆ message_callback
using libdar::user_interaction_callback::message_callback = void (*)(const std::string &x, void *context) |
◆ pause_callback
using libdar::user_interaction_callback::pause_callback = bool (*)(const std::string &x, void *context) |
◆ user_interaction_callback()
libdar::user_interaction_callback::user_interaction_callback |
( |
message_callback |
x_message_callback, |
|
|
pause_callback |
x_answer_callback, |
|
|
get_string_callback |
x_string_callback, |
|
|
get_secu_string_callback |
x_secu_string_callback, |
|
|
void * |
context_value |
|
) |
| |
constructor which receive the callback functions.
- Parameters
-
[in] | x_message_callback | is used by message() method |
[in] | x_answer_callback | is used by the pause() method |
[in] | x_string_callback | is used by get_string() method |
[in] | x_secu_string_callback | is used by get_secu_string() method |
[in] | context_value | will be passed as last argument of callbacks when called from this object. |
- Note
- The context argument of each callback is set with the context_value given in the user_interaction_callback object constructor. The value can can be any arbitrary value (nullptr is valid), and can be used as you wish. Note that the listing callback is not defined here, but thanks to a specific method
◆ change_context_value()
void libdar::user_interaction_callback::change_context_value |
( |
void * |
new_value | ) |
|
|
inlineprotected |
◆ inherited_get_secu_string()
virtual secu_string libdar::user_interaction_callback::inherited_get_secu_string |
( |
const std::string & |
message, |
|
|
bool |
echo |
|
) |
| |
|
overrideprotectedvirtual |
◆ inherited_get_string()
virtual std::string libdar::user_interaction_callback::inherited_get_string |
( |
const std::string & |
message, |
|
|
bool |
echo |
|
) |
| |
|
overrideprotectedvirtual |
◆ inherited_message()
virtual void libdar::user_interaction_callback::inherited_message |
( |
const std::string & |
message | ) |
|
|
overrideprotectedvirtual |
◆ inherited_pause()
virtual bool libdar::user_interaction_callback::inherited_pause |
( |
const std::string & |
message | ) |
|
|
overrideprotectedvirtual |
◆ context_val
void* libdar::user_interaction_callback::context_val |
|
private |
◆ get_secu_string_cb
get_secu_string_callback libdar::user_interaction_callback::get_secu_string_cb |
|
private |
◆ get_string_cb
get_string_callback libdar::user_interaction_callback::get_string_cb |
|
private |
◆ message_cb
message_callback libdar::user_interaction_callback::message_cb |
|
private |
◆ pause_cb
pause_callback libdar::user_interaction_callback::pause_cb |
|
private |
The documentation for this class was generated from the following file: