libopenfpga/libopenfpgashell/src/command_echo.cpp
/*********************************************************************
 * Print all the options that are defined in an object Command
 * This function is mainly used to create help desk for a command
 ********************************************************************/
Print all the options that are defined in an object Command
This function is mainly used to create help desk for a command
Print all the options that are defined in an object Command This function is mainly used to create help desk for a command
void print_command_options(const Command& cmd) {
  VTR_LOG("Command '%s' usage:\n%lu options available\n",
          cmd.name().c_str(), cmd.options().size());
  for (const CommandOptionId& opt : cmd.options()) {
    if (true == cmd.option_short_name(opt).empty()) {
      VTR_LOG("\t--%s : %s\n",
              cmd.option_name(opt).c_str(),
              cmd.option_description(opt).c_str());
      continue;
    } 
    VTR_LOG("\t--%s, -%s : %s\n",
            cmd.option_name(opt).c_str(),
            cmd.option_short_name(opt).c_str(),
            cmd.option_description(opt).c_str());
  } 
}
void print_command_options ( const Command & cmd ) { VTR_LOG ( " \n \n " , cmd . name ( ) . c_str ( ) , cmd . options ( ) . size ( ) ) ; for ( const CommandOptionId & opt : cmd . options ( ) ) { if ( true == cmd . option_short_name ( opt ) . empty ( ) ) { VTR_LOG ( " \t \n " , cmd . option_name ( opt ) . c_str ( ) , cmd . option_description ( opt ) . c_str ( ) ) ; continue ; } VTR_LOG ( " \t \n " , cmd . option_name ( opt ) . c_str ( ) , cmd . option_short_name ( opt ) . c_str ( ) , cmd . option_description ( opt ) . c_str ( ) ) ; } }
Print all the options that are defined in an object Command
 This function is mainly used to create help desk for a command
Print all the options that are defined in an object Command This function is mainly used to create help desk for a command