#include <console_handler.h>
|
| | async_console_handler () |
| |
| template<class t_server , class chain_handler > |
| bool | run (t_server *psrv, chain_handler ch_handler, std::function< std::string(void)> prompt, const std::string &usage="") |
| |
| template<class chain_handler > |
| bool | run (chain_handler ch_handler, std::function< std::string(void)> prompt, const std::string &usage="", std::function< void(void)> exit_handler=NULL) |
| |
| void | stop () |
| |
| void | print_prompt () |
| |
Definition at line 290 of file console_handler.h.
◆ async_console_handler()
| epee::async_console_handler::async_console_handler |
( |
| ) |
|
|
inline |
◆ print_prompt()
| void epee::async_console_handler::print_prompt |
( |
| ) |
|
|
inline |
Definition at line 315 of file console_handler.h.
321 std::string color_prompt =
"\001\033[1;33m\002" + prompt;
322 if (
' ' != prompt.back())
324 color_prompt +=
"\001\033[0m\002";
325 m_stdin_reader.get_readline_buffer().set_prompt(color_prompt);
329 if (
' ' != prompt.back())
void reset_console_color()
void set_console_color(int color, bool bright)
◆ run() [1/2]
template<class t_server , class chain_handler >
| bool epee::async_console_handler::run |
( |
t_server * |
psrv, |
|
|
chain_handler |
ch_handler, |
|
|
std::function< std::string(void)> |
prompt, |
|
|
const std::string & |
usage = "" |
|
) |
| |
|
inline |
Definition at line 298 of file console_handler.h.
300 return run(prompt, usage, [&](
const std::string& cmd) {
return ch_handler(psrv, cmd); }, [&] { psrv->send_stop_signal(); });
bool run(t_server *psrv, chain_handler ch_handler, std::function< std::string(void)> prompt, const std::string &usage="")
◆ run() [2/2]
template<class chain_handler >
| bool epee::async_console_handler::run |
( |
chain_handler |
ch_handler, |
|
|
std::function< std::string(void)> |
prompt, |
|
|
const std::string & |
usage = "", |
|
|
std::function< void(void)> |
exit_handler = NULL |
|
) |
| |
|
inline |
Definition at line 304 of file console_handler.h.
306 return run(prompt, usage, [&](
const std::string& cmd) {
return ch_handler(cmd); }, exit_handler);
bool run(t_server *psrv, chain_handler ch_handler, std::function< std::string(void)> prompt, const std::string &usage="")
◆ stop()
| void epee::async_console_handler::stop |
( |
| ) |
|
|
inline |
The documentation for this class was generated from the following file:
- /home/abuild/rpmbuild/BUILD/electroneum-5.0.0.4/contrib/epee/include/console_handler.h