#include <catalog.h>
Classes | |
| struct | Entry |
| VisibleForTesting. More... | |
| class | Match |
Public Member Functions | |
| absl::StatusOr< std::vector< Match > > | FindMatch (std::string_view query) const |
Tries to identify a match for the query across the Catalog. | |
Static Public Member Functions | |
| static absl::StatusOr< Catalog > | Open (std::string_view data_dir) |
| static absl::StatusOr< Catalog > | Make (const std::vector< Entry > &entries) |
| Make a Catalog for testing. | |
| static absl::StatusOr< Entry > | ParseEntry (std::istream &is) |
| VisibleForTesting. | |
A storage of licenses that can be matched against. The in memory representation of the data/headers and data/licenses directories. This represents a 2 tiered search, first the sector is used to determine what matcher should be used, then a match is performend on that. This approach was chosen to minimize the size of the RE2::Set.
| absl::StatusOr< std::vector< Catalog::Match > > Catalog::FindMatch | ( | std::string_view | query | ) | const |
Tries to identify a match for the query across the Catalog.
| query | The text that will be matched against. |
Definition at line 183 of file catalog.cc.
References i.
Make a Catalog for testing.
Definition at line 151 of file catalog.cc.
Referenced by TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), and TEST().
|
static |
Definition at line 98 of file catalog.cc.
References ParseEntry().
Referenced by Data::Open().
|
static |
VisibleForTesting.
Definition at line 243 of file catalog.cc.
References name, and Catalog::Entry::name.