21#ifndef mia_core_cmdlineparser_hh
22#define mia_core_cmdlineparser_hh
106 const char *
long_help,
const char *short_help,
109 virtual bool do_set_value(
const char *str_value);
110 virtual size_t do_get_needed_args()
const;
111 virtual void do_write_value(std::ostream& os)
const;
112 virtual void do_get_long_help(std::ostream& os)
const;
113 virtual const std::string do_get_value_as_string()
const;
189 __attribute__((warn_unused_result));
204 __attribute__((warn_unused_result));
245 EHelpRequested do_parse(
size_t argc,
const char *args[],
bool has_additional,
247 __attribute__((warn_unused_result));
248 int handle_shortargs(
const char *arg,
size_t argc,
const char *args[]);
249 struct CCmdOptionListData *m_impl;
297 const char *long_opt,
char short_opt,
339 const char *long_opt,
char short_opt,
const char *help)
363 char short_opt,
const char *long_help,
364 const char *short_help,
405 const char *long_opt,
char short_opt,
435PCmdOption make_opt(
typename std::shared_ptr<T>& value,
const char *default_value,
const char *long_opt,
436 char short_opt,
const char *help,
440 typedef typename FactoryTrait<T>::type F;
464PCmdOption make_opt(
typename std::unique_ptr<T>& value,
const char *default_value,
const char *long_opt,
468 typedef typename FactoryTrait<T>::type F;
const mia::SProgramDescription description
Command line option that translates a string to a set of flags.
CCmdFlagOption(int &val, const CFlagString &map, char short_opt, const char *long_opt, const char *long_help, const char *short_help, CCmdOptionFlags flags=CCmdOptionFlags::none)
The class to hold the list of options.
EHelpRequested parse(size_t argc, char *args[], const std::string &additional_type, const CPluginHandlerBase *additional_help=NULL) __attribute__((warn_unused_result))
EHelpRequested parse(size_t argc, const char *args[], const std::string &additional_type, const CPluginHandlerBase *additional_help=NULL) __attribute__((warn_unused_result))
void add_selftest(int &test_result, CSelftestCallback *callback)
CCmdOptionList(const SProgramDescription &description)
EHelpRequested parse(size_t argc, const char *args[]) __attribute__((warn_unused_result))
CHistoryRecord get_values() const
void add(const std::string &group, PCmdOption opt)
const std::vector< std::string > & get_remaining() const
EHelpRequested parse(size_t argc, char *args[]) __attribute__((warn_unused_result))
void set_group(const std::string &group)
void set_stdout_is_result()
void set_logstream(std::ostream &os)
The base class for all command line options.
const char * long_help() const
command line option that handles a parameter
The base class for all plugin handlers.
A parameter that can only assume values out of a limited set.
Generic type of a complex paramter.
A mapper from emums to string values. - usefull for names flags.
A parameter that get's initialized by a factory to a shared or unique pointer.
const std::map< EProgramDescriptionEntry, const char * > g_DescriptionEntryNames
std::pair< std::string, CHistoryRecord > CHistoryEntry
EXPORT_CORE const char * g_help_optiongroup
the string defining the name of the help options
std::map< std::string, std::string > CHistoryRecord
std::shared_ptr< CCmdOption > PCmdOption
a shared pointer definition of the Option
#define NS_MIA_BEGIN
conveniance define to start the mia namespace
#define EXPORT_CORE
Macro to manage Visual C++ style dllimport/dllexport.
#define NS_MIA_END
conveniance define to end the mia namespace
EProgramDescriptionEntry
program description entry identifiers
PCmdOption make_opt(T &value, const char *long_opt, char short_opt, const char *help, CCmdOptionFlags flags=CCmdOptionFlags::none)
Create a standard option that sets a value of the give type.
std::map< EProgramDescriptionEntry, const char * > SProgramDescription
the map that holds a basic program description
EParameterBounds
Scalar parameter with an expected value range.