Class CmdLineInterface
Defined in File cmd_line_interface.hpp
Inheritance Relationships
Derived Type
public ecl::CmdLine
(Class CmdLine)
Class Documentation
-
class CmdLineInterface
Managing interface for The base class that manages the command line definition and passes along the parsing to the appropriate Arg classes.
Subclassed by ecl::CmdLine
Public Functions
-
inline virtual ~CmdLineInterface()
Destructor
-
virtual void add(Arg &a) = 0
Adds an argument to the list of arguments to be parsed.
- Parameters:
a – - Argument to be added.
-
virtual void add(Arg *a) = 0
An alternative add. Functionally identical.
- Parameters:
a – - Argument to be added.
-
virtual void xorAdd(Arg &a, Arg &b) = 0
Add two Args that will be xor’d. If this method is used, add does not need to be called.
- Parameters:
a – - Argument to be added and xor’d.
b – - Argument to be added and xor’d.
-
virtual void xorAdd(std::vector<Arg*> &xors) = 0
Add a list of Args that will be xor’d. If this method is used, add does not need to be called.
- Parameters:
xors – - List of Args to be added and xor’d.
-
virtual void parse(int argc, char **argv) = 0
Parses the command line.
- Parameters:
argc – - Number of arguments.
argv – - Array of arguments.
-
virtual CmdLineOutput *getOutput() = 0
Returns the CmdLineOutput object.
-
virtual void setOutput(CmdLineOutput *co) = 0
- Parameters:
co – - CmdLineOutput object that we want to use instead.
-
virtual std::string &getVersion() = 0
Returns the version string.
-
virtual std::string &getProgramName() = 0
Returns the program name string.
-
virtual XorHandler &getXorHandler() = 0
Returns the XorHandler.
-
virtual char getDelimiter() = 0
Returns the delimiter string.
-
virtual std::string &getMessage() = 0
Returns the message string.
-
virtual bool hasHelpAndVersion() = 0
Indicates whether or not the help and version switches were created automatically.
-
inline virtual ~CmdLineInterface()