From e34e52c2f797c9b97b592abb311e3a5bc2194b4a Mon Sep 17 00:00:00 2001 From: Peter LaFosse Date: Fri, 5 Apr 2019 21:55:47 -0400 Subject: Add API for geting a list of type names without the associated objects --- binaryview.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'binaryview.cpp') diff --git a/binaryview.cpp b/binaryview.cpp index 3bf61f34..1c345dfb 100644 --- a/binaryview.cpp +++ b/binaryview.cpp @@ -1928,6 +1928,23 @@ map> BinaryView::GetTypes() } +vector BinaryView::GetTypeNames(const string& matching) +{ + size_t count; + BNQualifiedName* names = BNGetAnalysisTypeNames(m_object, &count, matching.c_str()); + + vector result; + result.reserve(count); + for (size_t i = 0; i < count; i++) + { + result.push_back(QualifiedName::FromAPIObject(&names[i])); + } + + BNFreeTypeNameList(names, count); + return result; +} + + Ref BinaryView::GetTypeByName(const QualifiedName& name) { BNQualifiedName nameObj = name.GetAPIObject(); -- cgit v1.3.1