| 427 | }; |
| 428 | |
| 429 | class logical_combination_error_handler : public error_handler |
| 430 | { |
| 431 | public: |
| 432 | struct error_entry { |
| 433 | json::json_pointer ptr_; |
| 434 | json instance_; |
| 435 | std::string message_; |
| 436 | }; |
| 437 | |
| 438 | std::vector<error_entry> error_entry_list_; |
| 439 | |
| 440 | void error(const json::json_pointer &ptr, const json &instance, const std::string &message) override |
| 441 | { |
| 442 | error_entry_list_.push_back(error_entry{ptr, instance, message}); |
| 443 | } |
| 444 | |
| 445 | void propagate(error_handler &e, const std::string &prefix) const |
| 446 | { |
| 447 | for (const error_entry &entry : error_entry_list_) |
| 448 | e.error(entry.ptr_, entry.instance_, prefix + entry.message_); |
| 449 | } |
| 450 | |
| 451 | operator bool() const { return !error_entry_list_.empty(); } |
| 452 | }; |
| 453 | |
| 454 | template <enum logical_combination_types combine_logic> |
| 455 | class logical_combination : public schema |
nothing calls this directly
no outgoing calls
no test coverage detected