-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcstdio_driver.hpp
More file actions
46 lines (35 loc) · 1.1 KB
/
Copy pathcstdio_driver.hpp
File metadata and controls
46 lines (35 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/* File: /lib/impl/cli/cstdio_driver.hpp
*
* This file is a part of cpplib project which is distributed under MIT License.
* See file LICENSE for full license details.
*
* Copyright (c) 2020-present Nikita Zuev (V.Slavski!) <[email protected]>
*/
#ifndef CPPLIB__lib__impl__cli__cstdio_driver__hpp
#define CPPLIB__lib__impl__cli__cstdio_driver__hpp
#include <string>
#include "../../../lib/cstring.hpp"
#include "../../../lib/utils/updateable.hpp"
#include "../../../lib/cli/driver.hpp"
namespace lib::cli::impl {
// DECLARATION lib::cli::impl::CstdioDriver
class CstdioDriver final
: public IDriver
, public tag_utils_updateable<bool>
{
public:
CstdioDriver() = default;
virtual ~CstdioDriver();
/// IDriver
void out( const cstring & line ) override;
/// tag_utils_updateable
bool update() override;
private:
static constexpr const char * COMMAND_NOT_FOUND = "Command not found or bad syntax: ";
void afterPromptChanged() override;
void redraw_input();
bool input_clear = true;
::std::string input_string;
};
} // namespace lib::cli::impl
#endif // CPPLIB__lib__impl__cli__cstdio_driver__hpp