2025-01-27 19:15:30 -06:00
|
|
|
namespace Microsoft.Iris.Asm.Models;
|
2024-02-05 09:23:46 -06:00
|
|
|
|
2024-02-10 23:03:57 -06:00
|
|
|
public record SectionDirective : Directive
|
2024-02-05 09:23:46 -06:00
|
|
|
{
|
|
|
|
|
public SectionDirective(string name) : base("section")
|
|
|
|
|
{
|
|
|
|
|
Name = name;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string Name { get; init; }
|
|
|
|
|
|
|
|
|
|
public override string ToString() => $"{base.ToString()} {Name}";
|
|
|
|
|
}
|
2024-02-08 10:50:57 -06:00
|
|
|
|
2025-01-27 19:15:30 -06:00
|
|
|
public record SharedDataTableDirective : Directive
|
|
|
|
|
{
|
|
|
|
|
public SharedDataTableDirective(string dataTableUri) : base("dataTable")
|
|
|
|
|
{
|
|
|
|
|
Uri = dataTableUri;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string Uri { get; init; }
|
|
|
|
|
|
|
|
|
|
public override string ToString() => $"{base.ToString()} {Uri}";
|
|
|
|
|
}
|
|
|
|
|
|
2024-02-08 10:50:57 -06:00
|
|
|
public record ExportDirective : Directive
|
|
|
|
|
{
|
2024-02-08 13:32:44 -06:00
|
|
|
public ExportDirective(string labelPrefix, uint listenerCount, string baseTypeName) : base("export")
|
2024-02-08 10:50:57 -06:00
|
|
|
{
|
|
|
|
|
LabelPrefix = labelPrefix;
|
2024-02-08 13:32:44 -06:00
|
|
|
ListenerCount = listenerCount;
|
|
|
|
|
BaseTypeName = baseTypeName;
|
2024-02-08 10:50:57 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string LabelPrefix { get; init; }
|
|
|
|
|
|
2024-02-08 13:32:44 -06:00
|
|
|
public uint ListenerCount { get; init; }
|
2024-02-08 10:50:57 -06:00
|
|
|
|
2024-02-08 13:32:44 -06:00
|
|
|
public string BaseTypeName { get; init; }
|
2024-02-08 10:50:57 -06:00
|
|
|
|
2024-02-08 13:32:44 -06:00
|
|
|
public override string ToString() => $"{base.ToString()} {LabelPrefix} {ListenerCount} {BaseTypeName}";
|
|
|
|
|
|
|
|
|
|
public string InitializePropertiesLabel => GetInitializePropertiesLabel(LabelPrefix);
|
|
|
|
|
public string InitializeLocalsInputLabel => GetInitializeLocalsInputLabel(LabelPrefix);
|
|
|
|
|
public string InitializeContentLabel => GetInitializeContentLabel(LabelPrefix);
|
|
|
|
|
|
|
|
|
|
public string InitialEvaluateOffsetsLabelPrefix => GetInitialEvaluateOffsetsLabelPrefix(LabelPrefix);
|
|
|
|
|
public string FinalEvaluateOffsetsLabelPrefix => GetInitialEvaluateOffsetsLabelPrefix(LabelPrefix);
|
|
|
|
|
public string RefreshGroupOffsetsLabelPrefix => GetRefreshGroupOffsetsLabelPrefix(LabelPrefix);
|
|
|
|
|
|
|
|
|
|
public static string GetInitializePropertiesLabel(string prefix) => prefix + "_prop";
|
|
|
|
|
public static string GetInitializeLocalsInputLabel(string prefix) => prefix + "_locl";
|
|
|
|
|
public static string GetInitializeContentLabel(string prefix) => prefix + "_cont";
|
|
|
|
|
public static string GetInitialEvaluateOffsetsLabelPrefix(string prefix) => prefix + "_evali_";
|
|
|
|
|
public static string GetFinalEvaluateOffsetsLabelPrefix(string prefix) => prefix + "_evalf_";
|
|
|
|
|
public static string GetRefreshGroupOffsetsLabelPrefix(string prefix) => prefix + "_rfsh_";
|
2024-02-08 10:50:57 -06:00
|
|
|
}
|