335 lines
10 KiB
TypeScript
335 lines
10 KiB
TypeScript
type CKGUID = any; // Substitute with actual type
|
|
type CKBOOL = boolean; // Substitute with actual type
|
|
type CKParameterType = any; // Substitute with actual type
|
|
type CKSTRING = string;
|
|
type CK_ID = any; // Substitute with actual type
|
|
type CK_PARAMETEROPERATION = any; // Substitute with actual type
|
|
type CKOperationType = any; // Substitute with actual type
|
|
type CK_CLASSID = any; // Substitute with actual type
|
|
type CKBaseManager = any; // Substitute with actual type
|
|
type CKParameter = any; // Substitute with actual type
|
|
type CKContext = any; // Substitute with actual type
|
|
type CKError = any; // Substitute with actual type
|
|
type CKStateChunk = any; // Substitute with actual type
|
|
type CKFile = any; // Substitute with actual type
|
|
type CKFlagsStruct = any; // Substitute with actual type
|
|
type CKEnumStruct = any; // Substitute with actual type
|
|
type CKStructStruct = any; // Substitute with actual type
|
|
|
|
class CKStructHelper {
|
|
m_Context: CKContext;
|
|
m_StructDescription: CKStructStruct;
|
|
m_SubIDS: CK_ID[];
|
|
|
|
constructor(param: CKParameter | CKContext, guidOrUpdate?: CKGUID | CKBOOL, data?: CK_ID) {
|
|
if (param instanceof CKParameter) {
|
|
// Initialization for CKParameter
|
|
} else {
|
|
// Initialization for CKContext
|
|
}
|
|
}
|
|
|
|
GetMemberName(pos: number): string {
|
|
// Implementation
|
|
return '';
|
|
}
|
|
|
|
GetMemberGUID(pos: number): CKGUID {
|
|
// Implementation
|
|
return {} as CKGUID;
|
|
}
|
|
|
|
GetMemberCount(): number {
|
|
// Implementation
|
|
return 0;
|
|
}
|
|
|
|
[i: number]: CKParameter {
|
|
return this.m_Context.GetObject(this.m_SubIDS[i]) as CKParameter;
|
|
}
|
|
}
|
|
|
|
interface CKOperationDesc {
|
|
OpGuid: CKGUID;
|
|
P1Guid: CKGUID;
|
|
P2Guid: CKGUID;
|
|
ResGuid: CKGUID;
|
|
Fct: CK_PARAMETEROPERATION;
|
|
}
|
|
|
|
class CKParameterManager extends CKBaseManager {
|
|
m_Context: CKContext;
|
|
m_ParameterTypeEnumUpToDate: CKBOOL;
|
|
m_RegistredTypes: any[]; // Substitute with actual type
|
|
m_NbOperations: number;
|
|
m_NbAllocatedOperations: number;
|
|
m_OperationTree: OperationCell;
|
|
m_ParamGuids: XHashTable<number, CKGUID>;
|
|
m_OpGuids: XHashTable<number, CKGUID>;
|
|
m_DerivationMasksUpTodate: boolean;
|
|
m_NbFlagsDefined: number;
|
|
m_Flags: CKFlagsStruct;
|
|
m_NbStructDefined: number;
|
|
m_Structs: CKStructStruct;
|
|
m_NbEnumsDefined: number;
|
|
m_Enums: CKEnumStruct;
|
|
private m_ReplaceDuplicateUserFlagEnum: number;
|
|
|
|
constructor(context: CKContext) {
|
|
super();
|
|
// Initialization
|
|
}
|
|
|
|
RegisterParameterType(param_type: any): CKError {
|
|
// Implementation
|
|
return {} as CKError;
|
|
}
|
|
UnRegisterParameterType(guid: CKGUID): CKError {
|
|
// Implementation
|
|
return {} as CKError;
|
|
}
|
|
GetParameterTypeDescription(type: number): any {
|
|
// Implementation
|
|
return {};
|
|
}
|
|
GetParameterTypeDescription(guid: CKGUID): any {
|
|
// Implementation
|
|
return {};
|
|
}
|
|
GetParameterSize(type: CKParameterType): number {
|
|
// Implementation
|
|
return 0;
|
|
}
|
|
GetParameterTypesCount(): number {
|
|
// Implementation
|
|
return 0;
|
|
}
|
|
ChangeParametersGuid(iOldGuid: CKGUID, iNewGuid: CKGUID): CKError {
|
|
// Implementation
|
|
return {} as CKError;
|
|
}
|
|
ParameterGuidToType(guid: CKGUID): CKParameterType {
|
|
// Implementation
|
|
return {} as CKParameterType;
|
|
}
|
|
ParameterGuidToName(guid: CKGUID): CKSTRING {
|
|
// Implementation
|
|
return '';
|
|
}
|
|
ParameterTypeToGuid(type: CKParameterType): CKGUID {
|
|
// Implementation
|
|
return {} as CKGUID;
|
|
}
|
|
ParameterTypeToName(type: CKParameterType): CKSTRING {
|
|
// Implementation
|
|
return '';
|
|
}
|
|
ParameterNameToGuid(name: CKSTRING): CKGUID {
|
|
// Implementation
|
|
return {} as CKGUID;
|
|
}
|
|
ParameterNameToType(name: CKSTRING): CKParameterType {
|
|
// Implementation
|
|
return {} as CKParameterType;
|
|
}
|
|
IsDerivedFrom(guid1: CKGUID, parent: CKGUID): CKBOOL {
|
|
// Implementation
|
|
return false;
|
|
}
|
|
IsDerivedFrom(child: CKParameterType, parent: CKParameterType): CKBOOL {
|
|
// Implementation
|
|
return false;
|
|
}
|
|
IsTypeCompatible(guid1: CKGUID, guid2: CKGUID): CKBOOL {
|
|
// Implementation
|
|
return false;
|
|
}
|
|
IsTypeCompatible(ptype1: CKParameterType, ptype2: CKParameterType): CKBOOL {
|
|
// Implementation
|
|
return false;
|
|
}
|
|
TypeToClassID(type: CKParameterType): CK_CLASSID {
|
|
// Implementation
|
|
return {} as CK_CLASSID;
|
|
}
|
|
GuidToClassID(guid: CKGUID): CK_CLASSID {
|
|
// Implementation
|
|
return {} as CK_CLASSID;
|
|
}
|
|
ClassIDToType(cid: CK_CLASSID): CKParameterType {
|
|
// Implementation
|
|
return {} as CKParameterType;
|
|
}
|
|
ClassIDToGuid(cid: CK_CLASSID): CKGUID {
|
|
// Implementation
|
|
return {} as CKGUID;
|
|
}
|
|
RegisterNewFlags(FlagsGuid: CKGUID, FlagsName: CKSTRING, FlagsData: CKSTRING): CKError {
|
|
// Implementation
|
|
return {} as CKError;
|
|
}
|
|
RegisterNewEnum(EnumGuid: CKGUID, EnumName: CKSTRING, EnumData: CKSTRING): CKError {
|
|
// Implementation
|
|
return {} as CKError;
|
|
}
|
|
ChangeEnumDeclaration(EnumGuid: CKGUID, EnumData: CKSTRING): CKError {
|
|
// Implementation
|
|
return {} as CKError;
|
|
}
|
|
ChangeFlagsDeclaration(FlagsGuid: CKGUID, FlagsData: CKSTRING): CKError {
|
|
// Implementation
|
|
return {} as CKError;
|
|
}
|
|
RegisterNewStructure(StructGuid: CKGUID, StructName: CKSTRING, Structdata: CKSTRING, ...args: any[]): CKError {
|
|
// Implementation
|
|
return {} as CKError;
|
|
}
|
|
GetEnumBuildString(pType: CKParameterType, oBuildString: CKSTRING): CKError {
|
|
// Implementation
|
|
return {} as CKError;
|
|
}
|
|
GetFlagBuildString(pType: CKParameterType, oBuildString: CKSTRING): CKError {
|
|
// Implementation
|
|
return {} as CKError;
|
|
}
|
|
GetNbFlagDefined(): number {
|
|
// Implementation
|
|
return 0;
|
|
}
|
|
GetNbEnumDefined(): number {
|
|
// Implementation
|
|
return 0;
|
|
}
|
|
GetNbStructDefined(): number {
|
|
// Implementation
|
|
return 0;
|
|
}
|
|
GetFlagsDescByType(pType: CKParameterType): CKFlagsStruct {
|
|
// Implementation
|
|
return {} as CKFlagsStruct;
|
|
}
|
|
GetEnumDescByType(pType: CKParameterType): CKEnumStruct {
|
|
// Implementation
|
|
return {} as CKEnumStruct;
|
|
}
|
|
GetStructDescByType(pType: CKParameterType): CKStructStruct {
|
|
// Implementation
|
|
return {} as CKStructStruct;
|
|
}
|
|
RegisterOperationType(OpCode: CKGUID, name: CKSTRING): CKOperationType {
|
|
// Implementation
|
|
return {} as CKOperationType;
|
|
}
|
|
UnRegisterOperationType(opguid: CKGUID): CKError {
|
|
// Implementation
|
|
return {} as CKError;
|
|
}
|
|
UnRegisterOperationType(opcode: CKOperationType): CKError {
|
|
// Implementation
|
|
return {} as CKError;
|
|
}
|
|
RegisterOperationFunction(operation: CKGUID, type_paramres: CKGUID, type_param1: CKGUID, type_param2: CKGUID, op: CK_PARAMETEROPERATION): CKError {
|
|
// Implementation
|
|
return {} as CKError;
|
|
}
|
|
GetOperationFunction(operation: CKGUID, type_paramres: CKGUID, type_param1: CKGUID, type_param2: CKGUID): CK_PARAMETEROPERATION {
|
|
// Implementation
|
|
return {} as CK_PARAMETEROPERATION;
|
|
}
|
|
UnRegisterOperationFunction(operation: CKGUID, type_paramres: CKGUID, type_param1: CKGUID, type_param2: CKGUID): CKError {
|
|
// Implementation
|
|
return {} as CKError;
|
|
}
|
|
OperationCodeToGuid(type: CKOperationType): CKGUID {
|
|
// Implementation
|
|
return {} as CKGUID;
|
|
}
|
|
OperationCodeToName(type: CKOperationType): CKSTRING {
|
|
// Implementation
|
|
return '';
|
|
}
|
|
OperationGuidToCode(guid: CKGUID): CKOperationType {
|
|
// Implementation
|
|
return {} as CKOperationType;
|
|
}
|
|
OperationGuidToName(guid: CKGUID): CKSTRING {
|
|
// Implementation
|
|
return '';
|
|
}
|
|
OperationNameToGuid(name: CKSTRING): CKGUID {
|
|
// Implementation
|
|
return {} as CKGUID;
|
|
}
|
|
OperationNameToCode(name: CKSTRING): CKOperationType {
|
|
// Implementation
|
|
return {} as CKOperationType;
|
|
}
|
|
GetAvailableOperationsDesc(opGuid: CKGUID, res: any, p1: any, p2: any, list: CKOperationDesc[]): number {
|
|
// Implementation
|
|
return 0;
|
|
}
|
|
GetParameterOperationCount(): number {
|
|
// Implementation
|
|
return 0;
|
|
}
|
|
IsParameterTypeToBeShown(type: CKParameterType): boolean {
|
|
// Implementation
|
|
return false;
|
|
}
|
|
IsParameterTypeToBeShown(guid: CKGUID): boolean {
|
|
// Implementation
|
|
return false;
|
|
}
|
|
CheckParamTypeValidity(type: CKParameterType): boolean {
|
|
// Implementation
|
|
return false;
|
|
}
|
|
UpdateParameterEnum(): void {
|
|
// Implementation
|
|
}
|
|
SaveData(SavedFile: CKFile): CKStateChunk | null {
|
|
// Implementation
|
|
return null;
|
|
}
|
|
LoadData(chunk: CKStateChunk, LoadedFile: CKFile): CKError {
|
|
// Implementation
|
|
return {} as CKError;
|
|
}
|
|
CheckOpCodeValidity(type: CKOperationType): boolean {
|
|
// Implementation
|
|
return false;
|
|
}
|
|
GetParameterGuidParentGuid(child: CKGUID, parent: CKGUID): CKBOOL {
|
|
// Implementation
|
|
return false;
|
|
}
|
|
UpdateDerivationTables(): void {
|
|
// Implementation
|
|
}
|
|
RecurseDeleteParam(cell: TreeCell, param: CKGUID): void {
|
|
// Implementation
|
|
}
|
|
DichotomicSearch(start: number, end: number, tab: TreeCell, key: CKGUID): number {
|
|
// Implementation
|
|
return 0;
|
|
}
|
|
RecurseDelete(cell: TreeCell): void {
|
|
// Implementation
|
|
}
|
|
IsDerivedFromIntern(child: number, parent: number): CKBOOL {
|
|
// Implementation
|
|
return false;
|
|
}
|
|
RemoveAllParameterTypes(): CKBOOL {
|
|
// Implementation
|
|
return false;
|
|
}
|
|
RemoveAllOperations(): CKBOOL {
|
|
// Implementation
|
|
return false;
|
|
}
|
|
private m_ReplaceDuplicateUserFlagEnum: number; // Implementation
|
|
}
|
|
|
|
interface TreeCell { /* ... */ }
|
|
interface OperationCell { /* ... */ } |