|
|
|
@ -1,4 +1,5 @@ |
|
|
|
using CppSharp.AST; |
|
|
|
using System.Threading; |
|
|
|
|
|
|
|
using CppSharp.AST; |
|
|
|
|
|
|
|
|
|
|
|
namespace CppSharp.Passes |
|
|
|
namespace CppSharp.Passes |
|
|
|
{ |
|
|
|
{ |
|
|
|
@ -16,6 +17,34 @@ namespace CppSharp.Passes |
|
|
|
VisitOptions.VisitClassFields = false; |
|
|
|
VisitOptions.VisitClassFields = false; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public bool Wait |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
get { return wait; } |
|
|
|
|
|
|
|
set |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (wait != value) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
wait = value; |
|
|
|
|
|
|
|
if (!wait) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
manualResetEvent.Set(); |
|
|
|
|
|
|
|
manualResetEvent.Dispose(); |
|
|
|
|
|
|
|
manualResetEvent = null; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public override bool VisitASTContext(ASTContext context) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (Wait) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
manualResetEvent = new ManualResetEvent(false); |
|
|
|
|
|
|
|
manualResetEvent.WaitOne(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return base.VisitASTContext(context); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public override bool VisitDeclaration(Declaration decl) |
|
|
|
public override bool VisitDeclaration(Declaration decl) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (!base.VisitDeclaration(decl)) |
|
|
|
if (!base.VisitDeclaration(decl)) |
|
|
|
@ -52,5 +81,8 @@ namespace CppSharp.Passes |
|
|
|
mangledDecl.Mangled = symbol; |
|
|
|
mangledDecl.Mangled = symbol; |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private bool wait; |
|
|
|
|
|
|
|
private ManualResetEvent manualResetEvent; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|