using System.Collections.Generic; /// /// Declarative "sugar" description for a generated wrapper class. /// You can provide several specs with the same TargetClass; they will be merged. /// public sealed class SugarClassSpec { public string TargetClass { get; } public List Includes { get; set; } = new(); // reserved for future use public List Methods { get; set; } = new(); public SugarClassSpec(string targetClass) => TargetClass = targetClass; } /// /// Declarative description of one sugar method to inject into a wrapper. /// public sealed class SugarMethodSpec { public string Name { get; set; } = ""; // C++ method name public string ReturnType { get; set; } = "void"; // C++ return type public List Parameters { get; set; } = new(); // e.g., "int x", "IntrusivePtr buf" public bool IsStatic { get; set; } = false; public bool IsConst { get; set; } = false; public bool IsNoexcept { get; set; } = false; // Body lines with placeholders: // ${handle} -> _handle // ${vk} -> vk // ${owner0.handle} -> first primary owner handle, etc. // For IntrusivePtr params: ${param.handle} // For vector> params: ${param.handles}, ${param.size}/${param.count} public List BodyLines { get; set; } = new(); // Optional guard expression (e.g., "defined(VK_KHR_swapchain)") public string? Guard { get; set; } // Require presence of vk* function names and extension names public List RequiresFunctions { get; set; } = new(); public List RequiresExtensions { get; set; } = new(); }