From 3ff416b4830c8d1e64fde20c32c99aeec7927402 Mon Sep 17 00:00:00 2001 From: Joao Matos Date: Wed, 17 Aug 2016 14:52:14 +0100 Subject: [PATCH] Updated type printer to latest changes from Mono managed to native codebase. --- src/AST/CppTypePrinter.cs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/AST/CppTypePrinter.cs b/src/AST/CppTypePrinter.cs index 96613998..2fc3528a 100644 --- a/src/AST/CppTypePrinter.cs +++ b/src/AST/CppTypePrinter.cs @@ -5,6 +5,12 @@ using CppSharp.AST.Extensions; namespace CppSharp.AST { + public enum CppTypePrintFlavorKind + { + C, + Cpp, + } + public enum CppTypePrintScopeKind { Local, @@ -14,6 +20,7 @@ namespace CppSharp.AST public class CppTypePrinter : ITypePrinter, IDeclVisitor { + public CppTypePrintFlavorKind PrintFlavorKind; public CppTypePrintScopeKind PrintScopeKind; public bool PrintLogicalNames; public bool PrintTypeQualifiers; @@ -22,6 +29,7 @@ namespace CppSharp.AST public CppTypePrinter(bool printTypeQualifiers = true, bool printTypeModifiers = true) { + PrintFlavorKind = CppTypePrintFlavorKind.Cpp; PrintScopeKind = CppTypePrintScopeKind.GlobalQualified; PrintTypeQualifiers = printTypeQualifiers; PrintTypeModifiers = printTypeModifiers; @@ -207,8 +215,11 @@ namespace CppSharp.AST 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) {