Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions Source/buildbindingccpp.go
Original file line number Diff line number Diff line change
Expand Up @@ -883,12 +883,20 @@ func writeDynamicCppBaseClassMethods(component ComponentDefinition, baseClass Co
w.Writeln(" }")
w.Writeln("")
w.Writeln(" /**")
w.Writeln(" * %s::GetHandle - Returns handle to instance.", cppBaseClassName)
w.Writeln(" * %s::handle - Returns handle to instance.", cppBaseClassName)
w.Writeln(" */")
w.Writeln(" %sHandle GetHandle() const", NameSpace)
w.Writeln(" %sHandle handle() const", NameSpace)
w.Writeln(" {")
w.Writeln(" return m_pHandle;")
w.Writeln(" }")
w.Writeln("")
w.Writeln(" /**")
w.Writeln(" * %s::wrapper - Returns wrapper instance.", cppBaseClassName)
w.Writeln(" */")
w.Writeln(" %s%sWrapper * wrapper() const", cppClassPrefix, ClassIdentifier)
w.Writeln(" {")
w.Writeln(" return m_pWrapper;")
w.Writeln(" }")

w.Writeln(" ")
w.Writeln(" friend class CWrapper;")
Expand Down Expand Up @@ -1157,7 +1165,7 @@ func buildCppHeader(component ComponentDefinition, w LanguageWriter, NameSpace s
w.Writeln(" %sHandle GetHandle()", NameSpace)
w.Writeln(" {")
w.Writeln(" if (m_ptr != nullptr)")
w.Writeln(" return m_ptr->GetHandle();")
w.Writeln(" return m_ptr->handle();")
w.Writeln(" return nullptr;")
w.Writeln(" }")
w.Writeln("};")
Expand Down