|
|
|
@ -5,6 +5,12 @@ using CppSharp.AST.Extensions; |
|
|
|
|
|
|
|
|
|
|
|
namespace CppSharp.AST |
|
|
|
namespace CppSharp.AST |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
public enum CppTypePrintFlavorKind |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
C, |
|
|
|
|
|
|
|
Cpp, |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public enum CppTypePrintScopeKind |
|
|
|
public enum CppTypePrintScopeKind |
|
|
|
{ |
|
|
|
{ |
|
|
|
Local, |
|
|
|
Local, |
|
|
|
@ -14,6 +20,7 @@ namespace CppSharp.AST |
|
|
|
|
|
|
|
|
|
|
|
public class CppTypePrinter : ITypePrinter<string>, IDeclVisitor<string> |
|
|
|
public class CppTypePrinter : ITypePrinter<string>, IDeclVisitor<string> |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
public CppTypePrintFlavorKind PrintFlavorKind; |
|
|
|
public CppTypePrintScopeKind PrintScopeKind; |
|
|
|
public CppTypePrintScopeKind PrintScopeKind; |
|
|
|
public bool PrintLogicalNames; |
|
|
|
public bool PrintLogicalNames; |
|
|
|
public bool PrintTypeQualifiers; |
|
|
|
public bool PrintTypeQualifiers; |
|
|
|
@ -22,6 +29,7 @@ namespace CppSharp.AST |
|
|
|
|
|
|
|
|
|
|
|
public CppTypePrinter(bool printTypeQualifiers = true, bool printTypeModifiers = true) |
|
|
|
public CppTypePrinter(bool printTypeQualifiers = true, bool printTypeModifiers = true) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
PrintFlavorKind = CppTypePrintFlavorKind.Cpp; |
|
|
|
PrintScopeKind = CppTypePrintScopeKind.GlobalQualified; |
|
|
|
PrintScopeKind = CppTypePrintScopeKind.GlobalQualified; |
|
|
|
PrintTypeQualifiers = printTypeQualifiers; |
|
|
|
PrintTypeQualifiers = printTypeQualifiers; |
|
|
|
PrintTypeModifiers = printTypeModifiers; |
|
|
|
PrintTypeModifiers = printTypeModifiers; |
|
|
|
@ -207,7 +215,10 @@ namespace CppSharp.AST |
|
|
|
|
|
|
|
|
|
|
|
public string VisitCILType(CILType type, TypeQualifiers quals) |
|
|
|
public string VisitCILType(CILType type, TypeQualifiers quals) |
|
|
|
{ |
|
|
|
{ |
|
|
|
return string.Empty; |
|
|
|
if (type.Type == typeof(string)) |
|
|
|
|
|
|
|
return "char*"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
throw new NotImplementedException(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public string VisitPrimitiveType(PrimitiveType type, TypeQualifiers quals) |
|
|
|
public string VisitPrimitiveType(PrimitiveType type, TypeQualifiers quals) |
|
|
|
|