Disk ARchive  2.4.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines
Public Member Functions
libdar::mem_ui Class Reference

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

#include <mem_ui.hpp>

Inherited by libdar::catalogue [protected], 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].

List of all members.

Public Member Functions

 mem_ui (user_interaction &dialog)
 constructor
 mem_ui (const mem_ui &ref)
 the copy constructor
virtual ~mem_ui ()
 destructor
const mem_uioperator= (const mem_ui &ref)
 assignement operator
user_interactionget_ui () const
 get access to the user_interaction cloned object

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


Constructor & Destructor Documentation

libdar::mem_ui::mem_ui ( user_interaction dialog) [inline]

constructor

Parameters:
[in]dialogthe 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 65 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 70 of file mem_ui.hpp.

virtual libdar::mem_ui::~mem_ui ( ) [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 76 of file mem_ui.hpp.


Member Function Documentation

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


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines