UNPKG

simc-ast-builder

Version:

Parser and AST generator for SimulationCraft files

60 lines 2.11 kB
/** * Registry for NodeTemplate instances * Provides a central registry for node templates with dynamic registration */ import { NodeTemplate, NodeTemplateOptions } from "./NodeTemplate"; /** * Registry for NodeTemplate instances */ export declare class NodeRegistry { /** * Map of template types to NodeTemplate instances */ private static templates; /** * Clear all templates from the registry */ static clearTemplates(): void; /** * Get all templates in the registry * @returns Array of all templates in the registry */ static getAllTemplates(): NodeTemplate[]; /** * Get a template by type, creating it if it doesn't exist * @param type Type of the template * @param defaultOptions Default options to use if the template doesn't exist * @returns The existing or newly created template */ static getOrCreateTemplate(type: string, defaultOptions?: NodeTemplateOptions): NodeTemplate; /** * Get a template from the registry by type * @param type Type of the template to get * @returns The template with the given type, or undefined if not found */ static getTemplate(type: string): NodeTemplate | undefined; /** * Check if a template exists in the registry * @param type Type of the template to check * @returns True if the template exists in the registry */ static hasTemplate(type: string): boolean; /** * Initialize the registry with default templates */ static initializeDefaults(): void; /** * Register an existing template in the registry * @param template Template to register * @returns The registered template */ static registerExistingTemplate(template: NodeTemplate): NodeTemplate; /** * Register a template in the registry * @param type Type of the template * @param options Options for the template * @returns The registered template */ static registerTemplate(type: string, options?: NodeTemplateOptions): NodeTemplate; } //# sourceMappingURL=NodeRegistry.d.ts.map