diff options
| author | Peter LaFosse <peter@vector35.com> | 2018-10-17 17:37:15 -0400 |
|---|---|---|
| committer | Peter LaFosse <peter@vector35.com> | 2018-10-19 10:05:09 -0400 |
| commit | 4bb4a2016d90176938bc8737fd9f29e2d6ea2737 (patch) | |
| tree | c3a4f4573fbceafd1eb07cf0a7beaea528c79d83 /type.cpp | |
| parent | 8de8bad6f2f5517d858568a9871dd99f7e8d5d4b (diff) | |
Expose DataRender APIs, allow setting const on types, and allow type comparison
Diffstat (limited to 'type.cpp')
| -rw-r--r-- | type.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -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; |
