| 293 | } |
| 294 | |
| 295 | bool extractOption(Options& options, const std::string& name, const NL::json& node) |
| 296 | { |
| 297 | if (node.is_string()) |
| 298 | options.add(name, node.get<std::string>()); |
| 299 | else if (node.is_number_unsigned()) |
| 300 | options.add(name, node.get<uint64_t>()); |
| 301 | else if (node.is_number_integer()) |
| 302 | options.add(name, node.get<int64_t>()); |
| 303 | else if (node.is_number_float()) |
| 304 | options.add(name, node.get<double>()); |
| 305 | else if (node.is_boolean()) |
| 306 | options.add(name, node.get<bool>()); |
| 307 | else if (node.is_array()) |
| 308 | options.add(name, node.get<NL::json::array_t>()); |
| 309 | else if (node.is_null()) |
| 310 | options.add(name, ""); |
| 311 | else |
| 312 | return false; |
| 313 | return true; |
| 314 | } |
| 315 | |
| 316 | void handleInputTag(const std::string& tag, const TagMap& tags, std::vector<Stage *>& inputs) |
| 317 | { |