From 2161816481322887864999289688022906323855 Mon Sep 17 00:00:00 2001 From: Glenn Smith Date: Thu, 26 Sep 2024 01:33:07 -0400 Subject: Add various missing Type/TypeBuilder getters and settersa --- type.cpp | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'type.cpp') diff --git a/type.cpp b/type.cpp index 42ef40b9..45e20463 100644 --- a/type.cpp +++ b/type.cpp @@ -602,6 +602,12 @@ Confidence> Type::GetCallingConvention() const } +BNCallingConventionName Type::GetCallingConventionName() const +{ + return BNGetTypeCallingConventionName(m_object); +} + + vector Type::GetParameters() const { size_t count; @@ -633,6 +639,12 @@ Confidence Type::HasVariableArguments() const } +bool Type::HasTemplateArguments() const +{ + return BNTypeHasTemplateArguments(m_object); +} + + Confidence Type::CanReturn() const { BNBoolWithConfidence result = BNFunctionTypeCanReturn(m_object); @@ -1491,6 +1503,23 @@ TypeBuilder& TypeBuilder::SetChildType(const Confidence>& child) } +TypeBuilder& TypeBuilder::SetCallingConvention(const Confidence>& 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> TypeBuilder::GetCallingConvention() const { BNCallingConventionWithConfidence cc = BNGetTypeBuilderCallingConvention(m_object); @@ -1500,6 +1529,12 @@ Confidence> TypeBuilder::GetCallingConvention() const } +BNCallingConventionName TypeBuilder::GetCallingConventionName() const +{ + return BNGetTypeBuilderCallingConventionName(m_object); +} + + vector TypeBuilder::GetParameters() const { size_t count; -- cgit v1.3.1