Static Value-Flow Analysis
|
#include <CommandLine.h>
Public Member Functions | |
Option (const std::string &name, const std::string &description, T init) | |
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 | isBool (void) const override |
void | setValue (T v) |
T | operator() (void) const |
Static Private Member Functions | |
static bool | fromString (const std::string &s, bool &value) |
static bool | fromString (const std::string s, std::string &value) |
static bool | fromString (const std::string s, u32_t &value) |
Private Attributes | |
bool | isExplicitlySet |
T | value |
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 | isMultiple (void) const |
Whether this option is an OptionMultiple. | |
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. | |
General -name=value options. Retrieve value by Opt().
Definition at line 325 of file CommandLine.h.
|
inline |
Definition at line 328 of file CommandLine.h.
|
inlineoverridevirtual |
|
inlinestaticprivate |
Definition at line 363 of file CommandLine.h.
|
inlinestaticprivate |
Definition at line 375 of file CommandLine.h.
|
inlinestaticprivate |
Definition at line 382 of file CommandLine.h.
|
inlineoverridevirtual |
Whether this option represents a boolean. Important as such arguments don't require a value.
Reimplemented from OptionBase.
Definition at line 346 of file CommandLine.h.
|
inline |
Definition at line 356 of file CommandLine.h.
|
inlineoverridevirtual |
From a given string, set the value of this option.
Implements OptionBase.
Definition at line 340 of file CommandLine.h.
|
inline |
Definition at line 351 of file CommandLine.h.
|
private |
Definition at line 402 of file CommandLine.h.
|
private |
Definition at line 403 of file CommandLine.h.