diff --git a/src/ZoneCodeGenerator/Generating/Computations/MemberComputations.cs b/src/ZoneCodeGenerator/Generating/Computations/MemberComputations.cs index 5d88f196..b18f1397 100644 --- a/src/ZoneCodeGenerator/Generating/Computations/MemberComputations.cs +++ b/src/ZoneCodeGenerator/Generating/Computations/MemberComputations.cs @@ -10,6 +10,10 @@ namespace ZoneCodeGenerator.Generating.Computations { private readonly MemberInformation information; + public bool ShouldIgnore => information.Condition != null + && information.Condition.IsStatic + && information.Condition.EvaluateNumeric() == 0; + public bool IsNonEmbeddedReference => information.Member.VariableType.References.OfType().Any(); public bool IsSinglePointerReference => information.Member.VariableType.References.Any() @@ -30,6 +34,10 @@ namespace ZoneCodeGenerator.Generating.Computations public bool IsArrayReference => information.Member.VariableType.References.Any() && information.Member.VariableType.References.Last() is ReferenceTypeArray; + public bool IsArray => information.Member.VariableType.References + .OfType() + .Any(); + public IEnumerable ArraySizes => information.Member.VariableType.References .OfType() .Select(array => array.ArraySize); @@ -38,8 +46,8 @@ namespace ZoneCodeGenerator.Generating.Computations .OfType() .Count(); - public bool IsSinglePointer => PointerDepth == 1; - public bool IsDoublePointer => PointerDepth == 2; + public bool PointerDepthIsOne => PointerDepth == 1; + public bool PointerDepthIsTwo => PointerDepth == 2; public MemberComputations(MemberInformation information) {