1 //! \file CommandLineParserBase.h
3 #ifndef WIKIWALKER_ACOMMANDLINEPARSER_H
4 #define WIKIWALKER_ACOMMANDLINEPARSER_H
10 //! Abstract base class for parsing command line arguments
11 class CommandLineParserBase
14 //! possible command line flags
15 enum class CommandLineOptions
{
24 //! Graphviz output option
26 //! whether to use "deep mode"
28 //! whether to skip ssl verification
32 //! virtual base class d'tor
33 virtual ~CommandLineParserBase() = default;
35 /*! Parses command line args and stores results internally.
36 * May throw an exception in case of error
37 * \param argc number of arguments
38 * \param argv arguments as passed to main
40 virtual void parse(int argc
, char** argv
) = 0;
42 /*! Query whether a specific flag was set on command line.
43 * \param flag Command line switch
44 * \return whether specified flag was set on command line
46 virtual bool hasSet(CommandLineOptions flag
) = 0;
48 /*! get argument of switch (if available)
49 * \param option command line options
50 * \returns value as string
52 virtual std::string
getValue(CommandLineOptions option
) = 0;
56 virtual void printHelp() = 0;
58 } // namespace WikiWalker
59 #endif // WIKIWALKER_ACOMMANDLINEPARSER_H