From 4bb4a2016d90176938bc8737fd9f29e2d6ea2737 Mon Sep 17 00:00:00 2001 From: Peter LaFosse Date: Wed, 17 Oct 2018 17:37:15 -0400 Subject: Expose DataRender APIs, allow setting const on types, and allow type comparison --- type.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'type.cpp') diff --git a/type.cpp b/type.cpp index 56bc3865..ef9036aa 100644 --- a/type.cpp +++ b/type.cpp @@ -441,6 +441,17 @@ Type::Type(BNType* type) m_object = type; } +bool Type::operator==(const Type& other) +{ + return BNTypesEqual(m_object, other.m_object); +} + + +bool Type::operator!=(const Type& other) +{ + return BNTypesNotEqual(m_object, other.m_object); +} + BNTypeClass Type::GetClass() const { @@ -964,6 +975,15 @@ Confidence> Type::WithConfidence(uint8_t conf) } +QualifiedName Type::GetStructureName() const +{ + BNQualifiedName name = BNTypeGetStructureName(m_object); + QualifiedName result = QualifiedName::FromAPIObject(&name); + BNFreeQualifiedName(&name); + return result; +} + + NamedTypeReference::NamedTypeReference(BNNamedTypeReference* nt) { m_object = nt; -- cgit v1.3.1