| 110 | */ |
| 111 | |
| 112 | bool |
| 113 | CommandLineArgumentParser::ExactlyOneExists(const std::vector<std::string> & keys) const |
| 114 | { |
| 115 | unsigned int counter = 0; |
| 116 | for (unsigned int i = 0; i < keys.size(); ++i) |
| 117 | { |
| 118 | if (this->ArgumentExists(keys[i])) |
| 119 | { |
| 120 | ++counter; |
| 121 | } |
| 122 | } |
| 123 | |
| 124 | if (counter == 1) |
| 125 | { |
| 126 | return true; |
| 127 | } |
| 128 | else |
| 129 | { |
| 130 | return false; |
| 131 | } |
| 132 | |
| 133 | } // end ExactlyOneExists() |
| 134 | |
| 135 | |
| 136 | /** |
no test coverage detected