| 2178 | } |
| 2179 | |
| 2180 | inline |
| 2181 | void |
| 2182 | OptionParser::checked_parse_arg |
| 2183 | ( |
| 2184 | int argc, |
| 2185 | const char* const* argv, |
| 2186 | int& current, |
| 2187 | const std::shared_ptr<OptionDetails>& value, |
| 2188 | const std::string& name |
| 2189 | ) |
| 2190 | { |
| 2191 | if (current + 1 >= argc) |
| 2192 | { |
| 2193 | if (value->value().has_implicit()) |
| 2194 | { |
| 2195 | parse_option(value, name, value->value().get_implicit_value()); |
| 2196 | } |
| 2197 | else |
| 2198 | { |
| 2199 | throw_or_mimic<missing_argument_exception>(name); |
| 2200 | } |
| 2201 | } |
| 2202 | else |
| 2203 | { |
| 2204 | if (value->value().has_implicit()) |
| 2205 | { |
| 2206 | parse_option(value, name, value->value().get_implicit_value()); |
| 2207 | } |
| 2208 | else |
| 2209 | { |
| 2210 | parse_option(value, name, argv[current + 1]); |
| 2211 | ++current; |
| 2212 | } |
| 2213 | } |
| 2214 | } |
| 2215 | |
| 2216 | inline |
| 2217 | void |
nothing calls this directly
no test coverage detected