Electroneum
Loading...
Searching...
No Matches
epee::console_handlers_binder Class Reference

#include <console_handler.h>

Inheritance diagram for epee::console_handlers_binder:
Collaboration diagram for epee::console_handlers_binder:

Public Member Functions

bool start_handling (std::function< std::string(void)> prompt, const std::string &usage_string="", std::function< void(void)> exit_handler=NULL)
bool start_handling (const std::string &prompt, const std::string &usage_string="", std::function< void(void)> exit_handler=NULL)
void stop_handling ()
bool run_handling (std::function< std::string(void)> prompt, const std::string &usage_string, std::function< void(void)> exit_handler=NULL)
void print_prompt ()
Public Member Functions inherited from epee::command_handler
std::string get_usage ()
std::pair< std::string, std::string > get_documentation (const std::vector< std::string > &cmd)
void set_handler (const std::string &cmd, const callback &hndlr, const std::string &usage="", const std::string &description="")
bool process_command_vec (const std::vector< std::string > &cmd)
bool process_command_str (const std::string &cmd)

Additional Inherited Members

Public Types inherited from epee::command_handler
typedef boost::function< bool(const std::vector< std::string > &)> callback
typedef std::map< std::string, std::pair< callback, std::pair< std::string, std::string > > > lookup

Detailed Description

Definition at line 543 of file console_handler.h.

Member Function Documentation

◆ print_prompt()

void epee::console_handlers_binder::print_prompt ( )
inline

Definition at line 571 of file console_handler.h.

572 {
573 m_console_handler.print_prompt();
574 }

◆ run_handling()

bool epee::console_handlers_binder::run_handling ( std::function< std::string(void)> prompt,
const std::string & usage_string,
std::function< void(void)> exit_handler = NULL )
inline

Definition at line 566 of file console_handler.h.

567 {
568 return m_console_handler.run(std::bind(&console_handlers_binder::process_command_str, this, std::placeholders::_1), prompt, usage_string, exit_handler);
569 }
bool process_command_str(const std::string &cmd)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ start_handling() [1/2]

bool epee::console_handlers_binder::start_handling ( const std::string & prompt,
const std::string & usage_string = "",
std::function< void(void)> exit_handler = NULL )
inline

Definition at line 556 of file console_handler.h.

557 {
558 return start_handling([prompt](){ return prompt; }, usage_string, exit_handler);
559 }
bool start_handling(std::function< std::string(void)> prompt, const std::string &usage_string="", std::function< void(void)> exit_handler=NULL)
Here is the call graph for this function:

◆ start_handling() [2/2]

bool epee::console_handlers_binder::start_handling ( std::function< std::string(void)> prompt,
const std::string & usage_string = "",
std::function< void(void)> exit_handler = NULL )
inline

Definition at line 550 of file console_handler.h.

551 {
552 m_console_thread.reset(new boost::thread(boost::bind(&console_handlers_binder::run_handling, this, prompt, usage_string, exit_handler)));
553 m_console_thread->detach();
554 return true;
555 }
bool run_handling(std::function< std::string(void)> prompt, const std::string &usage_string, std::function< void(void)> exit_handler=NULL)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ stop_handling()

void epee::console_handlers_binder::stop_handling ( )
inline

Definition at line 561 of file console_handler.h.

562 {
563 m_console_handler.stop();
564 }

The documentation for this class was generated from the following file:
  • /home/abuild/rpmbuild/BUILD/electroneum-5.1.3.1-build/electroneum-5.1.3.1/contrib/epee/include/console_handler.h