/** * Copyright (c) 2018-2021 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author David Sehnal * @author Alexander Rose */ import { CifWriter } from '../mol-io/writer/cif.js'; import { CifExportContext } from './structure/export/mmcif.js'; import { QuerySymbolRuntime } from '../mol-script/runtime/query/compiler.js'; import { UUID } from '../mol-util/index.js'; export { CustomPropertyDescriptor, CustomProperties }; interface CustomPropertyDescriptor { readonly name: string; cifExport?: { prefix: string; context?: (ctx: CifExportContext) => ExportCtx | undefined; categories: CifWriter.Category[]; }; symbols?: Symbols; } declare function CustomPropertyDescriptor>(desc: Desc): Desc; declare namespace CustomPropertyDescriptor { function getUUID(prop: CustomPropertyDescriptor): UUID; } /** * Anything with a dispose method, used to despose of data assets or webgl resources */ type Asset = { dispose: () => void; }; declare class CustomProperties { private _list; private _set; private _refs; private _assets; get all(): ReadonlyArray; add(desc: CustomPropertyDescriptor): void; reference(desc: CustomPropertyDescriptor, add: boolean): void; hasReference(desc: CustomPropertyDescriptor): boolean; has(desc: CustomPropertyDescriptor): boolean; /** Sets assets for a prop, disposes of existing assets for that prop */ assets(desc: CustomPropertyDescriptor, assets?: Asset[]): void; /** Disposes of all assets of all props */ dispose(): void; }