MCPcopy Create free account
hub / github.com/Tencent/TAD_Sim / set_help_flag

Method set_help_flag

simcore/framework/src/cli/cli.hpp:5173–5187  ·  view source on GitHub ↗

Set a help flag, replace the existing one if present

Source from the content-addressed store, hash-verified

5171
5172 /// Set a help flag, replace the existing one if present
5173 Option *set_help_flag(std::string flag_name = "", const std::string &help_description = "") {
5174 // take flag_description by const reference otherwise add_flag tries to assign to help_description
5175 if (help_ptr_ != nullptr) {
5176 remove_option(help_ptr_);
5177 help_ptr_ = nullptr;
5178 }
5179
5180 // Empty name will simply remove the help flag
5181 if (!flag_name.empty()) {
5182 help_ptr_ = add_flag(flag_name, help_description);
5183 help_ptr_->configurable(false);
5184 }
5185
5186 return help_ptr_;
5187 }
5188
5189 /// Set a help all flag, replaced the existing one if present
5190 Option *set_help_all_flag(std::string help_name = "", const std::string &help_description = "") {

Callers 2

ConfCmdMethod · 0.80
RootCmdMethod · 0.80

Calls 2

emptyMethod · 0.45
configurableMethod · 0.45

Tested by

no test coverage detected