![]() |
Disk ARchive 2.7.14
Full featured and portable backup and archiving tool
|
class mem_ui to keep a copy of a user_interaction object More...
#include <mem_ui.hpp>
Inherited by libdar::archive::i_archive, libdar::catalogue, libdar::crypto_asym, libdar::database::i_database, libdar::fichier_global, libdar::fichier_global, libdar::filesystem_hard_link_read [protected]
, libdar::filesystem_hard_link_write [protected]
, libdar::libdar_xform::i_libdar_xform, libdar::sar [protected]
, libdar::semaphore, libdar::trivial_sar [protected]
, libdar::tuyau [protected]
, libdar::tuyau [protected]
, and libdar::zapette [protected]
.
Public Member Functions | |
mem_ui (const std::shared_ptr< user_interaction > &dialog) | |
constructor | |
mem_ui (const mem_ui &ref)=default | |
the copy constructor | |
mem_ui (mem_ui &&ref) noexcept=default | |
the move constructor | |
mem_ui & | operator= (const mem_ui &ref)=default |
assignement operator | |
mem_ui & | operator= (mem_ui &&ref) noexcept=default |
move operator | |
virtual | ~mem_ui () noexcept(false) |
destructor | |
mem_ui (const std::shared_ptr< user_interaction > &dialog) | |
constructor | |
mem_ui (const mem_ui &ref)=default | |
the copy constructor | |
mem_ui (mem_ui &&ref) noexcept=default | |
the move constructor | |
mem_ui & | operator= (const mem_ui &ref)=default |
assignement operator | |
mem_ui & | operator= (mem_ui &&ref) noexcept=default |
move operator | |
virtual | ~mem_ui () noexcept(false) |
destructor | |
Protected Member Functions | |
user_interaction & | get_ui () const |
get access to the user_interaction object | |
std::shared_ptr< user_interaction > | get_pointer () const |
get access to the shared_ptr pointing to the user_interaction | |
user_interaction & | get_ui () const |
get access to the user_interaction object | |
std::shared_ptr< user_interaction > | get_pointer () const |
get access to the shared_ptr pointing to the user_interaction | |
Private Attributes | |
std::shared_ptr< user_interaction > | ui |
class mem_ui to keep a copy of a user_interaction object
this class is targeted for inheritance (it is advised to use a "protected" inheritance, not a "public" one). Instead of having all the stuf of managing, cloning, releasing a pointer on user_interaction a class simply put itslef as inherited from mem_ui to take the benefit of this implementation, once and for all. Use this class with caution espetially for class which will generate a ton of objects, as this will duplicate the user_interaction object in the same number. sometimes it is more efficient to have the user_interaction object as parameter of the constructor, using it if necessary while constructing the object only. In that situation, if the user_interaction is not need any further after construction, no need to make the class inherit from mem_ui.
Definition at line 54 of file dar64-2.7.14-win64/include/dar/mem_ui.hpp.
libdar::mem_ui::mem_ui | ( | const std::shared_ptr< user_interaction > & | dialog | ) |
constructor
[in] | dialog | the user_interaction object to clone and store If you plan to use mem_ui, you should pass the user_interaction to its constructor for you later be able to call get_ui() at any time from the inherited class |
the copy constructor
need to be called from the copy constructor of any inherited class that explicitely define one
|
inlinevirtual |
destructor
it is declared as virtual, for precaution, as it may not be very frequent to release an object having just a mem_ui pointer on it.
Definition at line 87 of file dar64-2.7.14-win64/include/dar/mem_ui.hpp.
libdar::mem_ui::mem_ui | ( | const std::shared_ptr< user_interaction > & | dialog | ) |
constructor
[in] | dialog | the user_interaction object to clone and store If you plan to use mem_ui, you should pass the user_interaction to its constructor for you later be able to call get_ui() at any time from the inherited class |
the copy constructor
need to be called from the copy constructor of any inherited class that explicitely define one
|
inlinevirtual |
destructor
it is declared as virtual, for precaution, as it may not be very frequent to release an object having just a mem_ui pointer on it.
Definition at line 87 of file src/libdar/mem_ui.hpp.
|
inlineprotected |
get access to the shared_ptr pointing to the user_interaction
Definition at line 97 of file dar64-2.7.14-win64/include/dar/mem_ui.hpp.
|
inlineprotected |
get access to the shared_ptr pointing to the user_interaction
Definition at line 97 of file src/libdar/mem_ui.hpp.
|
inlineprotected |
get access to the user_interaction object
Definition at line 94 of file dar64-2.7.14-win64/include/dar/mem_ui.hpp.
Referenced by libdar::database::i_database::check_order(), and libdar::crypto_asym::get_ui().
|
inlineprotected |
get access to the user_interaction object
Definition at line 94 of file src/libdar/mem_ui.hpp.
assignement operator
you need to call it from the inherited class assignement operator if the inherited class explicitely defines its own one.
assignement operator
you need to call it from the inherited class assignement operator if the inherited class explicitely defines its own one.
|
private |
Definition at line 100 of file dar64-2.7.14-win64/include/dar/mem_ui.hpp.