wavelength 1.0.0
Loading...
Searching...
No Matches
Option.h
Go to the documentation of this file.
1#pragma once
2
8extern char **gOptionArgv;
9
15class Option {
16public:
23 explicit Option(const char *name);
24
30 virtual ~Option();
31
37 virtual void Set(int &curArg) = 0;
38
40 virtual void PrintUsage() = 0;
41
49 bool Matches(int &curArg);
50
51protected:
52 const char *mName;
53};
char ** gOptionArgv
The arguments OptionProcessor::Process() is working through.
Command-line option an OptionProcessor matches.
Definition option.h:9
virtual ~Option()
Release the option.
Option(const char *name)
Create an option.
const char * mName
Definition option.h:50
virtual void PrintUsage()=0
Print the option's usage line.
virtual void Set(int &curArg)=0
Apply the option, consuming any value arguments after it.
bool Matches(int &curArg)
Consume the current argument when it names this option.