public override TypePrinterResult VisitTypedefType(TypedefType typedef, TypeQualifiers quals) { var decl = typedef.Declaration; TypeMap typeMap = null; if (TypeMapDatabase.FindTypeMap(decl.Type, out typeMap)) { typeMap.Type = typedef; var typePrinterContext = new TypePrinterContext { Type = typedef }; return(typeMap.CLISignatureType(typePrinterContext).ToString()); } FunctionType func; if (decl.Type.IsPointerTo(out func)) { // TODO: Use SafeIdentifier() return(string.Format("{0}^", VisitDeclaration(decl))); } return(decl.Type.Visit(this)); }
public override TypePrinterResult VisitTagType(TagType tag, TypeQualifiers quals) { TypeMap typeMap = null; if (TypeMapDatabase.FindTypeMap(tag, out typeMap)) { var typePrinterContext = new TypePrinterContext { Type = tag }; return(typeMap.CLISignatureType(typePrinterContext).ToString()); } Declaration decl = tag.Declaration; if (decl == null) { return(string.Empty); } return(VisitDeclaration(decl, quals)); }
public override TypePrinterResult VisitTemplateSpecializationType( TemplateSpecializationType template, TypeQualifiers quals) { var decl = template.Template.TemplatedDecl; if (decl == null) { return(string.Empty); } TypeMap typeMap = null; if (TypeMapDatabase.FindTypeMap(template, out typeMap) && !typeMap.IsIgnored) { var typePrinterContext = new TypePrinterContext { Type = template }; return(typeMap.CLISignatureType(typePrinterContext).ToString()); } return(decl.Name); }