You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: sdk/include/teiacare/sdk/argparse/argument_parser.hpp
+37-7Lines changed: 37 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -80,7 +80,7 @@ class argument_parser
80
80
/*!
81
81
* \brief Adds a positional argument to the parser.
82
82
* \tparam T Type of the argument.
83
-
* \param name Name of the positional argument.
83
+
* \param name Name of the positional argument. Any string without spaces is accepted.
84
84
* \param var Variable to store the parsed value.
85
85
* \param description Description of the argument (optional).
86
86
*/
@@ -104,20 +104,38 @@ class argument_parser
104
104
/*!
105
105
* \brief Adds an optional argument to the parser.
106
106
* \tparam T Type of the argument.
107
-
* \param name_long Long name of the argument(e.g., "--option").
108
-
* \param name_short Short name of the argument(e.g., "-o").
107
+
* \param name_long Long name of the argument. Any string without spaces is accepted. The double dashes must be omitted (e.g., "option" will result in "--option").
108
+
* \param name_short Short name of the argument. Single character. The dash must be omitted. (e.g., 'o' will result in '-o').
109
109
* \param var Variable to store the parsed value.
110
110
* \param default_value Default value for the argument.
111
111
* \param description Description of the argument (optional).
112
112
* \param required Whether the argument is required (default=false).
113
113
* \param env_var Environment variable to use for the argument (optional).
add_option(std::make_unique<tc::sdk::optional_argument<T>>(name_long, name_short, var, default_value, description, required, env_var));
119
120
}
120
121
122
+
/*!
123
+
* \brief Adds an optional argument to the parser.
124
+
* \tparam T Type of the argument.
125
+
* \param name_long Long name of the argument. Any string without spaces is accepted. The double dashes must be omitted (e.g., "option" will result in "--option").
126
+
* \param var Variable to store the parsed value.
127
+
* \param default_value Default value for the argument.
128
+
* \param description Description of the argument (optional).
129
+
* \param required Whether the argument is required (default=false).
130
+
* \param env_var Environment variable to use for the argument (optional).
0 commit comments