wavelength 1.0.0
Loading...
Searching...
No Matches
option.h
Go to the documentation of this file.
1#pragma once
2
9class Option {
10public:
18 explicit Option(const char *pszName);
19
26 virtual ~Option() {
27 }
28
34 virtual void Parse(int *pnIndex) = 0;
35
37 virtual void PrintUsage() const = 0;
38
47 bool Match(int *pnIndex) const;
48
49protected:
50 const char *mName;
51};
52
58extern char **g_pCommandLineArgv;
virtual ~Option()
Release the option.
Definition option.h:26
virtual void PrintUsage() const =0
Print the option's usage line.
bool Match(int *pnIndex) const
Report whether the argument at an index names this option, and step past it when it does.
const char * mName
Definition option.h:50
Option(const char *pszName)
Construct an option of a name.
virtual void Parse(int *pnIndex)=0
Read the value that follows the option on the command line.
char ** g_pCommandLineArgv
The arguments OptionProcessor::Process() received, which the options read.