IndexType: Add IsPatternIndex(), like IsSubNetIndex()

This commit is contained in:
Arne Welzel 2023-11-01 14:07:27 +01:00
parent 074f51fc96
commit c8bab6a0ec
5 changed files with 16 additions and 9 deletions

View file

@ -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);