| 125 | } |
| 126 | |
| 127 | Flag::Flag(OptionsContainer* pParent, std::string names, std::string description) |
| 128 | { |
| 129 | // create the option |
| 130 | pOption_ = pParent->pCurrentSubcommand_->add_flag(std::move(names), data_, std::move(description)); |
| 131 | // add to active group |
| 132 | pOption_->group(pParent->activeGroup_); |
| 133 | // capture main name for the option (used when forwarding) |
| 134 | SetName_(pOption_->get_name()); |
| 135 | // register this element with the options container dynamically |
| 136 | pParent->RegisterElement_(this); |
| 137 | } |
| 138 | bool Flag::operator*() const |
| 139 | { |
| 140 | return bool(*this); |
nothing calls this directly
no test coverage detected