import { AbleRegistry, ConfigEntity, Entity, EntityManager, EntityRegistry } from '../../common'; /** * 注入到Layer中的实体选择器 */ export interface PipelineEntities extends Iterable { /** * 获取单个实体, 如果该实体是单例且被注册过,则会自动创建 * @param registry */ get(registry: EntityRegistry, id?: string): T | undefined; /** * 获取多个实体 * @param registry */ getEntities(registry: EntityRegistry): T[]; /** * 通过Able获取多个实体 * @param registry */ getEntitiesByAble(registry: AbleRegistry): T[]; /** * 通过多个Ables获取多个实体 * @param andAbles - 多个able,条件且 * @param orAbles - 多个able,条件或 */ getEntitiesByAbles(andAbles: AbleRegistry[], orAbles?: AbleRegistry[]): T[]; /** * 是否存在 * @param registry */ has(registry: EntityRegistry): boolean; /** * 获取配置信息 * @param registry */ getConfig(registry: EntityRegistry): E['config'] | undefined; /** * 更新配置数据 */ updateConfig(registry: EntityRegistry, props: Partial): void; /** * 创建实体 */ createEntity: (registry: EntityRegistry, opts?: Omit) => E; /** * 批量删除实体 */ removeEntities: (registry: EntityRegistry) => void; /** * 当前画布订阅的实体数目 */ readonly size: number; } export declare class PipelineEntitiesImpl implements PipelineEntities { protected readonly entityManager: EntityManager; protected originEntities: Entity[]; protected entitiesTypeCache: Map; protected entitiesAbleCache: Map; constructor(entityManager: EntityManager); get size(): number; /** * 加载数据 * @param entities */ load(entities: Entity[]): void; get(registry: EntityRegistry, id?: string): T | undefined; has(registy: EntityRegistry): boolean; getEntities(registry: EntityRegistry): T[]; getEntitiesByAble(able: AbleRegistry): T[]; getEntitiesByAbles(andAbles?: AbleRegistry[], orAbles?: AbleRegistry[]): T[]; updateConfig(registry: EntityRegistry, props: Partial): void; getConfig(registry: EntityRegistry): E['config'] | undefined; /** * 创建实体 */ createEntity(registry: EntityRegistry, opts?: Omit): E; /** * 批量删除实体 */ removeEntities(registry: EntityRegistry): void; [Symbol.iterator](): Iterator; } //# sourceMappingURL=pipeline-entities.d.ts.map