diff options
Diffstat (limited to 'binaryview.cpp')
| -rw-r--r-- | binaryview.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/binaryview.cpp b/binaryview.cpp index 657a5cd7..b4ed691d 100644 --- a/binaryview.cpp +++ b/binaryview.cpp @@ -2496,6 +2496,24 @@ size_t BinaryView::GetAllTagReferencesOfTypeCount(Ref<TagType> tagType) } +std::map<Ref<TagType>, size_t> BinaryView::GetAllTagReferenceTypeCounts() +{ + BNTagType** types; + size_t* counts; + size_t count; + BNGetAllTagReferenceTypeCounts(m_object, &types, &counts, &count); + + std::map<Ref<TagType>, size_t> result; + for (size_t i = 0; i < count; i ++) + { + result[new TagType(BNNewTagTypeReference(types[i]))] = counts[i]; + } + + BNFreeTagReferenceTypeCounts(types, counts); + return result; +} + + size_t BinaryView::GetTagReferencesOfTypeCount(Ref<TagType> tagType) { return BNGetTagReferencesOfTypeCount(m_object, tagType->GetObject()); |
