|
|
@ -1,12 +1,10 @@ |
|
|
|
using System; |
|
|
|
using System; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Globalization; |
|
|
|
|
|
|
|
using System.Linq; |
|
|
|
using System.Linq; |
|
|
|
using System.Text.RegularExpressions; |
|
|
|
using System.Text.RegularExpressions; |
|
|
|
using CodingSeb.ExpressionEvaluator; |
|
|
|
using CodingSeb.ExpressionEvaluator; |
|
|
|
using CppSharp.AST; |
|
|
|
using CppSharp.AST; |
|
|
|
using CppSharp.Generators; |
|
|
|
using CppSharp.Generators; |
|
|
|
using CppSharp.Generators.CSharp; |
|
|
|
|
|
|
|
using CppSharp.Passes; |
|
|
|
using CppSharp.Passes; |
|
|
|
|
|
|
|
|
|
|
|
namespace CppSharp |
|
|
|
namespace CppSharp |
|
|
@ -14,33 +12,33 @@ namespace CppSharp |
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// Used to massage the library types into something more .NET friendly.
|
|
|
|
/// Used to massage the library types into something more .NET friendly.
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
public interface ILibrary |
|
|
|
public abstract class ILibrary |
|
|
|
{ |
|
|
|
{ |
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// Do transformations that should happen before passes are processed.
|
|
|
|
/// Do transformations that should happen before passes are processed.
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
void Preprocess(Driver driver, ASTContext ctx); |
|
|
|
public abstract void Preprocess(Driver driver, ASTContext ctx); |
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// Do transformations that should happen after passes are processed.
|
|
|
|
/// Do transformations that should happen after passes are processed.
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
void Postprocess(Driver driver, ASTContext ctx); |
|
|
|
public abstract void Postprocess(Driver driver, ASTContext ctx); |
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// Setup the driver options here.
|
|
|
|
/// Setup the driver options here.
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
void Setup(Driver driver); |
|
|
|
public abstract void Setup(Driver driver); |
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// Setup your passes here.
|
|
|
|
/// Setup your passes here.
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="driver"></param>
|
|
|
|
/// <param name="driver"></param>
|
|
|
|
void SetupPasses(Driver driver); |
|
|
|
public abstract void SetupPasses(Driver driver); |
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// Generate custom code here.
|
|
|
|
/// Generate custom code here.
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
void GenerateCode(Driver driver, List<GeneratorOutput> outputs) { } |
|
|
|
public virtual void GenerateCode(Driver driver, List<GeneratorOutput> outputs) { } |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static class LibraryHelpers |
|
|
|
public static class LibraryHelpers |
|
|
|