30 lines
1.1 KiB
C#
30 lines
1.1 KiB
C#
using System.Collections.Generic;
|
|||
|
|
|
||
|
|
public sealed class SugarMethodSpec {
|
||
|
|
public string Name { get; init; } = "";
|
||
|
|
public string ReturnType { get; init; } = "void";
|
||
|
|
public List<string> Parameters { get; init; } = new();
|
||
|
|
public List<string> BodyLines { get; init; } = new();
|
||
|
|
|
||
|
|
// Optional compile-time guard (combined with RequiresExtensions)
|
||
|
|
public string? Guard { get; init; }
|
||
|
|
|
||
|
|
// Requirements (checked against vk.xml). Method is generated only if all match.
|
||
|
|
public List<string> RequiresFunctions { get; init; } = new();
|
||
|
|
public List<string> RequiresExtensions { get; init; } = new();
|
||
|
|
|
||
|
|
// Method qualifiers
|
||
|
|
public bool IsConst { get; init; } = false;
|
||
|
|
public bool IsNoexcept { get; init; } = false;
|
||
|
|
public bool IsStatic { get; init; } = false;
|
||
|
|
}
|
||
|
|
|
||
|
|
public sealed class SugarClassSpec {
|
||
|
|
public string TargetClass { get; init; } = "";
|
||
|
|
public List<string> Includes { get; init; } = new();
|
||
|
|
public List<SugarMethodSpec> Methods { get; init; } = new();
|
||
|
|
|
||
|
|
public SugarClassSpec() { }
|
||
|
|
public SugarClassSpec(string targetClass) { TargetClass = targetClass; }
|
||
|
|
}
|