mirror of
https://github.com/mappu/miqt.git
synced 2024-12-23 01:18:37 +00:00
genbindings: skip generating ctors for abstract classes
This commit is contained in:
parent
c06acd0a1b
commit
012b62ee06
@ -68,6 +68,17 @@ func processClassType(node map[string]interface{}, className string) (CppClass,
|
||||
if tagUsed, ok := node["tagUsed"].(string); ok && tagUsed == "class" {
|
||||
visibility = false
|
||||
}
|
||||
|
||||
// Check if this is an abstract class
|
||||
if definitionData, ok := node["definitionData"].(map[string]interface{}); ok {
|
||||
if isAbstract, ok := definitionData["isAbstract"].(bool); ok && isAbstract {
|
||||
ret.Abstract = true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Parse all methods
|
||||
|
||||
nextMethod:
|
||||
for _, node := range inner {
|
||||
node, ok := node.(map[string]interface{})
|
||||
@ -105,6 +116,10 @@ nextMethod:
|
||||
|
||||
case "CXXConstructorDecl":
|
||||
|
||||
if ret.Abstract {
|
||||
continue // The bindings can't construct an abstract class
|
||||
}
|
||||
|
||||
|
||||
var mm CppMethod
|
||||
err := parseMethod(node, &mm)
|
||||
|
Loading…
Reference in New Issue
Block a user