Browse Source

Checked for type maps of tag types.

Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
pull/119/head
Dimitar Dobrev 12 years ago
parent
commit
7dcc4e1506
  1. 18
      src/Generator/Generators/CSharp/CSharpTypePrinter.cs

18
src/Generator/Generators/CSharp/CSharpTypePrinter.cs

@ -87,8 +87,22 @@ namespace CppSharp.Generators.CSharp @@ -87,8 +87,22 @@ namespace CppSharp.Generators.CSharp
public CSharpTypePrinterResult VisitTagType(TagType tag, TypeQualifiers quals)
{
if (tag.Declaration == null)
return string.Empty;
if (tag.Declaration == null)
return string.Empty;
TypeMap typeMap;
if (TypeMapDatabase.FindTypeMap(tag.Declaration, out typeMap))
{
typeMap.Type = tag;
Context.CSharpKind = ContextKind;
Context.Type = tag;
return new CSharpTypePrinterResult()
{
Type = typeMap.CSharpSignature(Context),
TypeMap = typeMap
};
}
return tag.Declaration.Visit(this);
}

Loading…
Cancel
Save