Browse Source

Updated type printer to latest changes from Mono managed to native codebase.

pull/696/head
Joao Matos 10 years ago
parent
commit
3ff416b483
  1. 13
      src/AST/CppTypePrinter.cs

13
src/AST/CppTypePrinter.cs

@ -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)

Loading…
Cancel
Save