summaryrefslogtreecommitdiff
path: root/type.cpp
diff options
context:
space:
mode:
authorPeter LaFosse <peter@vector35.com>2018-10-17 17:37:15 -0400
committerPeter LaFosse <peter@vector35.com>2018-10-19 10:05:09 -0400
commit4bb4a2016d90176938bc8737fd9f29e2d6ea2737 (patch)
treec3a4f4573fbceafd1eb07cf0a7beaea528c79d83 /type.cpp
parent8de8bad6f2f5517d858568a9871dd99f7e8d5d4b (diff)
Expose DataRender APIs, allow setting const on types, and allow type comparison
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;