diff --git a/cmd/genbindings/clang2il.go b/cmd/genbindings/clang2il.go index 2eb65395..9ad21f94 100644 --- a/cmd/genbindings/clang2il.go +++ b/cmd/genbindings/clang2il.go @@ -676,6 +676,10 @@ func parseMethod(node map[string]interface{}, mm *CppMethod) error { mm.IsVirtual = true } + if pure, ok := node["pure"].(bool); ok && pure { + mm.IsPureVirtual = true + } + if methodInner, ok := node["inner"].([]interface{}); ok { paramCounter := 0 for _, methodObj := range methodInner { @@ -718,6 +722,12 @@ func parseMethod(node map[string]interface{}, mm *CppMethod) error { // Next paramCounter++ + case "OverrideAttr": + // void keyPressEvent(QKeyEvent *e) override; + // This is a virtual method being overridden and is a replacement + // for actually using the 'virtual' keyword + mm.IsVirtual = true + default: // Something else inside a declaration?? log.Printf("==> NOT IMPLEMENTED CXXMethodDecl->%q\n", methodObj["kind"]) diff --git a/cmd/genbindings/intermediate.go b/cmd/genbindings/intermediate.go index b1313449..966a531a 100644 --- a/cmd/genbindings/intermediate.go +++ b/cmd/genbindings/intermediate.go @@ -239,6 +239,7 @@ type CppMethod struct { IsSignal bool IsConst bool IsVirtual bool + IsPureVirtual bool // Virtual method was declared with = 0 i.e. there is no base method here to call IsProtected bool // If true, we can't call this method but we may still be able to overload it HiddenParams []CppParameter // Populated if there is an overload with more parameters