mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 18:18:19 +00:00
IndexType: Add IsPatternIndex(), like IsSubNetIndex()
This commit is contained in:
parent
074f51fc96
commit
c8bab6a0ec
5 changed files with 16 additions and 9 deletions
|
@ -389,6 +389,13 @@ bool IndexType::IsSubNetIndex() const {
|
|||
return false;
|
||||
}
|
||||
|
||||
bool IndexType::IsPatternIndex() const {
|
||||
const auto& types = indices->GetTypes();
|
||||
if ( types.size() == 1 && types[0]->Tag() == TYPE_PATTERN )
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
detail::TraversalCode IndexType::Traverse(detail::TraversalCallback* cb) const {
|
||||
auto tc = cb->PreType(this);
|
||||
HANDLE_TC_TYPE_PRE(tc);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue