From 2b7ff4a4a4033e9f434da6f6b186d4798dbe59ee Mon Sep 17 00:00:00 2001 From: Glenn Smith Date: Tue, 15 Nov 2022 16:21:43 -0500 Subject: Add BinaryView::GetDependencySortedTypes --- binaryninjaapi.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'binaryninjaapi.h') diff --git a/binaryninjaapi.h b/binaryninjaapi.h index b738c92a..8cb0a7b2 100644 --- a/binaryninjaapi.h +++ b/binaryninjaapi.h @@ -4423,6 +4423,17 @@ namespace BinaryNinja { std::string& errors, const std::set& typesAllowRedefinition = {}); std::map> GetTypes(); + /*! List of all types, sorted such that types are after all types on which they depend + + Order is guaranteed for any collection of types with no cycles. If you have cycles + in type dependencies, order for types in a cycle is not guaranteed. + + \note Dependency order is based on named type references for all non-structure types, i.e. + ``struct Foo m_foo`` will induce a dependency, whereas ``struct Foo* m_pFoo`` will not. + + \return Sorted types as defined above + */ + std::vector>> GetDependencySortedTypes(); std::vector GetTypeNames(const std::string& matching = ""); Ref GetTypeByName(const QualifiedName& name); Ref GetTypeByRef(Ref name); -- cgit v1.3.1