MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / process_commands

Method process_commands

src/Chain/libraries/cli/Cli.cpp:1101–1121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1099 }
1100
1101 void CliImpl::process_commands(std::istream* input_stream)
1102 {
1103 try {
1104 FC_ASSERT(input_stream != nullptr);
1105 _input_stream = input_stream;
1106 //force flushing to console and log file whenever input is read
1107 _input_stream->tie(_out);
1108 string line = get_line(get_prompt());
1109 while (_input_stream->good() && !_quit)
1110 {
1111
1112 if (!execute_command_line(line))
1113 break;
1114 if (!_quit)
1115 line = get_line(get_prompt());
1116 } // while cin.good
1117 wlog("process commands exiting");
1118 } FC_CAPTURE_AND_RETHROW()
1119 }
1120
1121 } // end namespace detail
1122
1123 Cli::Cli(thinkyoung::client::Client* client, std::istream* command_script, std::ostream* output_stream)
1124 :my(new detail::CliImpl(client, command_script, output_stream))

Callers 1

execute_scriptMethod · 0.80

Calls 3

get_lineFunction · 0.70
get_promptFunction · 0.70
goodMethod · 0.45

Tested by

no test coverage detected