mirror of
https://github.com/mappu/miqt.git
synced 2025-02-08 22:10:23 +00:00
genbindings: add new AllowCtor framework
This commit is contained in:
parent
cae8967119
commit
0b39af57e3
@ -394,6 +394,10 @@ nextMethod:
|
||||
// an existing class instance
|
||||
mm.IsStatic = true
|
||||
|
||||
if !AllowCtor(ret.ClassName, mm) {
|
||||
continue
|
||||
}
|
||||
|
||||
ret.Ctors = append(ret.Ctors, mm)
|
||||
|
||||
case "CXXDestructorDecl":
|
||||
|
@ -321,6 +321,12 @@ func AllowMethod(className string, mm CppMethod) error {
|
||||
return nil // OK, allow
|
||||
}
|
||||
|
||||
func AllowCtor(className string, mm CppMethod) bool {
|
||||
|
||||
// Default allow
|
||||
return true
|
||||
}
|
||||
|
||||
// AllowType controls whether to permit binding of a method, if a method uses
|
||||
// this type in its parameter list or return type.
|
||||
// Any type not permitted by AllowClass is also not permitted by this method.
|
||||
|
Loading…
x
Reference in New Issue
Block a user