Tools and libraries to glue C/C++ APIs to high-level languages
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

45 lines
1.2 KiB

using CppSharp.AST;
namespace CppSharp.Generators
{
public class MarshalContext
{
public MarshalContext(Driver driver)
{
Driver = driver;
SupportBefore = new TextGenerator();
Return = new TextGenerator();
MarshalVarPrefix = string.Empty;
}
public Driver Driver { get; private set; }
public MarshalPrinter MarshalToManaged;
public MarshalPrinter MarshalToNative;
public TextGenerator SupportBefore { get; private set; }
public TextGenerator Return { get; private set; }
public Declaration Declaration { get; set; }
public string ReturnVarName { get; set; }
public QualifiedType ReturnType { get; set; }
public string ArgName { get; set; }
public Parameter Parameter { get; set; }
public int ParameterIndex { get; set; }
public Function Function { get; set; }
public string MarshalVarPrefix { get; set; }
}
public abstract class MarshalPrinter : AstVisitor
{
public MarshalContext Context { get; private set; }
protected MarshalPrinter(MarshalContext ctx)
{
Context = ctx;
}
}
}