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

Loading...
Searching...
No Matches
shell_interaction_emulator.hpp
Go to the documentation of this file.
1/*********************************************************************/
2// dar - disk archive - a backup/restoration program
3// Copyright (C) 2002-2025 Denis Corbin
4//
5// This program is free software; you can redistribute it and/or
6// modify it under the terms of the GNU General Public License
7// as published by the Free Software Foundation; either version 2
8// of the License, or (at your option) any later version.
9//
10// This program is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13// GNU General Public License for more details.
14//
15// You should have received a copy of the GNU General Public License
16// along with this program; if not, write to the Free Software
17// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18//
19// to contact the author, see the AUTHOR file
20/*********************************************************************/
21
25
26
27#ifndef SHELL_INTERACTION_EMULATOR_HPP
28#define SHELL_INTERACTION_EMULATOR_HPP
29
30extern "C"
31{
32} // end extern "C"
33
34#include "../my_config.h"
35
36#include "shell_interaction.hpp"
37
38namespace libdar
39{
40
43
44 class shell_interaction_emulator : public shell_interaction
45 {
46 public:
47 shell_interaction_emulator(user_interaction *emulator);
48 shell_interaction_emulator(const shell_interaction_emulator & ref) = default;
49 shell_interaction_emulator(shell_interaction_emulator && ref) noexcept = delete;
50 shell_interaction_emulator & operator = (const shell_interaction_emulator & ref) = delete;
51 shell_interaction_emulator & operator = (shell_interaction_emulator && ref) noexcept = delete;
52 virtual ~shell_interaction_emulator() = default;
53
54 protected:
55 virtual void inherited_message(const std::string & message) override { emul->message(message); };
56 virtual bool inherited_pause(const std::string & message) override;
57 virtual std::string inherited_get_string(const std::string & message, bool echo) override { return emul->get_string(message, echo); };
58 virtual secu_string inherited_get_secu_string(const std::string & message, bool echo) override { return emul->get_secu_string(message, echo); };
59
60 private:
61 user_interaction *emul;
62 };
63
65
66} // end of namespace
67
68#endif
my_config.h
include macro defined by the configure script and some specific additional ones
libdar
libdar namespace encapsulate all libdar symbols
Definition archive.hpp:47
shell_interaction.hpp
user_interaction class used by default