|
SST
15.1.0
StructuralSimulationToolkit
|
OptionDefinition representing options that don't require a value. More...
#include <configBase.h>
Public Member Functions | |
| OptionDefinitionNoVar (std::function< int(std::string)> operate) | |
| Constructor. More... | |
| int | parse (std::string arg) override |
| Function called to parse the option. More... | |
| void | transfer (OptionDefinition *UNUSED(def)) override |
| void | serialize (SST::Core::Serialization::serializer &UNUSED(ser)) override |
| void | to_string (std::vector< std::string > &UNUSED(out)) override |
Public Member Functions inherited from SST::OptionDefinition | |
| OptionDefinition (std::function< std::string()> ext_help) | |
| virtual void | transfer (OptionDefinition *def)=0 |
| Function called to transfer the value(s) of a separate OptionDefinition to the current OptionDefinition. More... | |
| virtual void | serialize (SST::Core::Serialization::serializer &ser)=0 |
| Function called to serialize the data in the OptionDefinition. More... | |
| virtual void | to_string (std::vector< std::string > &out)=0 |
| Adds a string representation to the input vector for each of the underlying variables. More... | |
Data Fields | |
| const std::function< int(std::string)> | operate |
| std::function that holds a pointer to the function that will either print out the information, or that is modifying a variable contained in the enclosing class. | |
Data Fields inherited from SST::OptionDefinition | |
| const std::function< std::string()> | ext_help |
| bool | set_cmdline = false |
OptionDefinition representing options that don't require a value.
This is generally used for options that only print infomation when specified (i.e. –help or –version), but can also be used if it is modifying a variable set directly in the containing class.
|
inline |
Constructor.
| operatate | Function that will be called when this Option is called on the command line |
|
inlineoverridevirtual |
Function called to parse the option.
This generally defers to an underlying std::function that is defined when the OptionDefinition is declared (see children classes). There are standard parsers found in the StandardConfigParsers namespace, and extra parsing functions can be added to the namespace by child classes, if needed.
| arg | Argument passed to the option on the command line |
Implements SST::OptionDefinition.
References operate.