mirror of
https://github.com/mappu/miqt.git
synced 2024-12-22 00:48:38 +00:00
genbindings/clang2il: detect pure virtual, detect overrides
This commit is contained in:
parent
d25301c910
commit
2ae1e6090c
@ -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"])
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user