Disk ARchive  2.5.9
Full featured and portable backup and archiving tool
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules
Public Member Functions | Protected Member Functions | List of all members
libdar::user_interaction_blind Class Reference

full implementation class for user_interaction, which shows nothing and assumes answer "no" to any question More...

#include <user_interaction.hpp>

Inherits libdar::user_interaction.

Public Member Functions

bool pause2 (const std::string &message)
 alternative method to the pause() method More...
 
std::string get_string (const std::string &message, bool echo)
 method used to ask a question that needs an arbitrary answer. More...
 
secu_string get_secu_string (const std::string &message, bool echo)
 same a get_string() but uses secu_string instead More...
 
user_interactionclone () const
 make a newly allocated object which has the same properties as "this". More...
 
- Public Member Functions inherited from libdar::user_interaction
 user_interaction ()
 class constructor.
 
virtual void pause (const std::string &message)
 method used to ask a boolean question to the user. More...
 
void warning (const std::string &message)
 method used to display a warning or a message to the user. More...
 
virtual void listing (const std::string &flag, const std::string &perm, const std::string &uid, const std::string &gid, const std::string &size, const std::string &date, const std::string &filename, bool is_dir, bool has_children)
 
virtual void dar_manager_show_files (const std::string &filename, bool data_change, bool ea_change)
 
virtual void dar_manager_contents (U_I number, const std::string &chemin, const std::string &archive_name)
 
virtual void dar_manager_statistics (U_I number, const infinint &data_count, const infinint &total_data, const infinint &ea_count, const infinint &total_ea)
 
virtual void dar_manager_show_version (U_I number, const std::string &data_date, const std::string &data_presence, const std::string &ea_date, const std::string &ea_presence)
 
void printf (const char *format,...)
 libdar uses this call to format output before send to warning() method. More...
 
bool get_use_listing () const
 this is not a virtual method, it has not to be overwritten in inherited classes. More...
 
bool get_use_dar_manager_show_files () const
 this is not a virtual method, it has not to be overwritten in inherited classes.
 
bool get_use_dar_manager_contents () const
 this is not a virtual method, it has not to be overwritten in inherited classes.
 
bool get_use_dar_manager_statistics () const
 this is not a virtual method, it has not to be overwritten in inherited classes.
 
bool get_use_dar_manager_show_version () const
 this is not a virtual method, it has not to be overwritten in inherited classes.
 
void warning_with_more (U_I num)
 make a pause each N line of output when calling the warning method More...
 
- Public Member Functions inherited from libdar::on_pool
void * operator new (size_t n_byte)
 
void * operator new (size_t n_byte, const std::nothrow_t &nothrow_value)
 
void * operator new[] (size_t n_byte)
 
void * operator new[] (size_t n_byte, const std::nothrow_t &nothrow_value)
 
void * operator new (size_t n_byte, memory_pool *p)
 
void * operator new[] (size_t n_byte, memory_pool *p)
 
void operator delete (void *ptr, memory_pool *p)
 this operator is called by the compiler if an exception is throw from the constructor of the allocated object
 
void operator delete[] (void *ptr, memory_pool *p)
 this operator is called by the compiler if an exception is throw from the constructor of the allocated objects
 
void operator delete (void *ptr)
 this is the usual delete operator, modified to handle allocated objects allocated on a memory pool or not
 
void operator delete[] (void *ptr)
 this is the usual delete[] operator, modified to handle allocated objects allocated on a memory pool or not
 

Protected Member Functions

void inherited_warning (const std::string &message)
 need to be overwritten in place of the warning() method since API 3.1.x More...
 
- Protected Member Functions inherited from libdar::user_interaction
void set_use_listing (bool val)
 method to be called with true as argument if you have defined a listing() method. More...
 
void set_use_dar_manager_show_files (bool val)
 method to be called with true as argument if you have defined a dar_manager_show_files() method.
 
void set_use_dar_manager_contents (bool val)
 method to be called with true as argument if you have defined a dar_manager_contents() method.
 
void set_use_dar_manager_statistics (bool val)
 method to be called with true as argument if you have defined a dar_manager_statistics() method.
 
void set_use_dar_manager_show_version (bool val)
 method to be called with true as argument if you have defined a dar_manager_show_version() method.
 
- Protected Member Functions inherited from libdar::on_pool
memory_pool * get_pool () const
 
template<class T >
void meta_new (T *&ptr, size_t num)
 
template<class T >
void meta_delete (T *ptr)
 

Detailed Description

full implementation class for user_interaction, which shows nothing and assumes answer "no" to any question

Definition at line 516 of file user_interaction.hpp.

Member Function Documentation

user_interaction* libdar::user_interaction_blind::clone ( ) const
inlinevirtual

make a newly allocated object which has the same properties as "this".

This is a virtual method, it must be overwritten in any inherited class copy constructor and = operator may have to be overwritten too if necessary Warning ! clone() must throw exception if necessary (Ememory), but never return a nullptr pointer !

Implements libdar::user_interaction.

Definition at line 524 of file user_interaction.hpp.

References libdar::on_pool::get_pool().

secu_string libdar::user_interaction_blind::get_secu_string ( const std::string &  message,
bool  echo 
)
inlinevirtual

same a get_string() but uses secu_string instead

Parameters
[in]messageis the question to display to the user.
[in]echois set to false is the answer must not be shown while the user answers.
Returns
the user's answer.

Implements libdar::user_interaction.

Definition at line 522 of file user_interaction.hpp.

std::string libdar::user_interaction_blind::get_string ( const std::string &  message,
bool  echo 
)
inlinevirtual

method used to ask a question that needs an arbitrary answer.

Parameters
[in]messageis the question to display to the user.
[in]echois set to false is the answer must not be shown while the user answers.
Returns
the user's answer.

Implements libdar::user_interaction.

Definition at line 521 of file user_interaction.hpp.

void libdar::user_interaction_blind::inherited_warning ( const std::string &  message)
inlineprotectedvirtual

need to be overwritten in place of the warning() method since API 3.1.x

Parameters
[in]messagemessage to display

Implements libdar::user_interaction.

Definition at line 527 of file user_interaction.hpp.

bool libdar::user_interaction_blind::pause2 ( const std::string &  message)
inlinevirtual

alternative method to the pause() method

Parameters
[in]messageThe boolean question to ask to the user
Returns
the answer of the user (true/yes or no/false)
Note
either pause2() or pause() must be overwritten, but not both. libdar always calls pause() which default implementation relies on pause2() where it converts negative return from pause2() by throwing the appropriated exception. As soon as you overwrite pause(), pause2() is no more used.

Reimplemented from libdar::user_interaction.

Definition at line 519 of file user_interaction.hpp.


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