32#ifndef RCSC_PARAM_CMD_LINE_PARSER_H
33#define RCSC_PARAM_CMD_LINE_PARSER_H
53 std::list< std::string > M_args;
56 std::vector< std::string > M_positional_options;
59 std::vector< std::string > M_parsed_option_names;
71 const char *
const * argv );
92 void parsePositional();
100 const std::list< std::string > &
args()
const
111 return M_args.size() != M_positional_options.size();
120 return M_positional_options;
129 return M_parsed_option_names;
137 std::size_t
count(
const std::string & option_name )
const;
144 std::ostream &
print( std::ostream & os )
const;
153 const char sep )
const;
command line parser
Definition: cmd_line_parser.h:49
CmdLineParser(const std::list< std::string > &args)
construct with original command line arguments
bool parse(ParamMap ¶m_map) override
analyze arguments and results are stored to parameter map
std::ostream & printOptionNameArgs(std::ostream &os, const char sep) const
put the remained argments stated with '-'.
CmdLineParser(const int argc, const char *const *argv)
construct with original command line arguments
std::ostream & print(std::ostream &os) const
put the stored arguments to the output stream
const std::vector< std::string > & positionalOptions() const
get the positional arguments
Definition: cmd_line_parser.h:118
const std::vector< std::string > & parsedOptionNames() const
get the parsed option names
Definition: cmd_line_parser.h:127
std::size_t count(const std::string &option_name) const
get the number of the parsed option name
bool failed() const
check if all arguments are successfully parsed.
Definition: cmd_line_parser.h:109
const std::list< std::string > & args() const
get the stored arguments
Definition: cmd_line_parser.h:100
parameter container
Definition: param_map.h:484
abstract parameter paraser class
Definition: param_parser.h:43
abstract parameter parser Header File