public override TypePrinterResult VisitTypedefType(TypedefType typedef, TypeQualifiers quals) { var decl = typedef.Declaration; TypeMap typeMap = null; if (TypeMapDatabase.FindTypeMap(decl, out typeMap)) { typeMap.Type = typedef; var typePrinterContext = new TypePrinterContext { Type = typedef }; return(typeMap.CLISignature(typePrinterContext)); } FunctionType func; if (decl.Type.IsPointerTo <FunctionType>(out func)) { // TODO: Use SafeIdentifier() return(string.Format("{0}^", VisitDeclaration(decl))); } return(decl.Type.Visit(this)); }
public string VisitTemplateSpecializationType(TemplateSpecializationType template, TypeQualifiers quals) { var decl = template.Template.TemplatedDecl; TypeMap typeMap = null; if (TypeMapDatabase.FindTypeMap(template, out typeMap)) { typeMap.Declaration = decl; typeMap.Type = template; Context.Type = template; return(typeMap.CLISignature(Context)); } return(decl.Name); }
public string VisitTagType(TagType tag, TypeQualifiers quals) { TypeMap typeMap = null; if (TypeMapDatabase.FindTypeMap(tag, out typeMap)) { typeMap.Type = tag; Context.Type = tag; return(typeMap.CLISignature(Context)); } 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) { typeMap.Declaration = decl; typeMap.Type = template; TypePrinterContext.Type = template; return(typeMap.CLISignature(TypePrinterContext)); } return(decl.Name); }
public override TypePrinterResult VisitTagType(TagType tag, TypeQualifiers quals) { TypeMap typeMap = null; if (TypeMapDatabase.FindTypeMap(tag, out typeMap)) { typeMap.Type = tag; var typePrinterContext = new TypePrinterContext { Type = tag }; return(typeMap.CLISignature(typePrinterContext)); } Declaration decl = tag.Declaration; if (decl == null) { return(string.Empty); } return(VisitDeclaration(decl, quals)); }