|
| | OptionDefinitionPair (std::string name1, T val1, std::string name2, U val2, std::function< int(T &, U &, std::string)> parser) |
| | Constructor. More...
|
| |
| | OptionDefinitionPair (std::string name1, T val1, std::string name2, U val2, std::function< int(T &, U &, std::string)> parser, std::function< std::string()> ext_help) |
| | Constructor. More...
|
| |
|
| OptionDefinitionPair (const OptionDefinitionPair &)=delete |
| |
|
| OptionDefinitionPair (OptionDefinitionPair &&)=default |
| |
| int | parse (std::string arg) override |
| | Function called to parse the option. More...
|
| |
| void | transfer (OptionDefinition *def) override |
| | Function called to transfer the value(s) of a separate OptionDefinition to the current OptionDefinition. More...
|
| |
| void | serialize (SST::Core::Serialization::serializer &ser) override |
| | Function called to serialize the data in the OptionDefinition. More...
|
| |
| void | to_string (std::vector< std::string > &out) override |
| | Adds a string representation to the input vector for each of the underlying variables. More...
|
| |
|
| OptionDefinition (std::function< std::string()> ext_help) |
| |
template<typename T, typename U>
struct SST::OptionDefinitionPair< T, U >
Class use to represent OptionDefinitions that need to store two values.
The class is templated on the types of the stored data.
NOTE: This class should be created using the DECL_OPTION_PAIR macro, which will also create accessor functions the two underlying data types.
template<typename T, typename U>
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.
- Parameters
-
| arg | Argument passed to the option on the command line |
Implements SST::OptionDefinition.