Browse Source

Using property ExplicitlyIgnore instead of Ignore, so types that are not referenced can still be referenced.

pull/224/head
marcos henrich 11 years ago committed by triton
parent
commit
ec93889b64
  1. 2
      src/AST/Class.cs
  2. 2
      src/Generator/Generators/CLI/CLIHeadersTemplate.cs
  3. 2
      src/Generator/Generators/CLI/CLISourcesTemplate.cs
  4. 7
      src/Generator/Generators/CLI/CLITypeReferences.cs
  5. 2
      src/Generator/Generators/CSharp/CSharpTextTemplate.cs

2
src/AST/Class.cs

@ -149,7 +149,7 @@ namespace CppSharp.AST @@ -149,7 +149,7 @@ namespace CppSharp.AST
{
foreach (var @base in Bases)
{
if (@base.IsClass && !@base.Class.Ignore)
if (@base.IsClass && !@base.Class.ExplicityIgnored)
return @base.Class;
}

2
src/Generator/Generators/CLI/CLIHeadersTemplate.cs

@ -68,7 +68,7 @@ namespace CppSharp.Generators.CLI @@ -68,7 +68,7 @@ namespace CppSharp.Generators.CLI
var include = typeRef.Include;
var unit = include.TranslationUnit;
if (unit != null && unit.Ignore)
if (unit != null && unit.ExplicityIgnored)
continue;
if(!string.IsNullOrEmpty(include.File) && include.InHeader)

2
src/Generator/Generators/CLI/CLISourcesTemplate.cs

@ -652,7 +652,7 @@ namespace CppSharp.Generators.CLI @@ -652,7 +652,7 @@ namespace CppSharp.Generators.CLI
private bool GenerateClassConstructorBase(Class @class, bool isIntPtr, Method method = null)
{
var hasBase = @class.HasBase && @class.Bases[0].IsClass && !@class.Bases[0].Class.Ignore;
var hasBase = @class.HasBase && @class.Bases[0].IsClass && !@class.Bases[0].Class.ExplicityIgnored;
if (!hasBase)
return false;

7
src/Generator/Generators/CLI/CLITypeReferences.cs

@ -1,4 +1,5 @@ @@ -1,4 +1,5 @@
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using CppSharp.AST;
using CppSharp.AST.Extensions;
using CppSharp.Generators.AST;
@ -111,7 +112,7 @@ namespace CppSharp.Generators.CLI @@ -111,7 +112,7 @@ namespace CppSharp.Generators.CLI
if(decl.Namespace.TranslationUnit.IsSystemHeader)
return;
if(decl.Ignore)
if(decl.ExplicityIgnored)
return;
if(IsBuiltinTypedef(decl))
@ -157,7 +158,7 @@ namespace CppSharp.Generators.CLI @@ -157,7 +158,7 @@ namespace CppSharp.Generators.CLI
if (decl.Namespace != null && decl.Namespace.TranslationUnit.IsSystemHeader)
return false;
return !decl.Ignore;
return !decl.ExplicityIgnored;
}
public override bool VisitClassDecl(Class @class)

2
src/Generator/Generators/CSharp/CSharpTextTemplate.cs

@ -710,7 +710,7 @@ namespace CppSharp.Generators.CSharp @@ -710,7 +710,7 @@ namespace CppSharp.Generators.CSharp
baseClass = @class.Bases[0].Class;
var hasRefBase = baseClass != null && baseClass.IsRefType
&& !baseClass.Ignore;
&& !baseClass.ExplicityIgnored;
return hasRefBase;
}

Loading…
Cancel
Save