diff options
| author | Glenn Smith <glenn@vector35.com> | 2024-09-26 01:33:07 -0400 |
|---|---|---|
| committer | Glenn Smith <glenn@vector35.com> | 2024-10-14 16:59:09 -0400 |
| commit | 2161816481322887864999289688022906323855 (patch) | |
| tree | 0b8ab579b7b288af71dbbf446fc54a9142c5236b /type.cpp | |
| parent | 8747681904104688158650354128100257896501 (diff) | |
Add various missing Type/TypeBuilder getters and settersa
Diffstat (limited to 'type.cpp')
| -rw-r--r-- | type.cpp | 35 |
1 files changed, 35 insertions, 0 deletions
@@ -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; |
