12 #ifndef MLPACK_BINDINGS_MARKDOWN_MD_OPTION_HPP 13 #define MLPACK_BINDINGS_MARKDOWN_MD_OPTION_HPP 42 const std::string& identifier,
43 const std::string& description,
44 const std::string& alias,
45 const std::string& cppName,
46 const bool required =
false,
47 const bool input =
true,
48 const bool noTranspose =
false,
49 const std::string& bindingName =
"")
54 data.
desc = description;
55 data.
name = identifier;
57 data.
alias = alias[0];
66 data.
value = boost::any(defaultValue);
76 &GetPrintableParamName<T>);
78 &GetPrintableParamValue<T>);
83 if (identifier !=
"verbose" && identifier !=
"copy_all_inputs" &&
84 identifier !=
"help" && identifier !=
"info" && identifier !=
"version")
boost::any value
The actual value that is held.
Linear algebra utility functions, generally performed on matrices or vectors.
MDOption(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 &bindingName="")
Construct an MDOption object.
bool wasPassed
True if the option was passed to the program.
The Markdown option class.
static util::Params Parameters(const std::string &bindingName)
Return a new Params object initialized with all the parameters of the binding bindingName.
std::string desc
Description of this parameter, if any.
bool input
True if this option is an input option (otherwise, it is output).
std::map< std::string, ParamData > & Parameters()
Get the map of parameters.
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.
std::string name
Name of this parameter.
static void AddFunction(const std::string &type, const std::string &name, void(*func)(util::ParamData &, const void *, void *))
Add a function to the function map.
bool required
True if this option is required.
static void AddParameter(const std::string &bindingName, util::ParamData &&d)
Adds a parameter to the hierarchy; use the PARAM_*() macros instead of this (i.e. ...
The Params class holds all information about the parameters passed to a specific binding.
std::string cppType
The true name of the type, as it would be written in C++.
bool noTranspose
True if this is a matrix that should not be transposed.