| 171 | } |
| 172 | |
| 173 | bool Kernel::doSwitches(const StringList& cmdArgs, ProgramArgs& args) |
| 174 | { |
| 175 | StringList stringArgs = extractStageOptions(cmdArgs); |
| 176 | |
| 177 | try |
| 178 | { |
| 179 | bool help; |
| 180 | |
| 181 | // parseSimple allows us to scan for the help option without |
| 182 | // raising exception about missing arguments and so on. |
| 183 | // It also removes consumed args from the arg list, so for now, |
| 184 | // parse a copy that will be ignored by parse(). |
| 185 | ProgramArgs hargs; |
| 186 | hargs.add("help,h", "Print help message", help); |
| 187 | hargs.parseSimple(stringArgs); |
| 188 | if (help) |
| 189 | return false; |
| 190 | |
| 191 | addBasicSwitches(args); |
| 192 | addSwitches(args); |
| 193 | args.parse(stringArgs); |
| 194 | } |
| 195 | catch (arg_error& e) |
| 196 | { |
| 197 | throw pdal_error(getName() + ": " + e.what()); |
| 198 | } |
| 199 | return true; |
| 200 | } |
| 201 | |
| 202 | |
| 203 | int Kernel::doStartup() |
nothing calls this directly
no test coverage detected