void monitor_plugin::plugin_set_program_options(
   boost::program_options::options_description& command_line_options,
   boost::program_options::options_description& config_file_options)
{
   command_line_options.add_options()
         (MONITOR_OPT_ACTION_TYPE, boost::program_options::value<uint32_t>(), "The type of operation monitored")
         ;
   config_file_options.add(command_line_options);
}
Example #2
1
// Initialize the arguments configuration
po::variables_map initArgumentsConfig(po::options_description &usageDescription, int argc, char** argv) {
    usageDescription.add_options()("help,h", "display help message\n")
                                  ("input-file,i", po::value<std::string>(), "provide the path to the input file\n")
                                  ("output-file,o",po::value<std::string>(), "provide the path of the output file (without extension)\n");

    po::variables_map vm;
    po::store(po::parse_command_line(argc, argv, usageDescription), vm);
    po::notify(vm);
    return vm;
}
Example #3
0
void DaemonCommand::InitParameters(boost::program_options::options_description& visibleDesc,
    boost::program_options::options_description& hiddenDesc) const
{
	visibleDesc.add_options()
		("config,c", po::value<std::vector<std::string> >(), "parse a configuration file")
		("no-config,z", "start without a configuration file")
		("validate,C", "exit after validating the configuration")
		("errorlog,e", po::value<std::string>(), "log fatal errors to the specified log file (only works in combination with --daemonize)")
#ifndef _WIN32
		("daemonize,d", "detach from the controlling terminal")
#endif /* _WIN32 */
	;

#ifndef _WIN32
	hiddenDesc.add_options()
		("reload-internal", po::value<int>(), "used internally to implement config reload: do not call manually, send SIGHUP instead");
#endif /* _WIN32 */
}
Example #4
0
void twitter_add_options(po::options_description & desc){
  desc.add_options()
    ("twitter_auth", po::value<std::string>(),
     "twitter username:password")
    ("twitter_location", po::value<std::string>(),
     "a twitter location spec, as a bounding box or boxes")
    ("twitter_extra", po::value<std::string>(),
     "any extra arguments for the Twitter streaming search");
}
/// \brief Add this block's options to the provided options_description
void cath_assign_domains_options_block::do_add_visible_options_to_description(po::options_description &arg_desc ///< The options_description to which the options are added
                                                                    ) {
	const string default_forbidden_nodes_str = join( DEFAULT_FORBIDDEN_NODES, ", " );
	arg_desc.add_options()
		( PO_SVMLIGHT_RBF_FILE.c_str(), po::value<path   >( &rbf_svm_file    ),                                                                        "File containing SVM-light RBF model for CATH assignment" )
		( PO_FILELIST_FILE.c_str(),     po::value<path   >( &data_data_file  ),                                                                        "File of data files (one line per query domain containing: ssap_results_file prc_results_file)" )
		( PO_SF_OF_DOMAIN_FILE.c_str(), po::value<path   >( &sf_of_dom_file  ),                                                                        "File containing up-to-date assignments (one line per domain containing: domain_id superfamily_id)" )
		( PO_FORBIDDEN_NODES.c_str(),   po::value<str_vec>( &forbidden_nodes )->default_value( DEFAULT_FORBIDDEN_NODES, default_forbidden_nodes_str ), "List of nodes to which automatic assignment is forbidden; specify option multiple times for multiple nodes\nRECOMMENDED: do not specify this option so that the default list of propeller architectures is used." )
		;
}
void BlackAndWhitelistCommand::InitParameters(boost::program_options::options_description& visibleDesc,
    boost::program_options::options_description& hiddenDesc) const
{
	if (m_Command == BlackAndWhitelistCommandAdd || m_Command == BlackAndWhitelistCommandRemove) {
		visibleDesc.add_options()
			("zone", po::value<std::string>(), "The name of the zone")
			("host", po::value<std::string>(), "The name of the host")
			("service", po::value<std::string>(), "The name of the service");
	}
}
    command_line_options_parser() : desc("command-line-options") {
      desc.add_options()
	("help,h", "Display this message of command line options and exit")
	("version", "Display the application version and exit")
	("verbose,v",
	 "Include more details of builds and status. By default a count of builds in each 'state' is printed to the console. "
	 "Verbose output prints the status of each build and the causes of any failures.")
	("threshold", boost::program_options::value<int>()->default_value(6), "Threshold for duplicate discovery (default is 6)")
	("input-files",  boost::program_options::value<vector<string>>(), "paths to scan for duplicates.");
    }
Example #8
0
	void DescribeCommand::addOptions(po::options_description &options, po::options_description &hidden_options)
	{
		m_target.addOptions(options, hidden_options);
		options.add_options()
			("set-manufacturer,m", po::value<string>(&m_manufacturer), "set manufacturer string")
			("set-product,p", po::value<string>(&m_product), "set product string")
			("set-vendor-id", po::value<HexOption<uint16_t>>(&m_vendor_id), "set vendor ID")
			("set-product-id", po::value<HexOption<uint16_t>>(&m_product_id), "set product ID")
		;
	}
Example #9
0
void PKISaveCertCommand::InitParameters(boost::program_options::options_description& visibleDesc,
	boost::program_options::options_description& hiddenDesc) const
{
	visibleDesc.add_options()
		("key", po::value<std::string>(), "Key file path (input), obsolete")
		("cert", po::value<std::string>(), "Certificate file path (input), obsolete")
		("trustedcert", po::value<std::string>(), "Trusted certificate file path (output)")
		("host", po::value<std::string>(), "Icinga 2 host")
		("port", po::value<std::string>()->default_value("5665"), "Icinga 2 port");
}
Example #10
0
void account_history_plugin::plugin_set_program_options(
   boost::program_options::options_description& cli,
   boost::program_options::options_description& cfg
   )
{
   cli.add_options()
         ("track-account", boost::program_options::value<std::vector<std::string>>()->composing()->multitoken(), "Account ID to track history for (may specify multiple times)")
         ;
   cfg.add(cli);
}
void TroubleshootCommand::InitParameters(boost::program_options::options_description& visibleDesc,
	boost::program_options::options_description& hiddenDesc) const
{
	visibleDesc.add_options()
		("console,c", "print to console instead of file")
		("output,o", boost::program_options::value<std::string>(), "path to output file")
		("include-objects", "Print the whole objectfile (like `object list`)")
		("include-vars", "Print all Variables (like `variable list`)")
		;
}
Example #12
0
  void addGeneric(po::options_description& o) {
    o.add_options()
      ("blocks", po::value<string>(&blocks_spec), "Block sizes (MATLAB style range)")
      ("steps", po::value<uint>(&nsteps)->default_value(25), "Max number of blocks for auto-ranging")
      ("reps", po::value<uint>(&nreps)->default_value(20), "Number of replicates for bootstrap")
      ("local", po::value<bool>(&local_average)->default_value(true), "Use local avg in block PCA rather than global")
      ("gold", po::value<string>(&gold_standard_trajectory_name)->default_value(""), "Use this trajectory for the gold-standard instead");


  }
 void attach_option(const std::string& option,
                    T* ret_cont,
                    const std::string& description) {
   namespace boost_po = boost::program_options;
   assert(ret_cont != NULL);
   desc.add_options()
     (option.c_str(), 
      boost_po::value<T>(ret_cont), 
      description.c_str());
 }
	WolfwizardOptionStruct()
		:fopt("Options")
	{
		fopt.add_options()
			( "version,v", "print version" )
			( "help,h", "print help message" )
			( "config", po::value<std::string>(), "specify configuration file to load" )
			;
		popt.add( "cmd", 1);
	}
Example #15
0
void MeshData::setProgramOptions(boost::program_options::options_description &option_desc,
    boost::program_options::positional_options_description &option_pos)
{
  option_desc.add_options()
      ("block,b", po::value<std::string>(&blockName),"name of the data block to read from the SDF file")
      ("input,i", po::value<std::string>(&inputName),"name of the SDF file")
      ("cfd,d", "read data from old CFD files instead of SDF files");

  option_pos.add("block", 1);
  option_pos.add("input", 2);
}
Example #16
0
 void addGeneric(po::options_description& o) {
   o.add_options()
     ("skip,k", po::value<uint>(&skip)->default_value(0), "Number of frames to skip")
     ("stderr", po::value<bool>(&use_stderr)->default_value(false), "Report stderr rather than stddev")
     ("blow", po::value<double>(&length_low)->default_value(1.5), "Low cutoff for bond length")
     ("bhi", po::value<double>(&length_high)->default_value(3.0), "High cutoff for bond length")
     ("angle", po::value<double>(&max_angle)->default_value(30.0), "Max bond angle deviation from linear")
     ("periodic", po::value<bool>(&use_periodicity)->default_value(false), "Use periodic boundary")
     ("name,N", po::value< vector<string> >(&acceptor_names), "Name of an acceptor selection (required)")
     ("acceptor,S", po::value< vector<string> >(&acceptor_selections), "Acceptor selection (required)");
 }
Example #17
0
void
AddParamOptions( po::options_description& params)
{
    params.add_options()
    ("filter",po::value<std::string>(&argFilter),"\tPossible values for filter are\n"
     "active - all certificates which are active\n"
     "revoked - lists all revoked certificates\n"
     //"expired - all certificates which are expired\n"
     "all - lists all certificates\n"
    );
}
Example #18
0
void snapshot_plugin::plugin_set_program_options(
   boost::program_options::options_description& command_line_options,
   boost::program_options::options_description& config_file_options)
{
   command_line_options.add_options()
         (OPT_BLOCK_NUM, bpo::value<uint32_t>(), "Block number after which to do a snapshot")
         (OPT_BLOCK_TIME, bpo::value<string>(), "Block time (ISO format) after which to do a snapshot")
         (OPT_DEST, bpo::value<string>(), "Pathname of JSON file where to store the snapshot")
         ;
   config_file_options.add(command_line_options);
}
Example #19
0
void addStdOutputOptions(boost::program_options::options_description &desc)
{
  using namespace boost::program_options;
  desc.add_options()
    ("help", "Produce this help message")
    ("freq", value<double>(), "Frequency at which to compute the absorption (GHz)")
    ("fmin", value<double>(), "The starting frequency (GHz) of a frequency grid (incompatible with --freq)")
    ("fmax", value<double>(), "The end frequency (GHz) of a frequency grid (incompatible with --freq)")
    ("fstep", value<double>(), "The frequency step (GHz) of a frequency grid (incompatible with --freq)")
    ;  
}
Example #20
0
void get_options( po::options_description& desc )
{
    desc.add_options( )
        ("help,?",   "help message")
        ("server,s", po::value<std::vector< std::string> >( ),
                     "endpoint name; <tcp address>:<port> or <pipe/file name>")

        ("io-pool-size,i",  po::value<unsigned>( ), "threads for io operations"
                                                    "; default = 1")
        ;
}
Example #21
0
void ConsoleCommand::InitParameters(boost::program_options::options_description& visibleDesc,
	boost::program_options::options_description& hiddenDesc) const
{
	visibleDesc.add_options()
		("connect,c", po::value<std::string>(), "connect to an Icinga 2 instance")
		("eval,e", po::value<std::string>(), "evaluate expression and terminate")
		("file,r", po::value<std::string>(), "evaluate a file and terminate")
		("syntax-only", "only validate syntax (requires --eval or --file)")
		("sandbox", "enable sandbox mode")
	;
}
Example #22
0
void add_graphics_platform_options(boost::program_options::options_description& config)
{
    mir::assert_entry_point_signature<mg::AddPlatformOptions>(&add_graphics_platform_options);
    config.add_options()
        (vt_option_name,
         boost::program_options::value<int>()->default_value(0),
         "[platform-specific] VT to run on or 0 to use current.")
        (bypass_option_name,
         boost::program_options::value<bool>()->default_value(true),
         "[platform-specific] utilize the bypass optimization for fullscreen surfaces.");
}
Example #23
0
void account_history_plugin::plugin_set_program_options(
   boost::program_options::options_description& cli,
   boost::program_options::options_description& cfg
   )
{
   cli.add_options()
         ("track-account-range", boost::program_options::value<std::vector<std::string>>()->composing()->multitoken(), "Defines a range of accounts to track as a json pair [\"from\",\"to\"] [from,to]")
         ("filter-posting-ops", "Ignore posting operations, only track transfers and account updates")
         ;
   cfg.add(cli);
}
 command_line_options(const std::string& desc_str = "A GraphLab program.",
                      size_t default_ncpus = 6,
                      const std::string default_engine = "async",
                      const std::string default_scope = "vertex",
                      const std::string default_scheduler = "fifo") : desc(desc_str) {
   ncpus = default_ncpus;
   engine_type = default_engine;
   scope_type = default_scope;
   scheduler_type = default_scheduler;
   // Add documentation for help
   desc.add_options()("help", "Print this help message.");
 } // End constructor
Example #25
0
FrontendExtension::flagHandler IclHostExtension::registerFlag(boost::program_options::options_description& options) {
    //register omp flag
    options.add_options()("flib-icl", boost::program_options::value<bool>(&flagActivated)->implicit_value(true), "Lib ICL support");
    //create lambda
    auto lambda = [&](const ConversionJob& job) {
        if(!flagActivated)
            return false;
        iclJobIncludeDirs = job.getIncludeDirectories();
        return true;
    };
    return lambda;
}
void PKIRequestCommand::InitParameters(boost::program_options::options_description& visibleDesc,
    boost::program_options::options_description& hiddenDesc) const
{
	visibleDesc.add_options()
	    ("key", po::value<std::string>(), "Key file path (input)")
	    ("cert", po::value<std::string>(), "Certificate file path (input + output)")
	    ("ca", po::value<std::string>(), "CA file path (output)")
	    ("trustedcert", po::value<std::string>(), "Trusted certificate file path (input)")
	    ("host", po::value<std::string>(), "Icinga 2 host")
	    ("port", po::value<std::string>(), "Icinga 2 port")
	    ("ticket", po::value<std::string>(), "Icinga 2 PKI ticket");
}
Example #27
0
void add_graphics_platform_options(
    boost::program_options::options_description& config)
{
    mir::assert_entry_point_signature<mg::AddPlatformOptions>(&add_graphics_platform_options);
    config.add_options()
        (hwc_log_opt,
         boost::program_options::value<std::string>()->default_value(std::string{mo::off_opt_value}),
         "[platform-specific] How to handle the HWC logging report. [{log,off}]")
        (hwc_overlay_opt,
         boost::program_options::value<bool>()->default_value(false),
         "[platform-specific] Whether to disable overlay optimizations [{on,off}]");
    mga::DeviceQuirks::add_options(config);
}
Example #28
0
void options_cmd::get_description_cmd(po::options_description& desc, po::positional_options_description& pd)
{
    tara::api::options::get_description(desc, pd);
    desc.add_options()
    ("help,h", "produce help message")
    ("input,i", po::value(&input_file), "file to process")
    ("config,c", po::value<string>(), "a config file to parse")
    ("mode,o", po::value<string>()->default_value("seperate"), "selects the mode of operation (\"seperate\",\"as\",\"synthesis\",\"bugs\")")
    ("ofile,f", po::bool_switch(&output_to_file), "append the output to the end of the input file")
    ("metric", po::bool_switch(&output_metric), "outputs statistics about the run")
    ;
    pd.add("input", 1);
}
Example #29
0
    void CmdLine::addGlobalOptions( boost::program_options::options_description& general , 
                                    boost::program_options::options_description& hidden ){
        /* support for -vv -vvvv etc. */
        for (string s = "vv"; s.length() <= 12; s.append("v")) {
            hidden.add_options()(s.c_str(), "verbose");
        }
        
        general.add_options()
            ("help,h", "show this usage information")
            ("version", "show version information")
            ("config,f", po::value<string>(), "configuration file specifying additional options")
            ("verbose,v", "be more verbose (include multiple times for more verbosity e.g. -vvvvv)")
            ("quiet", "quieter output")
            ("port", po::value<int>(&cmdLine.port), "specify port number")
            ("logpath", po::value<string>() , "file to send all output to instead of stdout" )
            ("logappend" , "append to logpath instead of over-writing" )
#ifndef _WIN32
            ("fork" , "fork server process" )
#endif
            ;
        
    }
void PSSMLTRendererConfig::DefineOptions( boost::program_options::options_description& opt )
{
	namespace po = boost::program_options;

	opt.add_options()
		("num-mutations", po::value<int>(), "Number of mutations per task")
		("num-seed-samples", po::value<int>(), "Number of mutations per thread")
		("rr-depth", po::value<int>(), "Depth to enable RR for path termination")
		("large-step-prob", po::value<double>(), "Large step mutation probability")
		("estimator-mode", po::value<std::string>(), "Estimator mode (normal, mvs, mvs-mis")
		("kernel-size-s1", po::value<double>(), "Minimum kernel size")
		("kernel-size-s2", po::value<double>(), "Maximum kernel size");
}