mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-09-06 16:57:25 +00:00
ZoneCodeGenerator: Add tests for reordering, scriptstring, string
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using ZoneCodeGenerator.Domain.Evaluation;
|
||||
using System.Linq;
|
||||
using ZoneCodeGenerator.Domain.Evaluation;
|
||||
|
||||
namespace ZoneCodeGenerator.Domain.Information
|
||||
{
|
||||
@@ -6,15 +7,32 @@ namespace ZoneCodeGenerator.Domain.Information
|
||||
{
|
||||
public StructureInformation StructureType { get; }
|
||||
public Variable Member { get; set; }
|
||||
public bool IsString { get; set; }
|
||||
public bool IsScriptString { get; set; }
|
||||
public IEvaluation Condition { get; set; }
|
||||
|
||||
public bool IsNonEmbeddedReference => Member.VariableType.References.Any();
|
||||
|
||||
public bool IsSinglePointerReference => Member.VariableType.References.Any()
|
||||
&& Member.VariableType.References.Last() is ReferenceTypePointer
|
||||
pointerReference
|
||||
&& !pointerReference.IsArray;
|
||||
|
||||
public bool IsArrayPointerReference => Member.VariableType.References.Any()
|
||||
&& Member.VariableType.References.Last() is ReferenceTypePointer
|
||||
pointerReference
|
||||
&& pointerReference.IsArray;
|
||||
|
||||
public bool IsArrayReference => Member.VariableType.References.Any()
|
||||
&& Member.VariableType.References.Last() is ReferenceTypeArray;
|
||||
|
||||
public MemberInformation(Variable member, StructureInformation structureType)
|
||||
{
|
||||
Member = member;
|
||||
StructureType = structureType;
|
||||
IsString = false;
|
||||
IsScriptString = false;
|
||||
Condition = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -24,7 +24,7 @@ namespace ZoneCodeGenerator.Domain.Information
|
||||
}
|
||||
|
||||
public List<StructureInformation> Usages { get; }
|
||||
public List<MemberInformation> OrderedMembers { get; }
|
||||
public List<MemberInformation> OrderedMembers { get; set; }
|
||||
public bool NonEmbeddedReferenceExists { get; set; }
|
||||
public bool SinglePointerReferenceExists { get; set; }
|
||||
public bool ArrayPointerReferenceExists { get; set; }
|
||||
|
Reference in New Issue
Block a user