ParamData Struct Reference

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...

 

Detailed Description

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.

Member Data Documentation

◆ alias

◆ cppType

std::string cppType

◆ desc

◆ input

◆ loaded

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().

◆ name

◆ noTranspose

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().

◆ required

◆ tname

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().

◆ value

◆ wasPassed


The documentation for this struct was generated from the following file:
  • /home/ryan/src/mlpack.org/_src/mlpack-git/src/mlpack/core/util/param_data.hpp