This structure holds all of the information about a single parameter, including its value (which is set when ParseCommandLine() is called). More...
Public Attributes | |
char | alias |
Alias for this parameter. More... | |
std::string | cppType |
The true name of the type, as it would be written in C++. More... | |
std::string | desc |
Description of this parameter, if any. More... | |
bool | input |
True if this option is an input option (otherwise, it is output). More... | |
bool | loaded |
If this is an input parameter that needs extra loading, this indicates whether or not it has been loaded. More... | |
std::string | name |
Name of this parameter. More... | |
bool | noTranspose |
True if this is a matrix that should not be transposed. More... | |
bool | required |
True if this option is required. More... | |
std::string | tname |
Type information of this parameter. More... | |
boost::any | value |
The actual value that is held. More... | |
bool | wasPassed |
True if the option was passed to the program. More... | |
This structure holds all of the information about a single parameter, including its value (which is set when ParseCommandLine() is called).
It does not hold any information about whether or not it was passed—that is handled elsewhere. A ParamData struct is only useful in order to get "static" information about a parameter. Note that some parameter types have internal types but also different types that are used by CLI11 (specifically, matrix and model types map to strings).
This structure is somewhat unwieldy and is likely to be refactored at some point in the future, but for now it does the job fine.
Definition at line 52 of file param_data.hpp.
char alias |
Alias for this parameter.
Definition at line 63 of file param_data.hpp.
Referenced by mlpack::bindings::cli::AddToCLI11(), CLIOption< N >::CLIOption(), GoOption< T >::GoOption(), JuliaOption< T >::JuliaOption(), MDOption< T >::MDOption(), PyOption< T >::PyOption(), ROption< T >::ROption(), and TestOption< N >::TestOption().
std::string cppType |
The true name of the type, as it would be written in C++.
Definition at line 81 of file param_data.hpp.
Referenced by CLIOption< N >::CLIOption(), mlpack::bindings::python::GetCythonType(), mlpack::bindings::go::GetGoType(), mlpack::bindings::julia::GetJuliaType(), mlpack::bindings::tests::GetPrintableParam(), mlpack::bindings::markdown::GetPrintableParam(), mlpack::bindings::python::GetPrintableParam(), mlpack::bindings::r::GetPrintableParam(), mlpack::bindings::julia::GetPrintableParam(), mlpack::bindings::r::GetRType(), mlpack::bindings::go::GetType(), mlpack::bindings::r::GetType(), GoOption< T >::GoOption(), mlpack::bindings::python::ImportDecl(), JuliaOption< T >::JuliaOption(), MDOption< T >::MDOption(), mlpack::bindings::python::PrintClassDefn(), mlpack::bindings::go::PrintDefnInput(), mlpack::bindings::go::PrintDefnOutput(), mlpack::bindings::julia::PrintDoc(), mlpack::bindings::python::PrintDoc(), mlpack::bindings::r::PrintDoc(), mlpack::bindings::go::PrintDoc(), mlpack::bindings::r::PrintInputProcessing(), mlpack::bindings::go::PrintInputProcessing(), mlpack::bindings::python::PrintInputProcessing(), mlpack::bindings::go::PrintMethodInit(), mlpack::bindings::julia::PrintModelTypeImport(), mlpack::bindings::go::PrintOutputProcessing(), mlpack::bindings::python::PrintOutputProcessing(), mlpack::bindings::julia::PrintParamDefn(), mlpack::bindings::r::PrintSerializeUtil(), PyOption< T >::PyOption(), ROption< T >::ROption(), and TestOption< N >::TestOption().
std::string desc |
Description of this parameter, if any.
Definition at line 58 of file param_data.hpp.
Referenced by mlpack::bindings::cli::AddToCLI11(), CLIOption< N >::CLIOption(), GoOption< T >::GoOption(), JuliaOption< T >::JuliaOption(), MDOption< T >::MDOption(), mlpack::bindings::julia::PrintDoc(), mlpack::bindings::r::PrintDoc(), mlpack::bindings::python::PrintDoc(), mlpack::bindings::go::PrintDoc(), PyOption< T >::PyOption(), ROption< T >::ROption(), and TestOption< N >::TestOption().
bool input |
True if this option is an input option (otherwise, it is output).
Definition at line 73 of file param_data.hpp.
Referenced by CLIOption< N >::CLIOption(), mlpack::bindings::cli::EndProgram(), mlpack::bindings::cli::GetParam(), GoOption< T >::GoOption(), JuliaOption< T >::JuliaOption(), MDOption< T >::MDOption(), mlpack::bindings::python::PrintOutputProcessing(), PyOption< T >::PyOption(), ROption< T >::ROption(), and TestOption< N >::TestOption().
bool loaded |
If this is an input parameter that needs extra loading, this indicates whether or not it has been loaded.
Definition at line 76 of file param_data.hpp.
Referenced by CLIOption< N >::CLIOption(), mlpack::bindings::cli::GetParam(), GoOption< T >::GoOption(), JuliaOption< T >::JuliaOption(), MDOption< T >::MDOption(), PyOption< T >::PyOption(), ROption< T >::ROption(), and TestOption< N >::TestOption().
std::string name |
Name of this parameter.
This is the name used for HasParam() and GetParam().
Definition at line 56 of file param_data.hpp.
Referenced by mlpack::bindings::cli::AddToCLI11(), CLIOption< N >::CLIOption(), GoOption< T >::GoOption(), JuliaOption< T >::JuliaOption(), mlpack::bindings::cli::MapParameterName(), MDOption< T >::MDOption(), mlpack::bindings::python::PrintDefn(), mlpack::bindings::go::PrintDefnInput(), mlpack::bindings::julia::PrintDoc(), mlpack::bindings::python::PrintDoc(), mlpack::bindings::r::PrintDoc(), mlpack::bindings::go::PrintDoc(), mlpack::bindings::julia::PrintInputParam(), mlpack::bindings::r::PrintInputParam(), mlpack::bindings::r::PrintInputProcessing(), mlpack::bindings::go::PrintInputProcessing(), mlpack::bindings::python::PrintInputProcessing(), mlpack::bindings::go::PrintMethodConfig(), mlpack::bindings::go::PrintMethodInit(), mlpack::bindings::r::PrintOutputProcessing(), mlpack::bindings::python::PrintOutputProcessing(), mlpack::bindings::go::PrintOutputProcessing(), mlpack::bindings::r::PrintSerializeUtil(), PyOption< T >::PyOption(), ROption< T >::ROption(), and TestOption< N >::TestOption().
bool noTranspose |
True if this is a matrix that should not be transposed.
Ignored if the parameter is not a matrix.
Definition at line 69 of file param_data.hpp.
Referenced by CLIOption< N >::CLIOption(), mlpack::bindings::cli::GetParam(), GoOption< T >::GoOption(), JuliaOption< T >::JuliaOption(), MDOption< T >::MDOption(), PyOption< T >::PyOption(), ROption< T >::ROption(), and TestOption< N >::TestOption().
bool required |
True if this option is required.
Definition at line 71 of file param_data.hpp.
Referenced by CLIOption< N >::CLIOption(), GoOption< T >::GoOption(), JuliaOption< T >::JuliaOption(), MDOption< T >::MDOption(), mlpack::bindings::cli::ParseCommandLine(), mlpack::bindings::python::PrintDefn(), mlpack::bindings::go::PrintDefnInput(), mlpack::bindings::julia::PrintDoc(), mlpack::bindings::r::PrintDoc(), mlpack::bindings::python::PrintDoc(), mlpack::bindings::go::PrintDoc(), mlpack::bindings::r::PrintInputParam(), mlpack::bindings::julia::PrintInputParam(), mlpack::bindings::r::PrintInputProcessing(), mlpack::bindings::go::PrintInputProcessing(), mlpack::bindings::python::PrintInputProcessing(), mlpack::bindings::go::PrintMethodConfig(), mlpack::bindings::go::PrintMethodInit(), mlpack::bindings::python::PrintOutputProcessing(), PyOption< T >::PyOption(), ROption< T >::ROption(), and TestOption< N >::TestOption().
std::string tname |
Type information of this parameter.
Note that this is TYPENAME() of the user-visible parameter type, not whatever is given by ParameterType<>.
Definition at line 61 of file param_data.hpp.
Referenced by CLIOption< N >::CLIOption(), mlpack::bindings::cli::EndProgram(), GoOption< T >::GoOption(), JuliaOption< T >::JuliaOption(), MDOption< T >::MDOption(), mlpack::bindings::cli::ParseCommandLine(), PyOption< T >::PyOption(), ROption< T >::ROption(), and TestOption< N >::TestOption().
boost::any value |
The actual value that is held.
If the user has passed a different type, this may be a tuple containing multiple values.
Definition at line 79 of file param_data.hpp.
Referenced by mlpack::bindings::cli::AddToCLI11(), CLIOption< N >::CLIOption(), mlpack::bindings::tests::DeleteAllocatedMemoryImpl(), mlpack::bindings::cli::DeleteAllocatedMemoryImpl(), mlpack::bindings::cli::GetAllocatedMemory(), mlpack::bindings::tests::GetAllocatedMemory(), mlpack::bindings::go::GetParam(), mlpack::bindings::julia::GetParam(), mlpack::bindings::markdown::GetParam(), mlpack::bindings::python::GetParam(), mlpack::bindings::r::GetParam(), mlpack::bindings::tests::GetParam(), mlpack::bindings::cli::GetParam(), mlpack::bindings::markdown::GetPrintableParam(), mlpack::bindings::python::GetPrintableParam(), mlpack::bindings::r::GetPrintableParam(), mlpack::bindings::julia::GetPrintableParam(), mlpack::bindings::tests::GetPrintableParam(), mlpack::bindings::cli::GetRawParam(), GoOption< T >::GoOption(), mlpack::bindings::cli::InPlaceCopyInternal(), JuliaOption< T >::JuliaOption(), MDOption< T >::MDOption(), mlpack::bindings::julia::PrintDoc(), mlpack::bindings::r::PrintDoc(), mlpack::bindings::go::PrintDoc(), mlpack::bindings::go::PrintInputProcessing(), mlpack::bindings::go::PrintMethodInit(), PyOption< T >::PyOption(), ROption< T >::ROption(), mlpack::bindings::cli::SetParam(), and TestOption< N >::TestOption().
bool wasPassed |
True if the option was passed to the program.
Note that wasPassed may be set by either ParseCommandLine() or SetPassed().
Definition at line 66 of file param_data.hpp.
Referenced by mlpack::bindings::cli::AddToCLI11(), CLIOption< N >::CLIOption(), GoOption< T >::GoOption(), JuliaOption< T >::JuliaOption(), MDOption< T >::MDOption(), PyOption< T >::PyOption(), ROption< T >::ROption(), mlpack::bindings::cli::SetParam(), and TestOption< N >::TestOption().