|
SST
15.1.0
StructuralSimulationToolkit
|
Base class for defining options available in the various config classes. More...
#include <configBase.h>
Public Member Functions | |
| OptionDefinition (std::function< std::string()> ext_help) | |
| virtual int | parse (std::string arg)=0 |
| Function called to parse the option. More... | |
| 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< std::string()> | ext_help |
| bool | set_cmdline = false |
Base class for defining options available in the various config classes.
This class and its children encapsulates the value, parsing function, extended help function and name. There are also virtual functions that allow the Config* classes to operate on the options without having to know the type of the underlying data.
|
pure virtual |
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 |
Implemented in SST::OptionDefinitionPair< T, U >, SST::OptionDefinitionImpl< T >, and SST::OptionDefinitionNoVar.
|
pure virtual |
Function called to serialize the data in the OptionDefinition.
| ser | Serializer used to serialize the data |
Implemented in SST::OptionDefinitionPair< T, U >, and SST::OptionDefinitionImpl< T >.
|
pure virtual |
Adds a string representation to the input vector for each of the underlying variables.
Format is variable = value. If there are no underlying variables, nothing will be added.
| [out] | out | vector to put the output strings in |
Implemented in SST::OptionDefinitionPair< T, U >, and SST::OptionDefinitionImpl< T >.
|
pure virtual |
Function called to transfer the value(s) of a separate OptionDefinition to the current OptionDefinition.
| def | OptionDefinition to copy value(s) from |
Implemented in SST::OptionDefinitionPair< T, U >, and SST::OptionDefinitionImpl< T >.