1656 {
1660
1661 list_bw->callback([this] {
1662
1666 ("table", "delband")
1667 );
1670 if ( !res.rows.empty() ) {
1671 std::cout << std::setw(13) << std::left << "Receiver" << std::setw(21) << std::left << "Net bandwidth"
1672 << std::setw(21) << std::left << "CPU bandwidth" << std::endl;
1673 for (
auto&
r : res.rows ){
1674 std::cout << std::setw(13) << std::left <<
r[
"to"].as_string()
1675 << std::setw(21) << std::left <<
r[
"net_weight"].as_string()
1676 << std::setw(21) << std::left <<
r[
"cpu_weight"].as_string()
1677 << std::endl;
1678 }
1679 } else {
1680 std::cerr << "Delegated bandwidth not found" << std::endl;
1681 }
1682 } else {
1684 }
1685 });
1686 }
App * add_subcommand(std::string subcommand_name="", std::string subcommand_description="")
Add a subcommand. Inherits INHERITABLE and OptionDefaults, and help flag.
Option * add_option(std::string option_name, callback_t option_callback, std::string option_description="", bool defaulted=false, std::function< std::string()> func={})
CRTP * required(bool value=true)
Set the option as required.
static string to_pretty_string(const variant &v, const yield_function_t &yield, const output_formatting format=output_formatting::stringify_large_ints_and_doubles)
An order-preserving dictionary of variants.
#define localized(str,...)
fc::string to_string(double)
const string get_table_func
fc::variant call(const std::string &url, const std::string &path, const T &v)