mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-04-20 16:15:43 +00:00
ZoneCodeGenerator: Add and rename member computations to make more sense
This commit is contained in:
parent
08d0dda4f6
commit
3bf0334c59
@ -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<ReferenceTypePointer>().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<ReferenceTypeArray>()
|
||||
.Any();
|
||||
|
||||
public IEnumerable<int> ArraySizes => information.Member.VariableType.References
|
||||
.OfType<ReferenceTypeArray>()
|
||||
.Select(array => array.ArraySize);
|
||||
@ -38,8 +46,8 @@ namespace ZoneCodeGenerator.Generating.Computations
|
||||
.OfType<ReferenceTypePointer>()
|
||||
.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)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user