summaryrefslogtreecommitdiff
path: root/type.cpp
diff options
context:
space:
mode:
authorGlenn Smith <glenn@vector35.com>2024-09-26 01:33:07 -0400
committerGlenn Smith <glenn@vector35.com>2024-10-14 16:59:09 -0400
commit2161816481322887864999289688022906323855 (patch)
tree0b8ab579b7b288af71dbbf446fc54a9142c5236b /type.cpp
parent8747681904104688158650354128100257896501 (diff)
Add various missing Type/TypeBuilder getters and settersa
Diffstat (limited to 'type.cpp')
-rw-r--r--type.cpp35
1 files changed, 35 insertions, 0 deletions
diff --git a/type.cpp b/type.cpp
index 42ef40b9..45e20463 100644
--- a/type.cpp
+++ b/type.cpp
@@ -602,6 +602,12 @@ Confidence<Ref<CallingConvention>> Type::GetCallingConvention() const
}
+BNCallingConventionName Type::GetCallingConventionName() const
+{
+ return BNGetTypeCallingConventionName(m_object);
+}
+
+
vector<FunctionParameter> Type::GetParameters() const
{
size_t count;
@@ -633,6 +639,12 @@ Confidence<bool> Type::HasVariableArguments() const
}
+bool Type::HasTemplateArguments() const
+{
+ return BNTypeHasTemplateArguments(m_object);
+}
+
+
Confidence<bool> Type::CanReturn() const
{
BNBoolWithConfidence result = BNFunctionTypeCanReturn(m_object);
@@ -1491,6 +1503,23 @@ TypeBuilder& TypeBuilder::SetChildType(const Confidence<Ref<Type>>& child)
}
+TypeBuilder& TypeBuilder::SetCallingConvention(const Confidence<Ref<CallingConvention>>& cc)
+{
+ BNCallingConventionWithConfidence ccwc;
+ ccwc.convention = cc->GetObject();
+ ccwc.confidence = cc.GetConfidence();
+ BNTypeBuilderSetCallingConvention(m_object, &ccwc);
+ return *this;
+}
+
+
+TypeBuilder& TypeBuilder::SetCallingConventionName(BNCallingConventionName cc)
+{
+ BNTypeBuilderSetCallingConventionName(m_object, cc);
+ return *this;
+}
+
+
Confidence<Ref<CallingConvention>> TypeBuilder::GetCallingConvention() const
{
BNCallingConventionWithConfidence cc = BNGetTypeBuilderCallingConvention(m_object);
@@ -1500,6 +1529,12 @@ Confidence<Ref<CallingConvention>> TypeBuilder::GetCallingConvention() const
}
+BNCallingConventionName TypeBuilder::GetCallingConventionName() const
+{
+ return BNGetTypeBuilderCallingConventionName(m_object);
+}
+
+
vector<FunctionParameter> TypeBuilder::GetParameters() const
{
size_t count;