| Disk ARchive 2.5.10 Full featured and portable backup and archiving tool

- Main Page
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions | List of all members
libdar::mem_ui Class Reference
Private

class mem_ui to keep a copy of a user_interaction object More...

`#include <mem_ui.hpp>`

Inherited by libdar::catalogue`[protected]`, libdar::crypto_asym, libdar::fichier_global, libdar::filesystem_hard_link_read`[protected, virtual]`, libdar::filesystem_hard_link_write`[protected, virtual]`, libdar::sar`[protected]`, libdar::semaphore, libdar::trivial_sar`[protected]`, libdar::tuyau`[protected]`, and libdar::zapette`[protected]`.

## Public Member Functions
| mem_ui (const user_interaction &dialog)
| constructor More...
| mem_ui (user_interaction *dialog)
| mem_ui (const mem_ui &ref)
| the copy constructor More...
virtual | ~mem_ui () throw (Ebug)
| destructor More...
const mem_ui & | operator= (const mem_ui &ref)
| assignement operator More...

## Protected Member Functions
user_interaction & | get_ui () const
| get access to the user_interaction cloned object More...

## Detailed Description

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 53 of file mem_ui.hpp.

## Constructor & Destructor Documentation

libdar::mem_ui::mem_ui | ( | const user_interaction & | dialog | ) |
| inline

constructor

Parameters

  [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

Definition at line 62 of file mem_ui.hpp.

libdar::mem_ui::mem_ui | ( | user_interaction * | dialog | ) |
| inline

Parameters

  [in] | dialog | pointer to a user_interaction object that will be referred to and which must stay alive during the whole life of "this" object. This object is not destroyed nor cloned by mem_ui.

Definition at line 67 of file mem_ui.hpp.

libdar::mem_ui::mem_ui | ( | const mem_ui & | ref | ) |
| inline

the copy constructor

need to be called from the copy constructor of any inherited class that explicitely define one

Definition at line 72 of file mem_ui.hpp.

virtual libdar::mem_ui::~mem_ui | ( |  | ) |
throw | ( | Ebug
| ) |  |
| inline virtual

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 78 of file mem_ui.hpp.

## Member Function Documentation

user_interaction& libdar::mem_ui::get_ui | ( |  | ) | const
| protected

get access to the user_interaction cloned object

Returns
  a reference to the clone object. This reference stays valid during all the live of the object.

Referenced by libdar::crypto_asym::get_ui().

const mem_ui& libdar::mem_ui::operator= | ( | const mem_ui & | ref | ) |
| inline

assignement operator

you need to call it from the inherited class assignement operator if the inherited class explicitely defines its own one.

Definition at line 85 of file mem_ui.hpp.

The documentation for this class was generated from the following file:

- mem_ui.hpp