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

Method alias

simcore/framework/src/cli/cli.hpp:4890–4907  ·  view source on GitHub ↗

Set an alias for the app

Source from the content-addressed store, hash-verified

4888
4889 /// Set an alias for the app
4890 App *alias(std::string app_name) {
4891 if (!detail::valid_name_string(app_name)) {
4892 throw(IncorrectConstruction("alias is not a valid name string"));
4893 }
4894
4895 if (parent_ != nullptr) {
4896 aliases_.push_back(app_name);
4897 auto &res = _compare_subcommand_names(*this, *_get_fallthrough_parent());
4898 if (!res.empty()) {
4899 aliases_.pop_back();
4900 throw(OptionAlreadyAdded("alias already matches an existing subcommand: " + app_name));
4901 }
4902 } else {
4903 aliases_.push_back(app_name);
4904 }
4905
4906 return this;
4907 }
4908
4909 /// Remove the error when extras are left over on the command line.
4910 App *allow_extras(bool allow = true) {

Callers

nothing calls this directly

Calls 5

valid_name_stringFunction · 0.85
OptionAlreadyAddedClass · 0.85
push_backMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected