graphic-pixi/lib/core/GraphicStore.d.ts

91 lines
2.5 KiB
TypeScript
Raw Normal View History

2023-12-12 17:31:07 +08:00
import { RelationManage } from './GraphicRelation';
import { JlGraphic } from './JlGraphic';
export interface GraphicQueryStore {
/**
*
*/
getAllGraphics(): JlGraphic[];
/**
* id获取图形
*/
queryById<T extends JlGraphic>(id: string): T;
/**
* id模糊查询图形
* @param id
*/
queryByIdAmbiguous(id: string): JlGraphic[];
/**
*
*/
queryByType<T extends JlGraphic>(type: string): T[];
/**
* code查询
* @param code
*/
queryByCode(code: string): JlGraphic[] | undefined;
/**
* code模糊查询图形
* @param code
* @param type
*/
queryByCodeAmbiguous(code: string): JlGraphic[];
/**
* id或code查询图形
* @param v
*/
queryByIdOrCode(v: string): JlGraphic[];
/**
* id或code及类型查询图形
* @param v
* @param type
*/
queryByIdOrCodeAndType(v: string, type: string): JlGraphic[];
/**
* code和类型获取图形
* @param code
* @param type
*/
queryByCodeAndType<T extends JlGraphic>(code: string, type: string): T | undefined;
/**
* code和类型模糊查询图形
* @param code
* @param type
*/
queryByCodeAndTypeAmbiguous<T extends JlGraphic>(code: string, type: string): T[];
}
/**
*
*/
export declare class GraphicStore implements GraphicQueryStore {
store: Map<string, JlGraphic>;
relationManage: RelationManage;
constructor();
/**
*
*/
getAllGraphics(): JlGraphic[];
queryById<T extends JlGraphic>(id: string): T;
queryByIdAmbiguous(id: string): JlGraphic[];
queryByType<T extends JlGraphic>(type: string): T[];
queryByCode(code: string): JlGraphic[] | undefined;
queryByCodeAmbiguous(code: string): JlGraphic[];
queryByIdOrCode(s: string): JlGraphic[];
queryByIdOrCodeAndType(s: string, type: string): JlGraphic[];
queryByCodeAndType<T extends JlGraphic>(code: string, type: string): T | undefined;
queryByCodeAndTypeAmbiguous<T extends JlGraphic>(code: string, type: string): T[];
/**
*
* @param graphics
*/
storeGraphics(graphic: JlGraphic): boolean;
/**
*
* @param graph
*/
deleteGraphics(graphic: JlGraphic): JlGraphic | undefined;
/**
*
*/
clear(): void;
}