|
|
@ -1,4 +1,5 @@ |
|
|
|
using System.Collections.Generic; |
|
|
|
using System; |
|
|
|
|
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Linq; |
|
|
|
using System.Linq; |
|
|
|
using CppSharp.AST; |
|
|
|
using CppSharp.AST; |
|
|
|
using Type = CppSharp.AST.Type; |
|
|
|
using Type = CppSharp.AST.Type; |
|
|
@ -104,6 +105,11 @@ namespace CppSharp.Generators.AST |
|
|
|
return recordStack.Any(rec => decl == rec.Object); |
|
|
|
return recordStack.Any(rec => decl == rec.Object); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public bool Contains(Func<ASTRecord, bool> func) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return recordStack.Any(func); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public bool IsBeingVisited(Declaration decl) |
|
|
|
public bool IsBeingVisited(Declaration decl) |
|
|
|
{ |
|
|
|
{ |
|
|
|
var record = recordStack.FirstOrDefault(rec => decl == rec.Object); |
|
|
|
var record = recordStack.FirstOrDefault(rec => decl == rec.Object); |
|
|
@ -195,6 +201,9 @@ namespace CppSharp.Generators.AST |
|
|
|
if (decl is TranslationUnit) |
|
|
|
if (decl is TranslationUnit) |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (recordStack.Contains(record => record.Object is Type)) |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
|
|
|
|
if (recordStack.IsBeingVisited(decl)) |
|
|
|
if (recordStack.IsBeingVisited(decl)) |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
|
|
|
|
|
|
|
|