hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
interactive_cli.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_CLI_INTERACTIVE_CLI_HPP
7 #define IROHA_CLI_INTERACTIVE_CLI_HPP
8 
12 
13 namespace iroha_cli {
14  namespace interactive {
15 
17  public:
27  const std::string &account_name,
28  const std::string &default_peer_ip,
29  int default_port,
30  uint64_t qry_counter,
31  const std::shared_ptr<iroha::model::ModelCryptoProvider> &provider);
35  void run();
36 
37  private:
41  void assign_main_handlers();
46  void parseMain(std::string line);
47 
51  void startQuery();
52 
56  void startTx();
57 
61  void startTxStatusRequest();
62 
63  const std::string TX_CODE = "tx";
64  const std::string QRY_CODE = "qry";
65  const std::string ST_CODE = "st";
66 
70  std::string creator_;
71 
72  // -- Query, tx cli --
74  InteractiveQueryCli query_cli_;
75  InteractiveStatusCli statusCli_;
76 
80  MenuPoints menu_points_;
81 
82  using MainHandler = void (InteractiveCli::*)();
83  std::unordered_map<std::string, MainHandler> main_handler_map_;
84  };
85 
86  } // namespace interactive
87 } // namespace iroha_cli
88 
89 #endif // IROHA_CLI_INTERACTIVE_CLI_HPP
Definition: client.cpp:16
void run()
Definition: interactive_cli.cpp:72
Definition: interactive_query_cli.hpp:25
Definition: interactive_transaction_cli.hpp:24
string(REPLACE".""/"CMAKE_SWIG_OUTDIR ${SWIG_JAVA_PKG}) else() set(CMAKE_SWIG_FLAGS"") endif() myswig_add_library(irohajava LANGUAGE java SOURCES bindings.i) unset(CMAKE_SWIG_FLAGS) swig_link_libraries(irohajava $
Definition: CMakeLists.txt:54
std::vector< std::string > MenuPoints
Definition: interactive_common_cli.hpp:60
InteractiveCli(const std::string &account_name, const std::string &default_peer_ip, int default_port, uint64_t qry_counter, const std::shared_ptr< iroha::model::ModelCryptoProvider > &provider)
Definition: interactive_cli.cpp:32
Definition: interactive_cli.hpp:16
Definition: interactive_status_cli.hpp:21