Static Value-Flow Analysis
|
#include <CommandLine.h>
Public Types | |
typedef std::vector< OptionPossibility< T > > | OptionPossibilities |
Public Member Functions | |
OptionMultiple (std::string description, OptionPossibilities possibilities) | |
virtual bool | canSet (void) const override |
Can this option be set? | |
virtual bool | parseAndSetValue (const std::string s) override |
From a given string, set the value of this option. | |
virtual bool | isMultiple (void) const override |
Whether this option is an OptionMultiple. | |
bool | nothingSet (void) const |
If the bitset is empty. | |
bool | operator() (const T v) const |
Returns whether the value v had been set as an option. | |
Private Attributes | |
std::unordered_map< T, bool > | optionValues |
OptionPossibilities | possibilities |
Additional Inherited Members | |
Static Public Member Functions inherited from OptionBase | |
static std::vector< std::string > | parseOptions (int argc, char *argv[], std::string description, std::string callFormat) |
Protected Types inherited from OptionBase | |
typedef std::pair< std::string, std::string > | PossibilityDescription |
Name/description pairs. | |
typedef std::vector< std::pair< std::string, std::string > > | PossibilityDescriptions |
template<typename T > | |
using | OptionPossibility = std::tuple< T, std::string, std::string > |
Protected Member Functions inherited from OptionBase | |
OptionBase (std::string name, std::string description) | |
OptionBase (std::string name, std::string description, PossibilityDescriptions possibilityDescriptions) | |
virtual bool | isBool (void) const |
Static Protected Member Functions inherited from OptionBase | |
template<typename T > | |
static PossibilityDescriptions | extractPossibilityDescriptions (const std::vector< OptionPossibility< T > > possibilities) |
static std::map< std::string, OptionBase * > & | getOptionsMap (void) |
Protected Attributes inherited from OptionBase | |
std::string | name |
std::string | description |
PossibilityDescriptions | possibilityDescriptions |
For when we have possibilities like in an OptionMap. | |
Options which form a kind of bit set. There are multiple names and n of them can be set. Opt(v) tests whether v had been set, aborting if v is invalid.
Definition at line 457 of file CommandLine.h.
typedef std::vector<OptionPossibility<T> > OptionMultiple< T >::OptionPossibilities |
Definition at line 460 of file CommandLine.h.
|
inline |
Definition at line 462 of file CommandLine.h.
|
inlineoverridevirtual |
Can this option be set?
Implements OptionBase.
Definition at line 477 of file CommandLine.h.
|
inlineoverridevirtual |
Whether this option is an OptionMultiple.
Reimplemented from OptionBase.
Definition at line 497 of file CommandLine.h.
|
inline |
If the bitset is empty.
Definition at line 503 of file CommandLine.h.
|
inline |
Returns whether the value v had been set as an option.
Definition at line 514 of file CommandLine.h.
|
inlineoverridevirtual |
From a given string, set the value of this option.
Implements OptionBase.
Definition at line 482 of file CommandLine.h.
|
private |
Is the option set? Use a map rather than a set because it's now easier in one DS to determine whether something is 1) valid, and 2) set.
Definition at line 526 of file CommandLine.h.
|
private |
Definition at line 527 of file CommandLine.h.