| 668 | |
| 669 | template <class Data, class MatchResult> |
| 670 | ControlMatcher<Data, MatchResult>::ControlMatcher(const char *file_var, const char *name, const matcher_tags *tags, int flags_in) |
| 671 | { |
| 672 | flags = flags_in; |
| 673 | ink_assert(flags & (ALLOW_HOST_TABLE | ALLOW_REGEX_TABLE | ALLOW_URL_TABLE | ALLOW_IP_TABLE)); |
| 674 | |
| 675 | config_tags = tags; |
| 676 | ink_assert(config_tags != nullptr); |
| 677 | |
| 678 | matcher_name = name; |
| 679 | config_file_path[0] = '\0'; |
| 680 | |
| 681 | if (!(flags & DONT_BUILD_TABLE)) { |
| 682 | ats_scoped_str config_path(RecConfigReadConfigPath(file_var)); |
| 683 | |
| 684 | ink_release_assert(config_path); |
| 685 | ink_strlcpy(config_file_path, config_path, sizeof(config_file_path)); |
| 686 | } |
| 687 | |
| 688 | reMatch = nullptr; |
| 689 | urlMatch = nullptr; |
| 690 | hostMatch = nullptr; |
| 691 | ipMatch = nullptr; |
| 692 | hrMatch = nullptr; |
| 693 | |
| 694 | if (!(flags & DONT_BUILD_TABLE)) { |
| 695 | m_numEntries = this->BuildTable(); |
| 696 | } else { |
| 697 | m_numEntries = 0; |
| 698 | } |
| 699 | } |
| 700 | |
| 701 | template <class Data, class MatchResult> ControlMatcher<Data, MatchResult>::~ControlMatcher() |
| 702 | { |
nothing calls this directly
no test coverage detected