12 #ifndef MLPACK_BINDINGS_GOLANG_GO_OPTION_HPP 13 #define MLPACK_BINDINGS_GOLANG_GO_OPTION_HPP 50 const std::string& identifier,
51 const std::string& description,
52 const std::string& alias,
53 const std::string& cppName,
54 const bool required =
false,
55 const bool input =
true,
56 const bool noTranspose =
false,
57 const std::string& =
"")
62 data.
desc = description;
63 data.
name = identifier;
65 data.
alias = alias[0];
72 if (identifier ==
"verbose" )
78 data.
value = boost::any(defaultValue);
81 if (identifier !=
"verbose" )
89 &GetPrintableParam<T>;
95 &PrintModelUtilCPP<T>;
106 &PrintOutputProcessing<T>;
108 &PrintMethodConfig<T>;
114 &PrintInputProcessing<T>;
121 if (identifier !=
"verbose" )
boost::any value
The actual value that is held.
bool wasPassed
True if the option was passed to the program.
static CLI & GetSingleton()
Retrieve the singleton.
bool persistent
If this should be preserved across different settings (i.e.
static void StoreSettings(const std::string &name)
Take all parameters and function mappings and store them, under the given name.
GoOption(const T defaultValue, const std::string &identifier, const std::string &description, const std::string &alias, const std::string &cppName, const bool required=false, const bool input=true, const bool noTranspose=false, const std::string &="")
Construct a GoOption object.
std::string desc
Description of this parameter, if any.
bool input
True if this option is an input option (otherwise, it is output).
This structure holds all of the information about a single parameter, including its value (which is s...
bool loaded
If this is an input parameter that needs extra loading, this indicates whether or not it has been loa...
#define TYPENAME(x)
The TYPENAME macro is used internally to convert a type into a string.
char alias
Alias for this parameter.
std::string tname
Type information of this parameter.
static void ClearSettings()
Clear all of the settings, removing all parameters and function mappings.
std::string name
Name of this parameter.
bool required
True if this option is required.
static void Add(util::ParamData &&d)
Adds a parameter to the hierarchy; use the PARAM_*() macros instead of this (i.e. ...
std::string cppType
The true name of the type, as it would be written in C++.
static void RestoreSettings(const std::string &name, const bool fatal=true)
Restore all of the parameters and function mappings of the given name, if they exist.
FunctionMapType functionMap
bool noTranspose
True if this is a matrix that should not be transposed.