// generated by diplomat-tool import type { IoLayout } from "./IoLayout.mjs" import type { IoType } from "./IoType.mjs" import type { LayoutFunction } from "./LayoutFunction.mjs" import type { NucleationError } from "./NucleationError.mjs" import type { pointer, codepoint } from "./diplomat-runtime.d.ts"; /** * Builder for an {@link IoLayout}. `build` consumes it (PORTING rule 11). */ export class IoLayoutBuilder { /** @internal */ get ffiValue(): pointer; /** @internal */ constructor(); /** * Create an empty layout builder. */ static create(): IoLayoutBuilder; /** * Add an input. `positions` is flat `[x,y,z, x,y,z, ...]`. */ addInput(name: string, ioType: IoType, layout: LayoutFunction, positions: Array): void; /** * Add an output. `positions` is flat `[x,y,z, x,y,z, ...]`. */ addOutput(name: string, ioType: IoType, layout: LayoutFunction, positions: Array): void; /** * Add an input with automatic layout inference. */ addInputAuto(name: string, ioType: IoType, positions: Array): void; /** * Add an output with automatic layout inference. */ addOutputAuto(name: string, ioType: IoType, positions: Array): void; /** * Add an input from a region given as flat block positions (sorted by * the default YXZ strategy, matching the old region semantics). */ addInputFromRegion(name: string, ioType: IoType, layout: LayoutFunction, regionPositions: Array): void; /** * Add an input from a region (flat positions) with automatic layout * inference. */ addInputFromRegionAuto(name: string, ioType: IoType, regionPositions: Array): void; /** * Add an output from a region given as flat block positions. */ addOutputFromRegion(name: string, ioType: IoType, layout: LayoutFunction, regionPositions: Array): void; /** * Add an output from a region (flat positions) with automatic layout * inference. */ addOutputFromRegionAuto(name: string, ioType: IoType, regionPositions: Array): void; /** * Build the {@link IoLayout}. Consumes the builder (a second call returns * `AlreadyConsumed`). */ build(): IoLayout; }