import type { Embedded } from '@lcap/nasl-types'; import { TranslatorGenerator } from '@lcap/nasl-translator'; import type Module from './Module__'; import BaseNode from '../common/BaseNode'; import type TypeParam from './TypeParam__'; import type StructureProperty from './StructureProperty__'; /** * 数据结构 */ export declare class Structure extends BaseNode { /** 类名 */ static readonly ConceptName: string; /** * 是否为抽象类 * 抽象类不能产生 concept: string */ static isAbstract: boolean; /** 继承链 */ static readonly inheritanceChain: string[]; /** * 产品概念 */ readonly concept: 'Structure'; /** * 数据结构名称 */ name: string; /** * 数据结构描述 */ description?: string; /** * 类型参数列表 */ typeParams?: Array; /** * 数据结构属性列表 */ properties: Array; /** * @param source 需要合并的部分参数 */ constructor(source?: Partial); static from(source: any, parentNode?: any, parentKey?: string): Structure; /** * 设置数据结构名称 */ setName(name: string): void; /** * 设置数据结构描述 */ setDescription(description: string): void; getTypeParamExistingNames(excludedList?: Array): string[]; getTypeParamUniqueName(name?: string): string; /** * 插入类型参数 * @internal * @param name 类型参数名称,如果不填会自动生成一个唯一名称 */ _insertTypeParamAt(name: string, index: number): TypeParam; /** * 插入类型参数 * @internal * @param typeParamOptions 类型参数参数 */ _insertTypeParamAt(typeParamOptions: Partial, index: number): TypeParam; /** * 插入类型参数 * @internal * @param typeParam 已有的类型参数实例 */ _insertTypeParamAt(typeParam: TypeParam, index: number): TypeParam; /** * 插入类型参数 * @param name 类型参数名称,如果不填会自动生成一个唯一名称 */ insertTypeParamAt(name: string, index: number): TypeParam; /** * 插入类型参数 * @param typeParamOptions 类型参数参数 */ insertTypeParamAt(typeParamOptions: Partial, index: number): TypeParam; /** * 插入类型参数 * @param typeParam 已有的类型参数实例 */ insertTypeParamAt(typeParam: TypeParam, index: number): TypeParam; /** * 添加类型参数 * @internal * @param name 类型参数名称,如果不填会自动生成一个唯一名称 */ _addTypeParam(name?: string): TypeParam; /** * 添加类型参数 * @internal * @param typeParamOptions 类型参数参数 */ _addTypeParam(typeParamOptions: Partial): TypeParam; /** * 添加类型参数 * @internal * @param typeParam 已有的类型参数实例 */ _addTypeParam(typeParam: TypeParam): TypeParam; /** * 添加类型参数 * @internal * @param name 类型参数名称,如果不填会自动生成一个唯一名称 */ addTypeParam(name?: string): TypeParam; /** * 添加类型参数 * @param typeParamOptions 类型参数参数 */ addTypeParam(typeParamOptions: Partial): TypeParam; /** * 添加类型参数 * @param typeParam 已有的类型参数实例 */ addTypeParam(typeParam: TypeParam): TypeParam; getPropertyExistingNames(excludedList?: Array): string[]; getPropertyUniqueName(name?: string): string; /** * 插入数据结构属性 * @internal * @param name 数据结构属性名称,如果不填会自动生成一个唯一名称 */ _insertPropertyAt(name: string, index: number): StructureProperty; /** * 插入数据结构属性 * @internal * @param propertyOptions 数据结构属性参数 */ _insertPropertyAt(propertyOptions: Partial, index: number): StructureProperty; /** * 插入数据结构属性 * @internal * @param property 已有的数据结构属性实例 */ _insertPropertyAt(property: StructureProperty, index: number): StructureProperty; /** * 插入数据结构属性 * @param name 数据结构属性名称,如果不填会自动生成一个唯一名称 */ insertPropertyAt(name: string, index: number): StructureProperty; /** * 插入数据结构属性 * @param propertyOptions 数据结构属性参数 */ insertPropertyAt(propertyOptions: Partial, index: number): StructureProperty; /** * 插入数据结构属性 * @param property 已有的数据结构属性实例 */ insertPropertyAt(property: StructureProperty, index: number): StructureProperty; /** * 添加数据结构属性 * @internal * @param name 数据结构属性名称,如果不填会自动生成一个唯一名称 */ _addProperty(name?: string): StructureProperty; /** * 添加数据结构属性 * @internal * @param propertyOptions 数据结构属性参数 */ _addProperty(propertyOptions: Partial): StructureProperty; /** * 添加数据结构属性 * @internal * @param property 已有的数据结构属性实例 */ _addProperty(property: StructureProperty): StructureProperty; /** * 添加数据结构属性 * @internal * @param name 数据结构属性名称,如果不填会自动生成一个唯一名称 */ addProperty(name?: string): StructureProperty; /** * 添加数据结构属性 * @param propertyOptions 数据结构属性参数 */ addProperty(propertyOptions: Partial): StructureProperty; /** * 添加数据结构属性 * @param property 已有的数据结构属性实例 */ addProperty(property: StructureProperty): StructureProperty; /** * 删除类型参数 * @param name 类型参数名称 */ removeTypeParam(name: string): void; /** * 删除类型参数 * @param typeParam 已有的类型参数实例 */ removeTypeParam(typeParam: TypeParam): void; /** * 删除数据结构属性 * @param name 数据结构属性名称 */ removeProperty(name: string): void; /** * 删除数据结构属性 * @param property 已有的数据结构属性实例 */ removeProperty(property: StructureProperty): void; /** * 祖先 Module */ get module(): Module; get integration(): import("./Integration__").Integration; get tsName(): any; /** * 是否为连接器,连接器不允许编辑 */ get isConnector(): boolean; /** * 是否可编辑 * */ get readonly(): boolean; get completeName(): string; get directory(): import("./Directory__").Directory; static createProtoTypeOnly(source: Partial): Structure; deleteLogincAndModule(): void; isRelatedToError(): boolean; toEmbeddedTS(state?: import("@lcap/nasl-types/out/translator").TranslatorState): TranslatorGenerator; toErrorEmbeddedTS(state?: import("@lcap/nasl-types/out/translator").TranslatorState): TranslatorGenerator; toNaturalTS(state?: import("@lcap/nasl-types/out/translator").TranslatorState): string; toTextualNASL(state?: import("@lcap/nasl-types/out/translator").TranslatorState): string; getNamespace(): string; getTsNamespace(): string; /** * 生成宿主语言的文件路径 * @param name 一般不用传,用于 rename */ getEmbeddedFilePath(name?: string): string; toEmbeddedTSFile(): Embedded.TSFileGenerator; toEmbeddedDeclarationTSFile(): Embedded.DeclarationTSFileResult; /** * 仅仅对比 properties 中的内容 * @param compareNode * @returns */ isSame(compareNode: Structure | Partial | null): boolean; } export default Structure; //# sourceMappingURL=Structure__.d.ts.map