summaryrefslogtreecommitdiff
path: root/type.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'type.cpp')
-rw-r--r--type.cpp20
1 files changed, 20 insertions, 0 deletions
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<Ref<Type>> 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;