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

Method multi_option_policy

simcore/framework/src/cli/cli.hpp:3938–3949  ·  view source on GitHub ↗

Take the last argument if given multiple times (or another policy)

Source from the content-addressed store, hash-verified

3936
3937 /// Take the last argument if given multiple times (or another policy)
3938 Option *multi_option_policy(MultiOptionPolicy value = MultiOptionPolicy::Throw) {
3939 if (value != multi_option_policy_) {
3940 if (multi_option_policy_ == MultiOptionPolicy::Throw && expected_max_ == detail::expected_max_vector_size &&
3941 expected_min_ > 1) { // this bizarre condition is to maintain backwards compatibility
3942 // with the previous behavior of expected_ with vectors
3943 expected_max_ = expected_min_;
3944 }
3945 multi_option_policy_ = value;
3946 current_option_state_ = option_state::parsing;
3947 }
3948 return this;
3949 }
3950
3951 /// Disable flag overrides values, e.g. --flag=<value> is not allowed
3952 Option *disable_flag_override(bool value = true) {

Callers 8

copy_toMethod · 0.45
take_lastMethod · 0.45
take_firstMethod · 0.45
take_allMethod · 0.45
joinMethod · 0.45
_add_flag_internalMethod · 0.45
add_flagMethod · 0.45
add_flag_functionMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected