From f5da34521d4b04ea84f4a264cc6f6fb094a6ccb7 Mon Sep 17 00:00:00 2001 From: evgeny-k Date: Fri, 17 Nov 2023 13:27:50 +0300 Subject: [PATCH] better x64 support: use class helpers for registration properties and methods --- Addon/DataAbstract/uDAPascalScript.pas | 1185 ++++++- Addon/RemObjects SDK/uROPSImports.pas | 380 +- Addon/RemObjects SDK/uROPSServerLink.pas | 110 +- Source/PascalScript.inc | 8 + Source/ThirdParty/uPSI_Dialogs.pas | 755 +++- Source/ThirdParty/uPSI_IBX.pas | 2388 +++++++++++-- Source/ThirdParty/uPSI_JvMail.pas | 350 +- Source/ThirdParty/uPSI_Mask.pas | 79 +- Source/ThirdParty/uPSI_Registry.pas | 269 +- Source/uPSPreProcessor.pas | 8 +- Source/uPSR_DB.pas | 4032 ++++++++++++++++++---- Source/uPSR_classes.pas | 749 +++- Source/uPSR_controls.pas | 287 +- Source/uPSR_extctrls.pas | 114 +- Source/uPSR_forms.pas | 341 +- Source/uPSR_graphics.pas | 301 +- Source/uPSR_menus.pas | 727 +++- Source/uPSR_std.pas | 61 +- Source/uPSR_stdctrls.pas | 295 +- Source/uPSRuntime.pas | 1 - 20 files changed, 10740 insertions(+), 1700 deletions(-) diff --git a/Addon/DataAbstract/uDAPascalScript.pas b/Addon/DataAbstract/uDAPascalScript.pas index 80836b0..9c39c40 100644 --- a/Addon/DataAbstract/uDAPascalScript.pas +++ b/Addon/DataAbstract/uDAPascalScript.pas @@ -7,7 +7,11 @@ unit uDAPascalScript; { Using this code requires a valid license of the Data Abstract } { which can be obtained at http://www.remobjects.com. } {----------------------------------------------------------------------------} - +{$IFDEF MSWINDOWS} +{$I ..\..\Source\PascalScript.inc} +{$ELSE} +{$I ../../Source/PascalScript.inc} +{$ENDIF} {$I DataAbstract.inc} interface @@ -247,7 +251,210 @@ begin end; (* === run-time registration functions === *) +{$IFDEF DELPHI10UP}{$REGION 'TDADataTable'}{$ENDIF} +{$IFDEF class_helper_present} +type + TDADataTable_PSHelper = class helper for TDADataTable + public + procedure Active_R(var T: boolean); + procedure Active_W(const T: boolean); + procedure BusinessRulesID_R(var T: string); + procedure BusinessRulesID_W(const T: string); + procedure DetailFields_R(var T: string); + procedure DetailFields_W(const T: string); + procedure DetailOptions_R(var T: TDADetailOptions); + procedure DetailOptions_W(const T: TDADetailOptions); + procedure Fields_R(var T: TDAFieldCollection); + procedure Fields_W(const T: TDAFieldCollection); + procedure Filter_R(var T: string); + procedure Filter_W(const T: string); + procedure Filtered_R(var T: boolean); + procedure Filtered_W(const T: boolean); + procedure LogChanges_R(var T: boolean); + procedure LogChanges_W(const T: boolean); + procedure LogicalName_R(var T: string); + procedure LogicalName_W(const T: string); + procedure MasterFields_R(var T: string); + procedure MasterFields_W(const T: string); + procedure MasterOptions_R(var T: TDAMasterOptions); + procedure MasterOptions_W(const T: TDAMasterOptions); + procedure MasterRequestMappings_R(var T: TStrings); + procedure MasterRequestMappings_W(const T: TStrings); + procedure Params_R(var T: TDAParamCollection); + procedure Params_W(const T: TDAParamCollection); + procedure RemoteFetchEnabled_R(var T: boolean); + procedure RemoteFetchEnabled_W(const T: boolean); + procedure State_R(var T: TDataSetState); + end; +procedure TDADataTable_PSHelper.BusinessRulesID_W(const T: string); +begin + Self.BusinessRulesID := T; +end; + +procedure TDADataTable_PSHelper.BusinessRulesID_R(var T: string); +begin + T := Self.BusinessRulesID; +end; + +procedure TDADataTable_PSHelper.LogicalName_W(const T: string); +begin + Self.LogicalName := T; +end; + +procedure TDADataTable_PSHelper.LogicalName_R(var T: string); +begin + T := Self.LogicalName; +end; + +procedure TDADataTable_PSHelper.Filter_W(const T: string); +begin + Self.Filter := T; +end; + +procedure TDADataTable_PSHelper.Filter_R(var T: string); +begin + T := Self.Filter; +end; + +procedure TDADataTable_PSHelper.Filtered_W(const T: boolean); +begin + Self.Filtered := T; +end; + +procedure TDADataTable_PSHelper.Filtered_R(var T: boolean); +begin + T := Self.Filtered; +end; + +procedure TDADataTable_PSHelper.MasterOptions_W(const T: TDAMasterOptions); +begin + Self.MasterOptions := T; +end; + +procedure TDADataTable_PSHelper.MasterOptions_R(var T: TDAMasterOptions); +begin + T := Self.MasterOptions; +end; + +procedure TDADataTable_PSHelper.DetailOptions_W(const T: TDADetailOptions); +begin + Self.DetailOptions := T; +end; + +procedure TDADataTable_PSHelper.DetailOptions_R(var T: TDADetailOptions); +begin + T := Self.DetailOptions; +end; + +procedure TDADataTable_PSHelper.MasterRequestMappings_W(const T: TStrings); +begin + Self.MasterRequestMappings := T; +end; + +procedure TDADataTable_PSHelper.MasterRequestMappings_R(var T: TStrings); +begin + T := Self.MasterRequestMappings; +end; + +procedure TDADataTable_PSHelper.DetailFields_W(const T: string); +begin + Self.DetailFields := T; +end; + +procedure TDADataTable_PSHelper.DetailFields_R(var T: string); +begin + T := Self.DetailFields; +end; + +procedure TDADataTable_PSHelper.MasterFields_W(const T: string); +begin + Self.MasterFields := T; +end; + +procedure TDADataTable_PSHelper.MasterFields_R(var T: string); +begin + T := Self.MasterFields; +end; + +procedure TDADataTable_PSHelper.RemoteFetchEnabled_W(const T: boolean); +begin + Self.RemoteFetchEnabled := T; +end; + +procedure TDADataTable_PSHelper.RemoteFetchEnabled_R(var T: boolean); +begin + T := Self.RemoteFetchEnabled; +end; + +procedure TDADataTable_PSHelper.LogChanges_W(const T: boolean); +begin + Self.LogChanges := T; +end; + +procedure TDADataTable_PSHelper.LogChanges_R(var T: boolean); +begin + T := Self.LogChanges; +end; + +procedure TDADataTable_PSHelper.Params_W(const T: TDAParamCollection); +begin + Self.Params := T; +end; + +procedure TDADataTable_PSHelper.Params_R(var T: TDAParamCollection); +begin + T := Self.Params; +end; + +procedure TDADataTable_PSHelper.Fields_W(const T: TDAFieldCollection); +begin + Self.Fields := T; +end; + +procedure TDADataTable_PSHelper.Fields_R(var T: TDAFieldCollection); +begin + T := Self.Fields; +end; + +procedure TDADataTable_PSHelper.Active_W(const T: boolean); +begin + Self.Active := T; +end; + +procedure TDADataTable_PSHelper.Active_R(var T: boolean); +begin + T := Self.Active; +end; + +procedure TDADataTable_PSHelper.State_R(var T: TDataSetState); +begin + T := Self.State; +end; + +procedure RIRegister_TDADataTable(CL: TIFPSRuntimeClassImporter); +var + lc:TPSRuntimeClass; +begin + lc := CL.Add(TDADataTable); + lc.RegisterPropertyHelper(@TDADataTable.Active_R, @TDADataTable.Active_W, 'Active'); + lc.RegisterPropertyHelper(@TDADataTable.Fields_R, @TDADataTable.Fields_W, 'Fields'); + lc.RegisterPropertyHelper(@TDADataTable.Params_R, @TDADataTable.Params_W, 'Params'); + lc.RegisterPropertyHelper(@TDADataTable.LogChanges_R, @TDADataTable.LogChanges_W, 'LogChanges'); + lc.RegisterPropertyHelper(@TDADataTable.RemoteFetchEnabled_R, @TDADataTable.RemoteFetchEnabled_W, 'RemoteFetchEnabled'); + lc.RegisterPropertyHelper(@TDADataTable.MasterFields_R, @TDADataTable.MasterFields_W, 'MasterFields'); + lc.RegisterPropertyHelper(@TDADataTable.DetailFields_R, @TDADataTable.DetailFields_W, 'DetailFields'); + lc.RegisterPropertyHelper(@TDADataTable.MasterRequestMappings_R, @TDADataTable.MasterRequestMappings_W, 'MasterRequestMappings'); + lc.RegisterPropertyHelper(@TDADataTable.DetailOptions_R, @TDADataTable.DetailOptions_W, 'DetailOptions'); + lc.RegisterPropertyHelper(@TDADataTable.MasterOptions_R, @TDADataTable.MasterOptions_W, 'MasterOptions'); + lc.RegisterPropertyHelper(@TDADataTable.Filtered_R, @TDADataTable.Filtered_W, 'Filtered'); + lc.RegisterPropertyHelper(@TDADataTable.Filter_R, @TDADataTable.Filter_W, 'Filter'); + lc.RegisterPropertyHelper(@TDADataTable.LogicalName_R, @TDADataTable.LogicalName_W, 'LogicalName'); + lc.RegisterPropertyHelper(@TDADataTable.BusinessRulesID_R, @TDADataTable.BusinessRulesID_W, 'BusinessRulesID'); + lc.RegisterPropertyHelper(@TDADataTable.State_R, nil, 'State'); +end; + +{$ELSE} procedure TDADataTableBusinessRulesID_W(Self: TDADataTable; const T: string); begin Self.BusinessRulesID := T; @@ -388,6 +595,78 @@ begin T := Self.Active; end; +procedure TDADataTableState_R(Self: TDADataTable; var T: TDataSetState); +begin + T := Self.State; +end; + +procedure RIRegister_TDADataTable(CL: TIFPSRuntimeClassImporter); +var + lc:TPSRuntimeClass; +begin + lc := CL.Add(TDADataTable); + lc.RegisterPropertyHelper(@TDADataTableActive_R, @TDADataTableActive_W, 'Active'); + lc.RegisterPropertyHelper(@TDADataTableFields_R, @TDADataTableFields_W, 'Fields'); + lc.RegisterPropertyHelper(@TDADataTableParams_R, @TDADataTableParams_W, 'Params'); + lc.RegisterPropertyHelper(@TDADataTableLogChanges_R, @TDADataTableLogChanges_W, 'LogChanges'); + lc.RegisterPropertyHelper(@TDADataTableRemoteFetchEnabled_R, @TDADataTableRemoteFetchEnabled_W, 'RemoteFetchEnabled'); + lc.RegisterPropertyHelper(@TDADataTableMasterFields_R, @TDADataTableMasterFields_W, 'MasterFields'); + lc.RegisterPropertyHelper(@TDADataTableDetailFields_R, @TDADataTableDetailFields_W, 'DetailFields'); + lc.RegisterPropertyHelper(@TDADataTableMasterRequestMappings_R, @TDADataTableMasterRequestMappings_W, 'MasterRequestMappings'); + lc.RegisterPropertyHelper(@TDADataTableDetailOptions_R, @TDADataTableDetailOptions_W, 'DetailOptions'); + lc.RegisterPropertyHelper(@TDADataTableMasterOptions_R, @TDADataTableMasterOptions_W, 'MasterOptions'); + lc.RegisterPropertyHelper(@TDADataTableFiltered_R, @TDADataTableFiltered_W, 'Filtered'); + lc.RegisterPropertyHelper(@TDADataTableFilter_R, @TDADataTableFilter_W, 'Filter'); + lc.RegisterPropertyHelper(@TDADataTableLogicalName_R, @TDADataTableLogicalName_W, 'LogicalName'); + lc.RegisterPropertyHelper(@TDADataTableBusinessRulesID_R, @TDADataTableBusinessRulesID_W, 'BusinessRulesID'); + lc.RegisterPropertyHelper(@TDADataTableState_R, nil, 'State'); +end; + +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TDAParamCollection'}{$ENDIF} +{$IFDEF class_helper_present} +type + TDAParamCollection_PSHelper = class helper for TDAParamCollection + public + procedure HasInputParams_R(var T: boolean); + procedure Params_R(var T: TDAParam; const t1: integer); + procedure Params_W(const T: TDAParam; const t1: integer); + end; + +procedure TDAParamCollection_PSHelper.HasInputParams_R(var T: boolean); +begin + T := Self.HasInputParams; +end; + +procedure TDAParamCollection_PSHelper.Params_W(const T: TDAParam; const t1: integer); +begin + Self.Params[t1] := T; +end; + +procedure TDAParamCollection_PSHelper.Params_R(var T: TDAParam; const t1: integer); +begin + T := Self.Params[t1]; +end; + +procedure RIRegister_TDAParamCollection(CL: TIFPSRuntimeClassImporter); +var + lc:TPSRuntimeClass; +begin + lc := CL.Add(TDAParamCollection); + lc.RegisterConstructor(@TDAParamCollection.Create, 'Create'); + lc.RegisterMethod(@TDAParamCollection.WriteValues, 'WriteValues'); + lc.RegisterMethod(@TDAParamCollection.ReadValues, 'ReadValues'); + lc.RegisterMethod(@TDAParamCollection.Add, 'Add'); + lc.RegisterMethod(@TDAParamCollection.ParamByName, 'ParamByName'); + lc.RegisterMethod(@TDAParamCollection.FindParam, 'FindParam'); + lc.RegisterMethod(@TDAParamCollection.AssignParamCollection, 'AssignParamCollection'); + lc.RegisterPropertyHelper(@TDAParamCollection.Params_R, @TDAParamCollection.Params_W, 'Params'); + lc.RegisterPropertyHelper(@TDAParamCollection.HasInputParams_R, nil, 'HasInputParams'); +end; + +{$ELSE} procedure TDAParamCollectionHasInputParams_R(Self: TDAParamCollection; var T: boolean); begin T := Self.HasInputParams; @@ -403,6 +682,57 @@ begin T := Self.Params[t1]; end; +procedure RIRegister_TDAParamCollection(CL: TIFPSRuntimeClassImporter); +var + lc:TPSRuntimeClass; +begin + lc := CL.Add(TDAParamCollection); + lc.RegisterConstructor(@TDAParamCollection.Create, 'Create'); + lc.RegisterMethod(@TDAParamCollection.WriteValues, 'WriteValues'); + lc.RegisterMethod(@TDAParamCollection.ReadValues, 'ReadValues'); + lc.RegisterMethod(@TDAParamCollection.Add, 'Add'); + lc.RegisterMethod(@TDAParamCollection.ParamByName, 'ParamByName'); + lc.RegisterMethod(@TDAParamCollection.FindParam, 'FindParam'); + lc.RegisterMethod(@TDAParamCollection.AssignParamCollection, 'AssignParamCollection'); + lc.RegisterPropertyHelper(@TDAParamCollectionParams_R, @TDAParamCollectionParams_W, 'Params'); + lc.RegisterPropertyHelper(@TDAParamCollectionHasInputParams_R, nil, 'HasInputParams'); +end; + +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TDAParam'}{$ENDIF} +{$IFDEF class_helper_present} +type + TDAParam_PSHelper = class helper for TDAParam + public + procedure ParamType_W(const T: TDAParamType); + procedure ParamType_R(var T: TDAParamType); + end; + +procedure TDAParam_PSHelper.ParamType_W(const T: TDAParamType); +begin + Self.ParamType := T; +end; + +procedure TDAParam_PSHelper.ParamType_R(var T: TDAParamType); +begin + T := Self.ParamType; +end; + +procedure RIRegister_TDAParam(CL: TIFPSRuntimeClassImporter); +var + lc:TPSRuntimeClass; +begin + lc := CL.Add(TDAParam); + lc.RegisterMethod(@TDAParam.SaveToStream, 'SaveToStream'); + lc.RegisterMethod(@TDAParam.LoadFromStream, 'LoadFromStream'); + lc.RegisterMethod(@TDAParam.SaveToFile, 'SaveToFile'); + lc.RegisterMethod(@TDAParam.LoadFromFile, 'LoadFromFile'); + lc.RegisterPropertyHelper(@TDAParam.ParamType_R, @TDAParam.ParamType_W, 'ParamType'); +end; + +{$ELSE} procedure TDAParamParamType_W(Self: TDAParam; const T: TDAParamType); begin Self.ParamType := T; @@ -413,6 +743,51 @@ begin T := Self.ParamType; end; +procedure RIRegister_TDAParam(CL: TIFPSRuntimeClassImporter); +var + lc:TPSRuntimeClass; +begin + lc := CL.Add(TDAParam); + lc.RegisterMethod(@TDAParam.SaveToStream, 'SaveToStream'); + lc.RegisterMethod(@TDAParam.LoadFromStream, 'LoadFromStream'); + lc.RegisterMethod(@TDAParam.SaveToFile, 'SaveToFile'); + lc.RegisterMethod(@TDAParam.LoadFromFile, 'LoadFromFile'); + lc.RegisterPropertyHelper(@TDAParamParamType_R, @TDAParamParamType_W, 'ParamType'); +end; + +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TDAFieldCollection'}{$ENDIF} +{$IFDEF class_helper_present} +type + TDAFieldCollection_PSHelper = class helper for TDAFieldCollection + public + procedure Fields_R(var T: TDAField; const t1: integer); + procedure Fields_W(const T: TDAField; const t1: integer); + end; + +procedure TDAFieldCollection_PSHelper.Fields_W(const T: TDAField; const t1: integer); +begin + Self.Fields[t1] := T; +end; + +procedure TDAFieldCollection_PSHelper.Fields_R(var T: TDAField; const t1: integer); +begin + T := Self.Fields[t1]; +end; + +procedure RIRegister_TDAFieldCollection(CL: TIFPSRuntimeClassImporter); +var + lc:TPSRuntimeClass; +begin + lc := CL.Add(TDAFieldCollection); + lc.RegisterConstructor(@TDAFieldCollection.Create, 'Create'); + lc.RegisterMethod(@TDAFieldCollection.FieldByName, 'FieldByName'); + lc.RegisterMethod(@TDAFieldCollection.FindField, 'FindField'); + lc.RegisterPropertyHelper(@TDAFieldCollection.Fields_R, @TDAFieldCollection.Fields_W, 'Fields'); +end; +{$ELSE} procedure TDAFieldCollectionFields_W(Self: TDAFieldCollection; const T: TDAField; const t1: integer); begin Self.Fields[t1] := T; @@ -423,6 +798,79 @@ begin T := Self.Fields[t1]; end; +procedure RIRegister_TDAFieldCollection(CL: TIFPSRuntimeClassImporter); +var + lc:TPSRuntimeClass; +begin + lc := CL.Add(TDAFieldCollection); + lc.RegisterConstructor(@TDAFieldCollection.Create, 'Create'); + lc.RegisterMethod(@TDAFieldCollection.FieldByName, 'FieldByName'); + lc.RegisterMethod(@TDAFieldCollection.FindField, 'FindField'); + lc.RegisterPropertyHelper(@TDAFieldCollectionFields_R, @TDAFieldCollectionFields_W, 'Fields'); +end; +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TDACustomFieldCollection'}{$ENDIF} +{$IFDEF class_helper_present} +type + TDACustomFieldCollection_PSHelper = class helper for TDACustomFieldCollection + public + procedure DataDictionary_R(var T: IDADataDictionary); + procedure DataDictionary_W(const T: IDADataDictionary); + procedure FieldEventsDisabled_R(var T: boolean); + procedure FieldEventsDisabled_W(const T: boolean); + procedure Fields_R(var T: TDACustomField; const t1: integer); + procedure Fields_W(const T: TDACustomField; const t1: integer); + end; + +procedure TDACustomFieldCollection_PSHelper.Fields_W(const T: TDACustomField; const t1: integer); +begin + Self.Fields[t1] := T; +end; + +procedure TDACustomFieldCollection_PSHelper.Fields_R(var T: TDACustomField; const t1: integer); +begin + T := Self.Fields[t1]; +end; + +procedure TDACustomFieldCollection_PSHelper.DataDictionary_W(const T: IDADataDictionary); +begin + Self.DataDictionary := T; +end; + +procedure TDACustomFieldCollection_PSHelper.DataDictionary_R(var T: IDADataDictionary); +begin + T := Self.DataDictionary; +end; + +procedure TDACustomFieldCollection_PSHelper.FieldEventsDisabled_W(const T: boolean); +begin + Self.FieldEventsDisabled := T; +end; + +procedure TDACustomFieldCollection_PSHelper.FieldEventsDisabled_R(var T: boolean); +begin + T := Self.FieldEventsDisabled; +end; + +procedure RIRegister_TDACustomFieldCollection(CL: TIFPSRuntimeClassImporter); +var + lc:TPSRuntimeClass; +begin + lc := CL.Add(TDACustomFieldCollection); + lc.RegisterMethod(@TDACustomFieldCollection.Bind, 'Bind'); + lc.RegisterMethod(@TDACustomFieldCollection.Unbind, 'Unbind'); + lc.RegisterPropertyHelper(@TDACustomFieldCollection.FieldEventsDisabled_R, @TDACustomFieldCollection.FieldEventsDisabled_W, 'FieldEventsDisabled'); + lc.RegisterMethod(@TDACustomFieldCollection.AssignFieldCollection, 'AssignFieldCollection'); + lc.RegisterMethod(@TDACustomFieldCollection.FieldByName, 'FieldByName'); + lc.RegisterMethod(@TDACustomFieldCollection.FindField, 'FindField'); + lc.RegisterMethod(@TDACustomFieldCollection.MoveItem, 'MoveItem'); + lc.RegisterPropertyHelper(@TDACustomFieldCollection.DataDictionary_R, @TDACustomFieldCollection.DataDictionary_W, 'DataDictionary'); + lc.RegisterPropertyHelper(@TDACustomFieldCollection.Fields_R, @TDACustomFieldCollection.Fields_W, 'Fields'); +end; + +{$ELSE} procedure TDACustomFieldCollectionFields_W(Self: TDACustomFieldCollection; const T: TDACustomField; const t1: integer); begin Self.Fields[t1] := T; @@ -453,6 +901,359 @@ begin T := Self.FieldEventsDisabled; end; +procedure RIRegister_TDACustomFieldCollection(CL: TIFPSRuntimeClassImporter); +var + lc:TPSRuntimeClass; +begin + lc := CL.Add(TDACustomFieldCollection); + lc.RegisterMethod(@TDACustomFieldCollection.Bind, 'Bind'); + lc.RegisterMethod(@TDACustomFieldCollection.Unbind, 'Unbind'); + lc.RegisterPropertyHelper(@TDACustomFieldCollectionFieldEventsDisabled_R, @TDACustomFieldCollectionFieldEventsDisabled_W, 'FieldEventsDisabled'); + lc.RegisterMethod(@TDACustomFieldCollection.AssignFieldCollection, 'AssignFieldCollection'); + lc.RegisterMethod(@TDACustomFieldCollection.FieldByName, 'FieldByName'); + lc.RegisterMethod(@TDACustomFieldCollection.FindField, 'FindField'); + lc.RegisterMethod(@TDACustomFieldCollection.MoveItem, 'MoveItem'); + lc.RegisterPropertyHelper(@TDACustomFieldCollectionDataDictionary_R, @TDACustomFieldCollectionDataDictionary_W, 'DataDictionary'); + lc.RegisterPropertyHelper(@TDACustomFieldCollectionFields_R, @TDACustomFieldCollectionFields_W, 'Fields'); +end; + +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TDACustomField'}{$ENDIF} +{$IFDEF class_helper_present} +type + TDACustomField_PSHelper = class helper for TDACustomField + public + procedure Alignment_R(var T: TAlignment); + procedure Alignment_W(const T: TAlignment); + procedure BusinessRulesID_R(var T: string); + procedure BusinessRulesID_W(const T: string); + procedure Calculated_R(var T: boolean); + procedure Calculated_W(const T: boolean); + procedure CustomAttributes_R(var T: TStrings); + procedure CustomAttributes_W(const T: TStrings); + procedure DefaultValue_R(var T: string); + procedure DefaultValue_W(const T: string); + procedure DisplayFormat_R(var T: string); + procedure DisplayFormat_W(const T: string); + procedure DisplayLabel_R(var T: string); + procedure DisplayLabel_W(const T: string); + procedure DisplayWidth_R(var T: integer); + procedure DisplayWidth_W(const T: integer); + procedure EditFormat_R(var T: string); + procedure EditFormat_W(const T: string); + procedure EditMask_R(var T: string); + procedure EditMask_W(const T: string); + procedure FieldCollection_R(var T: TDACustomFieldCollection); + procedure InPrimaryKey_R(var T: boolean); + procedure InPrimaryKey_W(const T: boolean); + procedure IsNull_R(var T: boolean); + procedure KeyFields_R(var T: string); + procedure KeyFields_W(const T: string); + procedure LogChanges_R(var T: boolean); + procedure LogChanges_W(const T: boolean); + procedure Lookup_R(var T: boolean); + procedure Lookup_W(const T: boolean); + procedure LookupCache_R(var T: boolean); + procedure LookupCache_W(const T: boolean); + procedure LookupKeyFields_R(var T: string); + procedure LookupKeyFields_W(const T: string); + procedure LookupResultField_R(var T: string); + procedure LookupResultField_W(const T: string); + procedure LookupSource_R(var T: TDataSource); + procedure LookupSource_W(const T: TDataSource); + procedure ReadOnly_R(var T: boolean); + procedure ReadOnly_W(const T: boolean); + procedure RegExpression_R(var T: string); + procedure RegExpression_W(const T: string); + procedure Required_R(var T: boolean); + procedure Required_W(const T: boolean); + procedure TableField_R(var T: string); + procedure TableField_W(const T: string); + procedure Visible_R(var T: boolean); + procedure Visible_W(const T: boolean); + end; + +procedure TDACustomField_PSHelper.Alignment_W(const T: TAlignment); +begin + Self.Alignment := T; +end; + +procedure TDACustomField_PSHelper.Alignment_R(var T: TAlignment); +begin + T := Self.Alignment; +end; + +procedure TDACustomField_PSHelper.EditFormat_W(const T: string); +begin + Self.EditFormat := T; +end; + +procedure TDACustomField_PSHelper.EditFormat_R(var T: string); +begin + T := Self.EditFormat; +end; + +procedure TDACustomField_PSHelper.BusinessRulesID_W(const T: string); +begin + Self.BusinessClassID := T; +end; + +procedure TDACustomField_PSHelper.BusinessRulesID_R(var T: string); +begin + T := Self.BusinessClassID; +end; + +procedure TDACustomField_PSHelper.DisplayFormat_W(const T: string); +begin + Self.DisplayFormat := T; +end; + +procedure TDACustomField_PSHelper.DisplayFormat_R(var T: string); +begin + T := Self.DisplayFormat; +end; + +procedure TDACustomField_PSHelper.CustomAttributes_W(const T: TStrings); +begin + Self.CustomAttributes := T; +end; + +procedure TDACustomField_PSHelper.CustomAttributes_R(var T: TStrings); +begin + T := Self.CustomAttributes; +end; + +procedure TDACustomField_PSHelper.ReadOnly_W(const T: boolean); +begin + Self.ReadOnly := T; +end; + +procedure TDACustomField_PSHelper.ReadOnly_R(var T: boolean); +begin + T := Self.ReadOnly; +end; + +procedure TDACustomField_PSHelper.Visible_W(const T: boolean); +begin + Self.Visible := T; +end; + +procedure TDACustomField_PSHelper.Visible_R(var T: boolean); +begin + T := Self.Visible; +end; + +procedure TDACustomField_PSHelper.EditMask_W(const T: string); +begin + Self.EditMask := T; +end; + +procedure TDACustomField_PSHelper.EditMask_R(var T: string); +begin + T := Self.EditMask; +end; + +procedure TDACustomField_PSHelper.DisplayLabel_W(const T: string); +begin + Self.DisplayLabel := T; +end; + +procedure TDACustomField_PSHelper.DisplayLabel_R(var T: string); +begin + T := Self.DisplayLabel; +end; + +procedure TDACustomField_PSHelper.DisplayWidth_W(const T: integer); +begin + Self.DisplayWidth := T; +end; + +procedure TDACustomField_PSHelper.DisplayWidth_R(var T: integer); +begin + T := Self.DisplayWidth; +end; + +procedure TDACustomField_PSHelper.Required_W(const T: boolean); +begin + Self.Required := T; +end; + +procedure TDACustomField_PSHelper.Required_R(var T: boolean); +begin + T := Self.Required; +end; + +procedure TDACustomField_PSHelper.DefaultValue_W(const T: string); +begin + Self.DefaultValue := T; +end; + +procedure TDACustomField_PSHelper.DefaultValue_R(var T: string); +begin + T := Self.DefaultValue; +end; + +procedure TDACustomField_PSHelper.RegExpression_W(const T: string); +begin + Self.RegExpression := T; +end; + +procedure TDACustomField_PSHelper.RegExpression_R(var T: string); +begin + T := Self.RegExpression; +end; + +procedure TDACustomField_PSHelper.LogChanges_W(const T: boolean); +begin + Self.LogChanges := T; +end; + +procedure TDACustomField_PSHelper.LogChanges_R(var T: boolean); +begin + T := Self.LogChanges; +end; + +procedure TDACustomField_PSHelper.LookupCache_W(const T: boolean); +begin + Self.LookupCache := T; +end; + +procedure TDACustomField_PSHelper.LookupCache_R(var T: boolean); +begin + T := Self.LookupCache; +end; + +procedure TDACustomField_PSHelper.KeyFields_W(const T: string); +begin + Self.KeyFields := T; +end; + +procedure TDACustomField_PSHelper.KeyFields_R(var T: string); +begin + T := Self.KeyFields; +end; + +procedure TDACustomField_PSHelper.LookupResultField_W(const T: string); +begin + Self.LookupResultField := T; +end; + +procedure TDACustomField_PSHelper.LookupResultField_R(var T: string); +begin + T := Self.LookupResultField; +end; + +procedure TDACustomField_PSHelper.LookupKeyFields_W(const T: string); +begin + Self.LookupKeyFields := T; +end; + +procedure TDACustomField_PSHelper.LookupKeyFields_R(var T: string); +begin + T := Self.LookupKeyFields; +end; + +procedure TDACustomField_PSHelper.LookupSource_W(const T: TDataSource); +begin + Self.LookupSource := T; +end; + +procedure TDACustomField_PSHelper.LookupSource_R(var T: TDataSource); +begin + T := Self.LookupSource; +end; + +procedure TDACustomField_PSHelper.Lookup_W(const T: boolean); +begin + Self.Lookup := T; +end; + +procedure TDACustomField_PSHelper.Lookup_R(var T: boolean); +begin + T := Self.Lookup; +end; + +procedure TDACustomField_PSHelper.Calculated_W(const T: boolean); +begin + Self.Calculated := T; +end; + +procedure TDACustomField_PSHelper.Calculated_R(var T: boolean); +begin + T := Self.Calculated; +end; + +procedure TDACustomField_PSHelper.InPrimaryKey_W(const T: boolean); +begin + Self.InPrimaryKey := T; +end; + +procedure TDACustomField_PSHelper.InPrimaryKey_R(var T: boolean); +begin + T := Self.InPrimaryKey; +end; + +procedure TDACustomField_PSHelper.IsNull_R(var T: boolean); +begin + T := Self.IsNull; +end; + +procedure TDACustomField_PSHelper.TableField_W(const T: string); +begin + Self.TableField := T; +end; + +procedure TDACustomField_PSHelper.TableField_R(var T: string); +begin + T := Self.TableField; +end; + +procedure TDACustomField_PSHelper.FieldCollection_R(var T: TDACustomFieldCollection); +begin + T := Self.FieldCollection; +end; + +procedure RIRegister_TDACustomField(CL: TIFPSRuntimeClassImporter); +var + lc:TPSRuntimeClass; +begin + lc := CL.Add(TDACustomField); + lc.RegisterMethod(@TDACustomField.Bind, 'Bind'); + lc.RegisterMethod(@TDACustomField.Unbind, 'Unbind'); + lc.RegisterMethod(@TDACustomField.SaveToStream, 'SaveToStream'); + lc.RegisterMethod(@TDACustomField.LoadFromStream, 'LoadFromStream'); + lc.RegisterMethod(@TDACustomField.SaveToFile, 'SaveToFile'); + lc.RegisterMethod(@TDACustomField.LoadFromFile, 'LoadFromFile'); + lc.RegisterPropertyHelper(@TDACustomField.FieldCollection_R, nil, 'FieldCollection'); + lc.RegisterPropertyHelper(@TDACustomField.TableField_R, @TDACustomField.TableField_W, 'TableField'); + lc.RegisterPropertyHelper(@TDACustomField.IsNull_R, nil, 'IsNull'); + lc.RegisterPropertyHelper(@TDACustomField.InPrimaryKey_R, @TDACustomField.InPrimaryKey_W, 'InPrimaryKey'); + lc.RegisterPropertyHelper(@TDACustomField.Calculated_R, @TDACustomField.Calculated_W, 'Calculated'); + lc.RegisterPropertyHelper(@TDACustomField.Lookup_R, @TDACustomField.Lookup_W, 'Lookup'); + lc.RegisterPropertyHelper(@TDACustomField.LookupSource_R, @TDACustomField.LookupSource_W, 'LookupSource'); + lc.RegisterPropertyHelper(@TDACustomField.LookupKeyFields_R, @TDACustomField.LookupKeyFields_W, 'LookupKeyFields'); + lc.RegisterPropertyHelper(@TDACustomField.LookupResultField_R, @TDACustomField.LookupResultField_W, 'LookupResultField'); + lc.RegisterPropertyHelper(@TDACustomField.KeyFields_R, @TDACustomField.KeyFields_W, 'KeyFields'); + lc.RegisterPropertyHelper(@TDACustomField.LookupCache_R, @TDACustomField.LookupCache_W, 'LookupCache'); + lc.RegisterPropertyHelper(@TDACustomField.LogChanges_R, @TDACustomField.LogChanges_W, 'LogChanges'); + lc.RegisterPropertyHelper(@TDACustomField.RegExpression_R, @TDACustomField.RegExpression_W, 'RegExpression'); + lc.RegisterPropertyHelper(@TDACustomField.DefaultValue_R, @TDACustomField.DefaultValue_W, 'DefaultValue'); + lc.RegisterPropertyHelper(@TDACustomField.Required_R, @TDACustomField.Required_W, 'Required'); + lc.RegisterPropertyHelper(@TDACustomField.DisplayWidth_R, @TDACustomField.DisplayWidth_W, 'DisplayWidth'); + lc.RegisterPropertyHelper(@TDACustomField.DisplayLabel_R, @TDACustomField.DisplayLabel_W, 'DisplayLabel'); + lc.RegisterPropertyHelper(@TDACustomField.EditMask_R, @TDACustomField.EditMask_W, 'EditMask'); + lc.RegisterPropertyHelper(@TDACustomField.Visible_R, @TDACustomField.Visible_W, 'Visible'); + lc.RegisterPropertyHelper(@TDACustomField.ReadOnly_R, @TDACustomField.ReadOnly_W, 'ReadOnly'); + lc.RegisterPropertyHelper(@TDACustomField.CustomAttributes_R, @TDACustomField.CustomAttributes_W, 'CustomAttributes'); + lc.RegisterPropertyHelper(@TDACustomField.DisplayFormat_R, @TDACustomField.DisplayFormat_W, 'DisplayFormat'); + lc.RegisterPropertyHelper(@TDACustomField.BusinessRulesID_R, @TDACustomField.BusinessRulesID_W, 'BusinessRulesID'); + lc.RegisterPropertyHelper(@TDACustomField.EditFormat_R, @TDACustomField.EditFormat_W, 'EditFormat'); + lc.RegisterPropertyHelper(@TDACustomField.Alignment_R, @TDACustomField.Alignment_W, 'Alignment'); +end; + +{$ELSE} procedure TDACustomFieldAlignment_W(Self: TDACustomField; const T: TAlignment); begin Self.Alignment := T; @@ -693,6 +1494,246 @@ begin T := Self.FieldCollection; end; +procedure RIRegister_TDACustomField(CL: TIFPSRuntimeClassImporter); +var + lc:TPSRuntimeClass; +begin + lc := CL.Add(TDACustomField); + lc.RegisterMethod(@TDACustomField.Bind, 'Bind'); + lc.RegisterMethod(@TDACustomField.Unbind, 'Unbind'); + lc.RegisterMethod(@TDACustomField.SaveToStream, 'SaveToStream'); + lc.RegisterMethod(@TDACustomField.LoadFromStream, 'LoadFromStream'); + lc.RegisterMethod(@TDACustomField.SaveToFile, 'SaveToFile'); + lc.RegisterMethod(@TDACustomField.LoadFromFile, 'LoadFromFile'); + lc.RegisterPropertyHelper(@TDACustomFieldFieldCollection_R, nil, 'FieldCollection'); + lc.RegisterPropertyHelper(@TDACustomFieldTableField_R, @TDACustomFieldTableField_W, 'TableField'); + lc.RegisterPropertyHelper(@TDACustomFieldIsNull_R, nil, 'IsNull'); + lc.RegisterPropertyHelper(@TDACustomFieldInPrimaryKey_R, @TDACustomFieldInPrimaryKey_W, 'InPrimaryKey'); + lc.RegisterPropertyHelper(@TDACustomFieldCalculated_R, @TDACustomFieldCalculated_W, 'Calculated'); + lc.RegisterPropertyHelper(@TDACustomFieldLookup_R, @TDACustomFieldLookup_W, 'Lookup'); + lc.RegisterPropertyHelper(@TDACustomFieldLookupSource_R, @TDACustomFieldLookupSource_W, 'LookupSource'); + lc.RegisterPropertyHelper(@TDACustomFieldLookupKeyFields_R, @TDACustomFieldLookupKeyFields_W, 'LookupKeyFields'); + lc.RegisterPropertyHelper(@TDACustomFieldLookupResultField_R, @TDACustomFieldLookupResultField_W, 'LookupResultField'); + lc.RegisterPropertyHelper(@TDACustomFieldKeyFields_R, @TDACustomFieldKeyFields_W, 'KeyFields'); + lc.RegisterPropertyHelper(@TDACustomFieldLookupCache_R, @TDACustomFieldLookupCache_W, 'LookupCache'); + lc.RegisterPropertyHelper(@TDACustomFieldLogChanges_R, @TDACustomFieldLogChanges_W, 'LogChanges'); + lc.RegisterPropertyHelper(@TDACustomFieldRegExpression_R, @TDACustomFieldRegExpression_W, 'RegExpression'); + lc.RegisterPropertyHelper(@TDACustomFieldDefaultValue_R, @TDACustomFieldDefaultValue_W, 'DefaultValue'); + lc.RegisterPropertyHelper(@TDACustomFieldRequired_R, @TDACustomFieldRequired_W, 'Required'); + lc.RegisterPropertyHelper(@TDACustomFieldDisplayWidth_R, @TDACustomFieldDisplayWidth_W, 'DisplayWidth'); + lc.RegisterPropertyHelper(@TDACustomFieldDisplayLabel_R, @TDACustomFieldDisplayLabel_W, 'DisplayLabel'); + lc.RegisterPropertyHelper(@TDACustomFieldEditMask_R, @TDACustomFieldEditMask_W, 'EditMask'); + lc.RegisterPropertyHelper(@TDACustomFieldVisible_R, @TDACustomFieldVisible_W, 'Visible'); + lc.RegisterPropertyHelper(@TDACustomFieldReadOnly_R, @TDACustomFieldReadOnly_W, 'ReadOnly'); + lc.RegisterPropertyHelper(@TDACustomFieldCustomAttributes_R, @TDACustomFieldCustomAttributes_W, 'CustomAttributes'); + lc.RegisterPropertyHelper(@TDACustomFieldDisplayFormat_R, @TDACustomFieldDisplayFormat_W, 'DisplayFormat'); + lc.RegisterPropertyHelper(@TDACustomFieldBusinessRulesID_R, @TDACustomFieldBusinessRulesID_W, 'BusinessRulesID'); + lc.RegisterPropertyHelper(@TDACustomFieldEditFormat_R, @TDACustomFieldEditFormat_W, 'EditFormat'); + lc.RegisterPropertyHelper(@TDACustomFieldAlignment_R, @TDACustomFieldAlignment_W, 'Alignment'); +end; + +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TDABaseField'}{$ENDIF} +{$IFDEF class_helper_present} +type + TDABaseField_PSHelper = class helper for TDABaseField + public + procedure AsBoolean_R(var T: boolean); + procedure AsBoolean_W(const T: boolean); + procedure AsCurrency_R(var T: currency); + procedure AsCurrency_W(const T: currency); + procedure AsDateTime_R(var T: TDateTime); + procedure AsDateTime_W(const T: TDateTime); + procedure AsFloat_R(var T: double); + procedure AsFloat_W(const T: double); + procedure AsInteger_R(var T: integer); + procedure AsInteger_W(const T: integer); + procedure AsString_R(var T: string); + procedure AsString_W(const T: string); + procedure AsVariant_R(var T: variant); + procedure AsVariant_W(const T: variant); + procedure BlobType_R(var T: TDABlobType); + procedure BlobType_W(const T: TDABlobType); + procedure DataType_R(var T: TDADataType); + procedure DataType_W(const T: TDADataType); + procedure Description_R(var T: string); + procedure Description_W(const T: string); + procedure DictionaryEntry_R(var T: string); + procedure DictionaryEntry_W(const T: string); + procedure Name_R(var T: string); + procedure Name_W(const T: string); + procedure Size_R(var T: integer); + procedure Size_W(const T: integer); + procedure Value_R(var T: Variant); + procedure Value_W(const T: Variant); + end; + +procedure TDABaseField_PSHelper.BlobType_W(const T: TDABlobType); +begin + Self.BlobType := T; +end; + +procedure TDABaseField_PSHelper.BlobType_R(var T: TDABlobType); +begin + T := Self.BlobType; +end; + +procedure TDABaseField_PSHelper.Description_W(const T: string); +begin + Self.Description := T; +end; + +procedure TDABaseField_PSHelper.Description_R(var T: string); +begin + T := Self.Description; +end; + +procedure TDABaseField_PSHelper.Size_W(const T: integer); +begin + Self.Size := T; +end; + +procedure TDABaseField_PSHelper.Size_R(var T: integer); +begin + T := Self.Size; +end; + +procedure TDABaseField_PSHelper.DataType_W(const T: TDADataType); +begin + Self.DataType := T; +end; + +procedure TDABaseField_PSHelper.DataType_R(var T: TDADataType); +begin + T := Self.DataType; +end; + +procedure TDABaseField_PSHelper.Name_W(const T: string); +begin + Self.Name := T; +end; + +procedure TDABaseField_PSHelper.Name_R(var T: string); +begin + T := Self.Name; +end; + +procedure TDABaseField_PSHelper.DictionaryEntry_W(const T: string); +begin + Self.DictionaryEntry := T; +end; + +procedure TDABaseField_PSHelper.DictionaryEntry_R(var T: string); +begin + T := Self.DictionaryEntry; +end; + +procedure TDABaseField_PSHelper.AsVariant_W(const T: variant); +begin + Self.AsVariant := T; +end; + +procedure TDABaseField_PSHelper.AsVariant_R(var T: variant); +begin + T := Self.AsVariant; +end; + +procedure TDABaseField_PSHelper.AsString_W(const T: string); +begin + Self.AsString := T; +end; + +procedure TDABaseField_PSHelper.AsString_R(var T: string); +begin + T := Self.AsString; +end; + +procedure TDABaseField_PSHelper.AsInteger_W(const T: integer); +begin + Self.AsInteger := T; +end; + +procedure TDABaseField_PSHelper.AsInteger_R(var T: integer); +begin + T := Self.AsInteger; +end; + +procedure TDABaseField_PSHelper.AsFloat_W(const T: double); +begin + Self.AsFloat := T; +end; + +procedure TDABaseField_PSHelper.AsFloat_R(var T: double); +begin + T := Self.AsFloat; +end; + +procedure TDABaseField_PSHelper.AsDateTime_W(const T: TDateTime); +begin + Self.AsDateTime := T; +end; + +procedure TDABaseField_PSHelper.AsDateTime_R(var T: TDateTime); +begin + T := Self.AsDateTime; +end; + +procedure TDABaseField_PSHelper.AsCurrency_W(const T: currency); +begin + Self.AsCurrency := T; +end; + +procedure TDABaseField_PSHelper.AsCurrency_R(var T: currency); +begin + T := Self.AsCurrency; +end; + +procedure TDABaseField_PSHelper.AsBoolean_W(const T: boolean); +begin + Self.AsBoolean := T; +end; + +procedure TDABaseField_PSHelper.AsBoolean_R(var T: boolean); +begin + T := Self.AsBoolean; +end; + +procedure TDABaseField_PSHelper.Value_W(const T: Variant); +begin + Self.Value := T; +end; + +procedure TDABaseField_PSHelper.Value_R(var T: Variant); +begin + T := Self.Value; +end; + +procedure RIRegister_TDABaseField(CL: TIFPSRuntimeClassImporter); +var + lc:TPSRuntimeClass; +begin + lc := CL.Add(TDABaseField); + lc.RegisterPropertyHelper(@TDABaseField.Value_R, @TDABaseField.Value_W, 'Value'); + lc.RegisterVirtualMethod(@TDABaseField.AssignField, 'AssignField'); + lc.RegisterMethod(@TDABaseField.HasValidDictionaryField, 'HasValidDictionaryField'); + lc.RegisterPropertyHelper(@TDABaseField.AsBoolean_R, @TDABaseField.AsBoolean_W, 'AsBoolean'); + lc.RegisterPropertyHelper(@TDABaseField.AsCurrency_R, @TDABaseField.AsCurrency_W, 'AsCurrency'); + lc.RegisterPropertyHelper(@TDABaseField.AsDateTime_R, @TDABaseField.AsDateTime_W, 'AsDateTime'); + lc.RegisterPropertyHelper(@TDABaseField.AsFloat_R, @TDABaseField.AsFloat_W, 'AsFloat'); + lc.RegisterPropertyHelper(@TDABaseField.AsInteger_R, @TDABaseField.AsInteger_W, 'AsInteger'); + lc.RegisterPropertyHelper(@TDABaseField.AsString_R, @TDABaseField.AsString_W, 'AsString'); + lc.RegisterPropertyHelper(@TDABaseField.AsVariant_R, @TDABaseField.AsVariant_W, 'AsVariant'); + lc.RegisterPropertyHelper(@TDABaseField.DictionaryEntry_R, @TDABaseField.DictionaryEntry_W, 'DictionaryEntry'); + lc.RegisterPropertyHelper(@TDABaseField.Name_R, @TDABaseField.Name_W, 'Name'); + lc.RegisterPropertyHelper(@TDABaseField.DataType_R, @TDABaseField.DataType_W, 'DataType'); + lc.RegisterPropertyHelper(@TDABaseField.Size_R, @TDABaseField.Size_W, 'Size'); + lc.RegisterPropertyHelper(@TDABaseField.Description_R, @TDABaseField.Description_W, 'Description'); + lc.RegisterPropertyHelper(@TDABaseField.BlobType_R, @TDABaseField.BlobType_W, 'BlobType'); +end; +{$ELSE} + procedure TDABaseFieldBlobType_W(Self: TDABaseField; const T: TDABlobType); begin Self.BlobType := T; @@ -833,136 +1874,6 @@ begin T := Self.Value; end; -procedure TDADataTableState_R(Self: TDADataTable; var T: TDataSetState); -begin - T := Self.State; -end; - -procedure RIRegister_TDADataTable(CL: TIFPSRuntimeClassImporter); -var - lc:TPSRuntimeClass; -begin - lc := CL.Add(TDADataTable); - lc.RegisterPropertyHelper(@TDADataTableActive_R, @TDADataTableActive_W, 'Active'); - lc.RegisterPropertyHelper(@TDADataTableFields_R, @TDADataTableFields_W, 'Fields'); - lc.RegisterPropertyHelper(@TDADataTableParams_R, @TDADataTableParams_W, 'Params'); - lc.RegisterPropertyHelper(@TDADataTableLogChanges_R, @TDADataTableLogChanges_W, 'LogChanges'); - lc.RegisterPropertyHelper(@TDADataTableRemoteFetchEnabled_R, @TDADataTableRemoteFetchEnabled_W, 'RemoteFetchEnabled'); - lc.RegisterPropertyHelper(@TDADataTableMasterFields_R, @TDADataTableMasterFields_W, 'MasterFields'); - lc.RegisterPropertyHelper(@TDADataTableDetailFields_R, @TDADataTableDetailFields_W, 'DetailFields'); - lc.RegisterPropertyHelper(@TDADataTableMasterRequestMappings_R, @TDADataTableMasterRequestMappings_W, 'MasterRequestMappings'); - lc.RegisterPropertyHelper(@TDADataTableDetailOptions_R, @TDADataTableDetailOptions_W, 'DetailOptions'); - lc.RegisterPropertyHelper(@TDADataTableMasterOptions_R, @TDADataTableMasterOptions_W, 'MasterOptions'); - lc.RegisterPropertyHelper(@TDADataTableFiltered_R, @TDADataTableFiltered_W, 'Filtered'); - lc.RegisterPropertyHelper(@TDADataTableFilter_R, @TDADataTableFilter_W, 'Filter'); - lc.RegisterPropertyHelper(@TDADataTableLogicalName_R, @TDADataTableLogicalName_W, 'LogicalName'); - lc.RegisterPropertyHelper(@TDADataTableBusinessRulesID_R, @TDADataTableBusinessRulesID_W, 'BusinessRulesID'); - lc.RegisterPropertyHelper(@TDADataTableState_R, nil, 'State'); -end; - -procedure RIRegister_TDAParamCollection(CL: TIFPSRuntimeClassImporter); -var - lc:TPSRuntimeClass; -begin - lc := CL.Add(TDAParamCollection); - lc.RegisterConstructor(@TDAParamCollection.Create, 'Create'); - lc.RegisterMethod(@TDAParamCollection.WriteValues, 'WriteValues'); - lc.RegisterMethod(@TDAParamCollection.ReadValues, 'ReadValues'); - lc.RegisterMethod(@TDAParamCollection.Add, 'Add'); - lc.RegisterMethod(@TDAParamCollection.ParamByName, 'ParamByName'); - lc.RegisterMethod(@TDAParamCollection.FindParam, 'FindParam'); - lc.RegisterMethod(@TDAParamCollection.AssignParamCollection, 'AssignParamCollection'); - lc.RegisterPropertyHelper(@TDAParamCollectionParams_R, @TDAParamCollectionParams_W, 'Params'); - lc.RegisterPropertyHelper(@TDAParamCollectionHasInputParams_R, nil, 'HasInputParams'); -end; - -procedure RIRegister_TDAParam(CL: TIFPSRuntimeClassImporter); -var - lc:TPSRuntimeClass; -begin - lc := CL.Add(TDAParam); - lc.RegisterMethod(@TDAParam.SaveToStream, 'SaveToStream'); - lc.RegisterMethod(@TDAParam.LoadFromStream, 'LoadFromStream'); - lc.RegisterMethod(@TDAParam.SaveToFile, 'SaveToFile'); - lc.RegisterMethod(@TDAParam.LoadFromFile, 'LoadFromFile'); - lc.RegisterPropertyHelper(@TDAParamParamType_R, @TDAParamParamType_W, 'ParamType'); -end; - -procedure RIRegister_TDAFieldCollection(CL: TIFPSRuntimeClassImporter); -var - lc:TPSRuntimeClass; -begin - lc := CL.Add(TDAFieldCollection); - lc.RegisterConstructor(@TDAFieldCollection.Create, 'Create'); - lc.RegisterMethod(@TDAFieldCollection.FieldByName, 'FieldByName'); - lc.RegisterMethod(@TDAFieldCollection.FindField, 'FindField'); - lc.RegisterPropertyHelper(@TDAFieldCollectionFields_R, @TDAFieldCollectionFields_W, 'Fields'); -end; - -procedure RIRegister_TDACustomFieldCollection(CL: TIFPSRuntimeClassImporter); -var - lc:TPSRuntimeClass; -begin - lc := CL.Add(TDACustomFieldCollection); - lc.RegisterMethod(@TDACustomFieldCollection.Bind, 'Bind'); - lc.RegisterMethod(@TDACustomFieldCollection.Unbind, 'Unbind'); - lc.RegisterPropertyHelper(@TDACustomFieldCollectionFieldEventsDisabled_R, @TDACustomFieldCollectionFieldEventsDisabled_W, 'FieldEventsDisabled'); - lc.RegisterMethod(@TDACustomFieldCollection.AssignFieldCollection, 'AssignFieldCollection'); - lc.RegisterMethod(@TDACustomFieldCollection.FieldByName, 'FieldByName'); - lc.RegisterMethod(@TDACustomFieldCollection.FindField, 'FindField'); - lc.RegisterMethod(@TDACustomFieldCollection.MoveItem, 'MoveItem'); - lc.RegisterPropertyHelper(@TDACustomFieldCollectionDataDictionary_R, @TDACustomFieldCollectionDataDictionary_W, 'DataDictionary'); - lc.RegisterPropertyHelper(@TDACustomFieldCollectionFields_R, @TDACustomFieldCollectionFields_W, 'Fields'); -end; - -procedure RIRegister_TDADataDictionaryField(CL: TIFPSRuntimeClassImporter); -begin - CL.Add(TDADataDictionaryField); -end; - -procedure RIRegister_TDAField(CL: TIFPSRuntimeClassImporter); -begin - CL.Add(TDAField); -end; - -procedure RIRegister_TDACustomField(CL: TIFPSRuntimeClassImporter); -var - lc:TPSRuntimeClass; -begin - lc := CL.Add(TDACustomField); - lc.RegisterMethod(@TDACustomField.Bind, 'Bind'); - lc.RegisterMethod(@TDACustomField.Unbind, 'Unbind'); - lc.RegisterMethod(@TDACustomField.SaveToStream, 'SaveToStream'); - lc.RegisterMethod(@TDACustomField.LoadFromStream, 'LoadFromStream'); - lc.RegisterMethod(@TDACustomField.SaveToFile, 'SaveToFile'); - lc.RegisterMethod(@TDACustomField.LoadFromFile, 'LoadFromFile'); - lc.RegisterPropertyHelper(@TDACustomFieldFieldCollection_R, nil, 'FieldCollection'); - lc.RegisterPropertyHelper(@TDACustomFieldTableField_R, @TDACustomFieldTableField_W, 'TableField'); - lc.RegisterPropertyHelper(@TDACustomFieldIsNull_R, nil, 'IsNull'); - lc.RegisterPropertyHelper(@TDACustomFieldInPrimaryKey_R, @TDACustomFieldInPrimaryKey_W, 'InPrimaryKey'); - lc.RegisterPropertyHelper(@TDACustomFieldCalculated_R, @TDACustomFieldCalculated_W, 'Calculated'); - lc.RegisterPropertyHelper(@TDACustomFieldLookup_R, @TDACustomFieldLookup_W, 'Lookup'); - lc.RegisterPropertyHelper(@TDACustomFieldLookupSource_R, @TDACustomFieldLookupSource_W, 'LookupSource'); - lc.RegisterPropertyHelper(@TDACustomFieldLookupKeyFields_R, @TDACustomFieldLookupKeyFields_W, 'LookupKeyFields'); - lc.RegisterPropertyHelper(@TDACustomFieldLookupResultField_R, @TDACustomFieldLookupResultField_W, 'LookupResultField'); - lc.RegisterPropertyHelper(@TDACustomFieldKeyFields_R, @TDACustomFieldKeyFields_W, 'KeyFields'); - lc.RegisterPropertyHelper(@TDACustomFieldLookupCache_R, @TDACustomFieldLookupCache_W, 'LookupCache'); - lc.RegisterPropertyHelper(@TDACustomFieldLogChanges_R, @TDACustomFieldLogChanges_W, 'LogChanges'); - lc.RegisterPropertyHelper(@TDACustomFieldRegExpression_R, @TDACustomFieldRegExpression_W, 'RegExpression'); - lc.RegisterPropertyHelper(@TDACustomFieldDefaultValue_R, @TDACustomFieldDefaultValue_W, 'DefaultValue'); - lc.RegisterPropertyHelper(@TDACustomFieldRequired_R, @TDACustomFieldRequired_W, 'Required'); - lc.RegisterPropertyHelper(@TDACustomFieldDisplayWidth_R, @TDACustomFieldDisplayWidth_W, 'DisplayWidth'); - lc.RegisterPropertyHelper(@TDACustomFieldDisplayLabel_R, @TDACustomFieldDisplayLabel_W, 'DisplayLabel'); - lc.RegisterPropertyHelper(@TDACustomFieldEditMask_R, @TDACustomFieldEditMask_W, 'EditMask'); - lc.RegisterPropertyHelper(@TDACustomFieldVisible_R, @TDACustomFieldVisible_W, 'Visible'); - lc.RegisterPropertyHelper(@TDACustomFieldReadOnly_R, @TDACustomFieldReadOnly_W, 'ReadOnly'); - lc.RegisterPropertyHelper(@TDACustomFieldCustomAttributes_R, @TDACustomFieldCustomAttributes_W, 'CustomAttributes'); - lc.RegisterPropertyHelper(@TDACustomFieldDisplayFormat_R, @TDACustomFieldDisplayFormat_W, 'DisplayFormat'); - lc.RegisterPropertyHelper(@TDACustomFieldBusinessRulesID_R, @TDACustomFieldBusinessRulesID_W, 'BusinessRulesID'); - lc.RegisterPropertyHelper(@TDACustomFieldEditFormat_R, @TDACustomFieldEditFormat_W, 'EditFormat'); - lc.RegisterPropertyHelper(@TDACustomFieldAlignment_R, @TDACustomFieldAlignment_W, 'Alignment'); -end; - procedure RIRegister_TDABaseField(CL: TIFPSRuntimeClassImporter); var lc:TPSRuntimeClass; @@ -985,6 +1896,18 @@ begin lc.RegisterPropertyHelper(@TDABaseFieldDescription_R, @TDABaseFieldDescription_W, 'Description'); lc.RegisterPropertyHelper(@TDABaseFieldBlobType_R, @TDABaseFieldBlobType_W, 'BlobType'); end; +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +procedure RIRegister_TDADataDictionaryField(CL: TIFPSRuntimeClassImporter); +begin + CL.Add(TDADataDictionaryField); +end; + +procedure RIRegister_TDAField(CL: TIFPSRuntimeClassImporter); +begin + CL.Add(TDAField); +end; procedure RIRegister_uDA(CL: TIFPSRuntimeClassImporter); begin diff --git a/Addon/RemObjects SDK/uROPSImports.pas b/Addon/RemObjects SDK/uROPSImports.pas index da70685..adbf14d 100644 --- a/Addon/RemObjects SDK/uROPSImports.pas +++ b/Addon/RemObjects SDK/uROPSImports.pas @@ -1,5 +1,11 @@ unit uROPSImports; +{$IFDEF MSWINDOWS} +{$I ..\..\Source\PascalScript.inc} +{$ELSE} +{$I ../../Source/PascalScript.inc} +{$ENDIF} + interface uses @@ -86,103 +92,44 @@ begin T := Self.LIBRARYNAME; end; } -procedure TROBINMESSAGEUSECOMPRESSION_W(Self: TROBINMESSAGE; const T: boolean); -begin - Self.USECOMPRESSION := T; +{$IFDEF DELPHI10UP}{$REGION 'TROBinMessage'}{$ENDIF} +{$IFDEF class_helper_present} +type + TROBinMessage_PSHelper = class helper for TROBinMessage + public + procedure USECOMPRESSION_W(const T: boolean); + procedure USECOMPRESSION_R(var T: boolean); + end; + +procedure TROBinMessage_PSHelper.USECOMPRESSION_W(const T: boolean); +begin + Self.USECOMPRESSION := T; +end; + +procedure TROBinMessage_PSHelper.USECOMPRESSION_R(var T: boolean); +begin + T := Self.USECOMPRESSION; +end; + +procedure RIRegisterTROBINMESSAGE(Cl: TIFPSRuntimeClassImporter); +begin + with Cl.Add(TROBINMESSAGE) do + begin + RegisterPropertyHelper(@TROBINMESSAGE.USECOMPRESSION_R, + @TROBINMESSAGE.USECOMPRESSION_W, 'USECOMPRESSION'); + end; +end; + +{$ELSE} +procedure TROBINMESSAGEUSECOMPRESSION_W(Self: TROBinMessage; const T: boolean); +begin + Self.USECOMPRESSION := T; end; procedure TROBINMESSAGEUSECOMPRESSION_R(Self: TROBINMESSAGE; var T: boolean); -begin - T := Self.USECOMPRESSION; -end; - -procedure TROINDYHTTPCHANNELTARGETURL_W(Self: TROINDYHTTPCHANNEL; const T: string); -begin - Self.TARGETURL := T; -end; - -procedure TROINDYHTTPCHANNELTARGETURL_R(Self: TROINDYHTTPCHANNEL; var T: string); -begin - T := Self.TARGETURL; -end; - -procedure TROINDYTCPCHANNELINDYCLIENT_R(Self: TROINDYTCPCHANNEL; var T: TIdTCPClientBaseClass); -begin - T := Self.INDYCLIENT; -end; - -procedure TIDTCPCLIENTPORT_W(Self: TIDTCPCLIENT; const T: integer); -begin - Self.PORT := T; -end; - -procedure TIDTCPCLIENTPORT_R(Self: TIdTCPClientBaseClass; var T: integer); -begin - T := TIdIndy10HackClient(Self).PORT; -end; - -procedure TIDTCPCLIENTHOST_W(Self: TIdTCPClientBaseClass; const T: string); -begin - TIdIndy10HackClient(Self).HOST := T; -end; - -procedure TIDTCPCLIENTHOST_R(Self: TIdTCPClientBaseClass; var T: string); -begin - T := TIdIndy10HackClient(Self).HOST; -end; - -{procedure TIDTCPCLIENTBOUNDPORT_W(Self: TIdTCPClientBaseClass; const T: integer); -begin - Self.BOUNDPORT := T; -end; - -procedure TIDTCPCLIENTBOUNDPORT_R(Self: TIdTCPClientBaseClass; var T: integer); -begin - T := Self.BOUNDPORT; -end; - -procedure TIDTCPCLIENTBOUNDIP_W(Self: TIdTCPClientBaseClass; const T: string); -begin - Self.BOUNDIP := T; -end; - -procedure TIDTCPCLIENTBOUNDIP_R(Self: TIdTCPClientBaseClass; var T: string); -begin - T := Self.BOUNDIP; -end;] - -procedure TIDTCPCLIENTBOUNDPORTMIN_W(Self: TIdTCPClientBaseClass; const T: integer); -begin - Self.BOUNDPORTMIN := T; -end; - -procedure TIDTCPCLIENTBOUNDPORTMIN_R(Self: TIdTCPClientBaseClass; var T: integer); -begin - T := Self.BOUNDPORTMIN; -end; - -procedure TIDTCPCLIENTBOUNDPORTMAX_W(Self: TIdTCPClientBaseClass; const T: integer); -begin - Self.BOUNDPORTMAX := T; -end; - -procedure TIDTCPCLIENTBOUNDPORTMAX_R(Self: TIdTCPClientBaseClass; var T: integer); -begin - T := Self.BOUNDPORTMAX; -end; - -{procedure RIRegisterTROSOAPMESSAGE(Cl: TIFPSRuntimeClassImporter); begin - with Cl.Add(TROSOAPMESSAGE) do - begin - RegisterPropertyHelper(@TROSOAPMESSAGELIBRARYNAME_R, @TROSOAPMESSAGELIBRARYNAME_W, - 'LIBRARYNAME'); - RegisterPropertyHelper(@TROSOAPMESSAGECUSTOMLOCATION_R, - @TROSOAPMESSAGECUSTOMLOCATION_W, 'CUSTOMLOCATION'); - RegisterPropertyHelper(@TROSOAPMESSAGESERIALIZATIONOPTIONS_R, - @TROSOAPMESSAGESERIALIZATIONOPTIONS_W, 'SERIALIZATIONOPTIONS'); - end; -end; } + T := Self.USECOMPRESSION; +end; procedure RIRegisterTROBINMESSAGE(Cl: TIFPSRuntimeClassImporter); begin @@ -193,6 +140,48 @@ begin end; end; +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TROIndyHTTPChannel'}{$ENDIF} +{$IFDEF class_helper_present} +type + TROIndyHTTPChannel_PSHelper = class helper for TROIndyHTTPChannel + public + procedure TARGETURL_W(const T: string); + procedure TARGETURL_R(var T: string); + end; + +procedure TROIndyHTTPChannel_PSHelper.TARGETURL_W(const T: string); +begin + Self.TARGETURL := T; +end; + +procedure TROIndyHTTPChannel_PSHelper.TARGETURL_R(var T: string); +begin + T := Self.TARGETURL; +end; + +procedure RIRegisterTROINDYHTTPCHANNEL(Cl: TIFPSRuntimeClassImporter); +begin + with Cl.Add(TROINDYHTTPCHANNEL) do + begin + RegisterPropertyHelper(@TROINDYHTTPCHANNEL.TARGETURL_R, + @TROINDYHTTPCHANNEL.TARGETURL_W, 'TARGETURL'); + end; +end; + +{$ELSE} +procedure TROINDYHTTPCHANNELTARGETURL_W(Self: TROIndyHTTPChannel; const T: string); +begin + Self.TARGETURL := T; +end; + +procedure TROINDYHTTPCHANNELTARGETURL_R(Self: TROINDYHTTPCHANNEL; var T: string); +begin + T := Self.TARGETURL; +end; + procedure RIRegisterTROINDYHTTPCHANNEL(Cl: TIFPSRuntimeClassImporter); begin with Cl.Add(TROINDYHTTPCHANNEL) do @@ -202,6 +191,36 @@ begin end; end; +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TROIndyTCPChannel'}{$ENDIF} +{$IFDEF class_helper_present} +type + TROIndyTCPChannel_PSHelper = class helper for TROIndyTCPChannel + public + procedure INDYCLIENT_R(var T: TIdTCPClientBaseClass); + end; + +procedure TROIndyTCPChannel_PSHelper.INDYCLIENT_R(var T: TIdTCPClientBaseClass); +begin + T := Self.INDYCLIENT; +end; + +procedure RIRegisterTROINDYTCPCHANNEL(Cl: TIFPSRuntimeClassImporter); +begin + with Cl.Add(TROINDYTCPCHANNEL) do + begin + RegisterPropertyHelper(@TROINDYTCPCHANNEL.INDYCLIENT_R, nil, 'INDYCLIENT'); + end; +end; + +{$ELSE} +procedure TROINDYTCPCHANNELINDYCLIENT_R(Self: TROIndyTCPChannel; var T: TIdTCPClientBaseClass); +begin + T := Self.INDYCLIENT; +end; + procedure RIRegisterTROINDYTCPCHANNEL(Cl: TIFPSRuntimeClassImporter); begin with Cl.Add(TROINDYTCPCHANNEL) do @@ -210,6 +229,165 @@ begin end; end; +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TIdTCPClientBaseClass'}{$ENDIF} +{$IFDEF class_helper_present} +type + TIdTCPClientBaseClass_PSHelper = class helper for TIdTCPClientBaseClass + public +// procedure BOUNDIP_R(var T: string); +// procedure BOUNDIP_W(const T: string); +// procedure BOUNDPORT_R(var T: integer); +// procedure BOUNDPORT_W(const T: integer); +// procedure BOUNDPORTMAX_R(var T: integer); +// procedure BOUNDPORTMAX_W(const T: integer); +// procedure BOUNDPORTMIN_R(var T: integer); +// procedure BOUNDPORTMIN_W(const T: integer); + procedure HOST_R(var T: string); + procedure HOST_W(const T: string); + procedure PORT_R(var T: integer); + procedure PORT_W(const T: integer); + end; + +{procedure TIdTCPClientBaseClass_PSHelper.BOUNDPORT_W(const T: integer); +begin + Self.BOUNDPORT := T; +end; + +procedure TIdTCPClientBaseClass_PSHelper.BOUNDPORT_R(var T: integer); +begin + T := Self.BOUNDPORT; +end; + +procedure TIdTCPClientBaseClass_PSHelper.BOUNDIP_W(const T: string); +begin + Self.BOUNDIP := T; +end; + +procedure TIdTCPClientBaseClass_PSHelper.BOUNDIP_R(var T: string); +begin + T := Self.BOUNDIP; +end;] + +procedure TIdTCPClientBaseClass_PSHelper.BOUNDPORTMIN_W(const T: integer); +begin + Self.BOUNDPORTMIN := T; +end; + +procedure TIdTCPClientBaseClass_PSHelper.BOUNDPORTMIN_R(var T: integer); +begin + T := Self.BOUNDPORTMIN; +end; + +procedure TIdTCPClientBaseClass_PSHelper.BOUNDPORTMAX_W(const T: integer); +begin + Self.BOUNDPORTMAX := T; +end; + +procedure TIdTCPClientBaseClass_PSHelper.BOUNDPORTMAX_R(var T: integer); +begin + T := Self.BOUNDPORTMAX; +end; } + +procedure TIdTCPClientBaseClass_PSHelper.PORT_W(const T: integer); +begin + Self.PORT := T; +end; + +procedure TIdTCPClientBaseClass_PSHelper.PORT_R(var T: integer); +begin + T := TIdIndy10HackClient(Self).PORT; +end; + +procedure TIdTCPClientBaseClass_PSHelper.HOST_W(const T: string); +begin + TIdIndy10HackClient(Self).HOST := T; +end; + +procedure TIdTCPClientBaseClass_PSHelper.HOST_R(var T: string); +begin + T := TIdIndy10HackClient(Self).HOST; +end; + +procedure RIRegisterTIDTCPCLIENT(Cl: TIFPSRuntimeClassImporter); +begin + with Cl.Add(TIdTCPClientBaseClass) do + begin + {RegisterPropertyHelper(@TIdTCPClientBaseClass.BOUNDPORTMAX_R, @TIdTCPClientBaseClass.BOUNDPORTMAX_W, + 'BOUNDPORTMAX'); + RegisterPropertyHelper(@TIdTCPClientBaseClass.BOUNDPORTMIN_R, @TIdTCPClientBaseClass.BOUNDPORTMIN_W, + 'BOUNDPORTMIN'); + RegisterPropertyHelper(@TIdTCPClientBaseClass.BOUNDIP_R, @TIdTCPClientBaseClass.BOUNDIP_W, 'BOUNDIP'); + RegisterPropertyHelper(@TIdTCPClientBaseClass.BOUNDPORT_R, @TIdTCPClientBaseClass.BOUNDPORT_W, + 'BOUNDPORT');} + RegisterPropertyHelper(@TIdTCPClientBaseClass.HOST_R, @TIdTCPClientBaseClass.HOST_W, 'HOST'); + RegisterPropertyHelper(@TIdTCPClientBaseClass.PORT_R, @TIdTCPClientBaseClass.PORT_W, 'PORT'); + end; +end; +{$ELSE} + +{procedure TIDTCPCLIENTBOUNDPORT_W(Self: TIdTCPClientBaseClass; const T: integer); +begin + Self.BOUNDPORT := T; +end; + +procedure TIDTCPCLIENTBOUNDPORT_R(Self: TIdTCPClientBaseClass; var T: integer); +begin + T := Self.BOUNDPORT; +end; + +procedure TIDTCPCLIENTBOUNDIP_W(Self: TIdTCPClientBaseClass; const T: string); +begin + Self.BOUNDIP := T; +end; + +procedure TIDTCPCLIENTBOUNDIP_R(Self: TIdTCPClientBaseClass; var T: string); +begin + T := Self.BOUNDIP; +end;] + +procedure TIDTCPCLIENTBOUNDPORTMIN_W(Self: TIdTCPClientBaseClass; const T: integer); +begin + Self.BOUNDPORTMIN := T; +end; + +procedure TIDTCPCLIENTBOUNDPORTMIN_R(Self: TIdTCPClientBaseClass; var T: integer); +begin + T := Self.BOUNDPORTMIN; +end; + +procedure TIDTCPCLIENTBOUNDPORTMAX_W(Self: TIdTCPClientBaseClass; const T: integer); +begin + Self.BOUNDPORTMAX := T; +end; + +procedure TIDTCPCLIENTBOUNDPORTMAX_R(Self: TIdTCPClientBaseClass; var T: integer); +begin + T := Self.BOUNDPORTMAX; +end; } + +procedure TIDTCPCLIENTPORT_W(Self: TIdTCPClient; const T: integer); +begin + Self.PORT := T; +end; + +procedure TIDTCPCLIENTPORT_R(Self: TIdTCPClientBaseClass; var T: integer); +begin + T := TIdIndy10HackClient(Self).PORT; +end; + +procedure TIDTCPCLIENTHOST_W(Self: TIdTCPClientBaseClass; const T: string); +begin + TIdIndy10HackClient(Self).HOST := T; +end; + +procedure TIDTCPCLIENTHOST_R(Self: TIdTCPClientBaseClass; var T: string); +begin + T := TIdIndy10HackClient(Self).HOST; +end; + procedure RIRegisterTIDTCPCLIENT(Cl: TIFPSRuntimeClassImporter); begin with Cl.Add(TIdTCPClientBaseClass) do @@ -225,6 +403,22 @@ begin RegisterPropertyHelper(@TIDTCPCLIENTPORT_R, @TIDTCPCLIENTPORT_W, 'PORT'); end; end; +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + + +{procedure RIRegisterTROSOAPMESSAGE(Cl: TIFPSRuntimeClassImporter); +begin + with Cl.Add(TROSOAPMESSAGE) do + begin + RegisterPropertyHelper(@TROSOAPMESSAGELIBRARYNAME_R, @TROSOAPMESSAGELIBRARYNAME_W, + 'LIBRARYNAME'); + RegisterPropertyHelper(@TROSOAPMESSAGECUSTOMLOCATION_R, + @TROSOAPMESSAGECUSTOMLOCATION_W, 'CUSTOMLOCATION'); + RegisterPropertyHelper(@TROSOAPMESSAGESERIALIZATIONOPTIONS_R, + @TROSOAPMESSAGESERIALIZATIONOPTIONS_W, 'SERIALIZATIONOPTIONS'); + end; +end; } procedure RIRegisterRODLImports(CL: TIFPSRuntimeClassImporter); begin diff --git a/Addon/RemObjects SDK/uROPSServerLink.pas b/Addon/RemObjects SDK/uROPSServerLink.pas index 730990f..78913f3 100644 --- a/Addon/RemObjects SDK/uROPSServerLink.pas +++ b/Addon/RemObjects SDK/uROPSServerLink.pas @@ -1,5 +1,11 @@ unit uROPSServerLink; +{$IFDEF MSWINDOWS} +{$I ..\..\Source\PascalScript.inc} +{$ELSE} +{$I ../../Source/PascalScript.inc} +{$ENDIF} + interface uses {$IFDEF WIN32}Windows,{$ELSE}Types,{$ENDIF} @@ -85,7 +91,40 @@ With cl.AddClassN(cl.FindClass('TComponent'),'TROMESSAGE') do end; end; -procedure TROMESSAGEINTERFACENAME_W(Self: TROMESSAGE; const T: STRING); +{$IFDEF DELPHI10UP}{$REGION 'TROMessage'}{$ENDIF} +{$IFDEF class_helper_present} +type + TROMessage_PSHelper = class helper for TROMessage + public + procedure INTERFACENAME_R(var T: STRING); + procedure INTERFACENAME_W(const T: STRING); + procedure MESSAGENAME_R(var T: STRING); + procedure MESSAGENAME_W(const T: STRING); + end; + +procedure TROMessage_PSHelper.INTERFACENAME_W(const T: STRING); +begin Self.INTERFACENAME := T; end; + +procedure TROMessage_PSHelper.INTERFACENAME_R(var T: STRING); +begin T := Self.INTERFACENAME; end; + +procedure TROMessage_PSHelper.MESSAGENAME_W(const T: STRING); +begin Self.MESSAGENAME := T; end; + +procedure TROMessage_PSHelper.MESSAGENAME_R(var T: STRING); +begin T := Self.MESSAGENAME; end; + +procedure RIRegisterTROMESSAGE(Cl: TPSRuntimeClassImporter); +Begin +with Cl.Add(TROMessage) do + begin + RegisterVirtualConstructor(@TROMessage.CREATE, 'CREATE'); + RegisterPropertyHelper(@TROMessage.MESSAGENAME_R,@TROMessage.MESSAGENAME_W,'MESSAGENAME'); + RegisterPropertyHelper(@TROMessage.INTERFACENAME_R,@TROMessage.INTERFACENAME_W,'INTERFACENAME'); + end; +end; +{$ELSE} +procedure TROMESSAGEINTERFACENAME_W(Self: TROMessage; const T: STRING); begin Self.INTERFACENAME := T; end; procedure TROMESSAGEINTERFACENAME_R(Self: TROMESSAGE; var T: STRING); @@ -97,14 +136,6 @@ begin Self.MESSAGENAME := T; end; procedure TROMESSAGEMESSAGENAME_R(Self: TROMESSAGE; var T: STRING); begin T := Self.MESSAGENAME; end; -procedure RIRegisterTROTRANSPORTCHANNEL(Cl: TPSRuntimeClassImporter); -Begin -with Cl.Add(TROTRANSPORTCHANNEL) do - begin - RegisterVirtualConstructor(@TROTRANSPORTCHANNEL.CREATE, 'CREATE'); - end; -end; - procedure RIRegisterTROMESSAGE(Cl: TPSRuntimeClassImporter); Begin with Cl.Add(TROMESSAGE) do @@ -114,7 +145,16 @@ with Cl.Add(TROMESSAGE) do RegisterPropertyHelper(@TROMESSAGEINTERFACENAME_R,@TROMESSAGEINTERFACENAME_W,'INTERFACENAME'); end; end; +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} +procedure RIRegisterTROTRANSPORTCHANNEL(Cl: TPSRuntimeClassImporter); +Begin +with Cl.Add(TROTRANSPORTCHANNEL) do + begin + RegisterVirtualConstructor(@TROTRANSPORTCHANNEL.CREATE, 'CREATE'); + end; +end; (*----------------------------------------------------------------------------*) procedure SIRegister_TROBinaryMemoryStream(CL: TPSPascalCompiler); @@ -143,6 +183,53 @@ begin end; (* === run-time registration functions === *) +{$IFDEF DELPHI10UP}{$REGION 'TROBinaryMemoryStream'}{$ENDIF} +{$IFDEF class_helper_present} +type + TROBinaryMemoryStream_PSHelper = class helper for TROBinaryMemoryStream + public + Function Create2_P(CreateNewInstance: Boolean; const iString : Ansistring):TObject; + Function Create_P(CreateNewInstance: Boolean):TObject; + procedure CapacityIncrement_R(var T: integer); + procedure CapacityIncrement_W(const T: integer); + end; + +(*----------------------------------------------------------------------------*) +procedure TROBinaryMemoryStream_PSHelper.CapacityIncrement_W(const T: integer); +begin Self.CapacityIncrement := T; end; + +(*----------------------------------------------------------------------------*) +procedure TROBinaryMemoryStream_PSHelper.CapacityIncrement_R(var T: integer); +begin T := Self.CapacityIncrement; end; + +(*----------------------------------------------------------------------------*) +Function TROBinaryMemoryStream_PSHelper.Create_P(CreateNewInstance: Boolean):TObject; +Begin Result := TROBinaryMemoryStream.Create; END; + +(*----------------------------------------------------------------------------*) +Function TROBinaryMemoryStream_PSHelper.Create2_P(CreateNewInstance: Boolean; const iString : Ansistring):TObject; +Begin Result := TROBinaryMemoryStream.Create(iString); END; + +(*----------------------------------------------------------------------------*) +procedure RIRegister_TROBinaryMemoryStream(CL: TPSRuntimeClassImporter); +begin + with CL.Add(TROBinaryMemoryStream) do + begin + RegisterConstructor(@TROBinaryMemoryStream.Create2_P, 'Create2'); + RegisterConstructor(@TROBinaryMemoryStream.Create_P, 'Create'); + RegisterMethod(@TROBinaryMemoryStream.Assign, 'Assign'); + RegisterMethod(@TROBinaryMemoryStream.Clone, 'Clone'); + RegisterMethod(@TROBinaryMemoryStream.LoadFromString, 'LoadFromString'); + RegisterMethod(@TROBinaryMemoryStream.LoadFromHexString, 'LoadFromHexString'); + RegisterMethod(@TROBinaryMemoryStream.ToString, 'ToString'); + RegisterMethod(@TROBinaryMemoryStream.ToHexString, 'ToHexString'); + RegisterMethod(@TROBinaryMemoryStream.ToReadableString, 'ToReadableString'); + RegisterMethod(@TROBinaryMemoryStream.WriteAnsiString, 'WriteAnsiString'); + RegisterPropertyHelper(@TROBinaryMemoryStream.CapacityIncrement_R,@TROBinaryMemoryStream.CapacityIncrement_W,'CapacityIncrement'); + end; +end; + +{$ELSE} (*----------------------------------------------------------------------------*) procedure TROBinaryMemoryStreamCapacityIncrement_W(Self: TROBinaryMemoryStream; const T: integer); begin Self.CapacityIncrement := T; end; @@ -178,12 +265,15 @@ begin end; end; +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + + (*----------------------------------------------------------------------------*) procedure RIRegister_uROClasses(CL: TPSRuntimeClassImporter); begin RIRegister_TROBinaryMemoryStream(CL); end; - (*----------------------------------------------------------------------------*) diff --git a/Source/PascalScript.inc b/Source/PascalScript.inc index 682287b..a04a0de 100644 --- a/Source/PascalScript.inc +++ b/Source/PascalScript.inc @@ -64,3 +64,11 @@ Defines: {$IFDEF FPC} {$I PascalScriptFPC.inc} {$ENDIF} + +{$IFDEF DELPHI2005UP} + {$DEFINE class_helper_present} +{$ENDIF} +{$IFDEF FPC} + {$DEFINE class_helper_present} +{$ENDIF} + diff --git a/Source/ThirdParty/uPSI_Dialogs.pas b/Source/ThirdParty/uPSI_Dialogs.pas index d946aa5..13ef81f 100644 --- a/Source/ThirdParty/uPSI_Dialogs.pas +++ b/Source/ThirdParty/uPSI_Dialogs.pas @@ -6,6 +6,13 @@ Source Code from Carlo Kok has been used to implement various sections of UnitParser. Components of ifps3 are used in the construction of UnitParser, code implementing the class wrapper is taken from Carlo Kok''s conv unility } + +{$IFDEF MSWINDOWS} +{$I ..\PascalScript.inc} +{$ELSE} +{$I ../PascalScript.inc} +{$ENDIF} + interface uses @@ -215,6 +222,85 @@ begin CL.AddDelphiFunction('function InputQuery(const ACaption, APrompt: string; var Value: string): Boolean'); end; + +{$IFDEF DELPHI10UP}{$REGION 'TFindDialog'}{$ENDIF} +{$IFDEF class_helper_present} +type + TFindDialog_PSHelper = class helper for TFindDialog + public + procedure OnFind_W(const T: TNotifyEvent); + procedure OnFind_R(var T: TNotifyEvent); + procedure Options_W(const T: TFindOptions); + procedure Options_R(var T: TFindOptions); + procedure FindText_W(const T: string); + procedure FindText_R(var T: string); + procedure Top_W(const T: Integer); + procedure Top_R(var T: Integer); + procedure Position_W(const T: TPoint); + procedure Position_R(var T: TPoint); + procedure Left_W(const T: Integer); + procedure Left_R(var T: Integer); + end; + + +procedure TFindDialog_PSHelper.OnFind_W(const T: TNotifyEvent); +begin Self.OnFind := T; end; + + +procedure TFindDialog_PSHelper.OnFind_R(var T: TNotifyEvent); +begin T := Self.OnFind; end; + + +procedure TFindDialog_PSHelper.Options_W(const T: TFindOptions); +begin Self.Options := T; end; + + +procedure TFindDialog_PSHelper.Options_R(var T: TFindOptions); +begin T := Self.Options; end; + + +procedure TFindDialog_PSHelper.FindText_W(const T: string); +begin Self.FindText := T; end; + + +procedure TFindDialog_PSHelper.FindText_R(var T: string); +begin T := Self.FindText; end; + + +procedure TFindDialog_PSHelper.Top_W(const T: Integer); +begin Self.Top := T; end; + + +procedure TFindDialog_PSHelper.Top_R(var T: Integer); +begin T := Self.Top; end; + +procedure TFindDialog_PSHelper.Position_W(const T: TPoint); +begin Self.Position := T; end; + +procedure TFindDialog_PSHelper.Position_R(var T: TPoint); +begin T := Self.Position; end; + +procedure TFindDialog_PSHelper.Left_W(const T: Integer); +begin Self.Left := T; end; + +procedure TFindDialog_PSHelper.Left_R(var T: Integer); +begin T := Self.Left; end; + +procedure RIRegister_TFindDialog(CL: TPSRuntimeClassImporter); +begin + with CL.Add(TFindDialog) do + begin + RegisterMethod(@TFindDialog.CloseDialog, 'CloseDialog'); + RegisterPropertyHelper(@TFindDialog.Left_R,@TFindDialog.Left_W,'Left'); + RegisterPropertyHelper(@TFindDialog.Position_R,@TFindDialog.Position_W,'Position'); + RegisterPropertyHelper(@TFindDialog.Top_R,@TFindDialog.Top_W,'Top'); + RegisterPropertyHelper(@TFindDialog.FindText_R,@TFindDialog.FindText_W,'FindText'); + RegisterPropertyHelper(@TFindDialog.Options_R,@TFindDialog.Options_W,'Options'); + RegisterPropertyHelper(@TFindDialog.OnFind_R,@TFindDialog.OnFind_W,'OnFind'); + end; +end; + +{$ELSE} (* === run-time registration functions === *) (*----------------------------------------------------------------------------*) procedure TFindDialogOnFind_W(Self: TFindDialog; const T: TNotifyEvent); @@ -264,6 +350,136 @@ begin Self.Left := T; end; procedure TFindDialogLeft_R(Self: TFindDialog; var T: Integer); begin T := Self.Left; end; +procedure RIRegister_TFindDialog(CL: TPSRuntimeClassImporter); +begin + with CL.Add(TFindDialog) do + begin + RegisterMethod(@TFindDialog.CloseDialog, 'CloseDialog'); + RegisterPropertyHelper(@TFindDialogLeft_R,@TFindDialogLeft_W,'Left'); + RegisterPropertyHelper(@TFindDialogPosition_R,@TFindDialogPosition_W,'Position'); + RegisterPropertyHelper(@TFindDialogTop_R,@TFindDialogTop_W,'Top'); + RegisterPropertyHelper(@TFindDialogFindText_R,@TFindDialogFindText_W,'FindText'); + RegisterPropertyHelper(@TFindDialogOptions_R,@TFindDialogOptions_W,'Options'); + RegisterPropertyHelper(@TFindDialogOnFind_R,@TFindDialogOnFind_W,'OnFind'); + end; +end; + +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TPrintDialog'}{$ENDIF} +{$IFDEF class_helper_present} +type + TPrintDialog_PSHelper = class helper for TPrintDialog + public + procedure ToPage_W(const T: Integer); + procedure ToPage_R(var T: Integer); + procedure PrintRange_W(const T: TPrintRange); + procedure PrintRange_R(var T: TPrintRange); + procedure PrintToFile_W(const T: Boolean); + procedure PrintToFile_R(var T: Boolean); + procedure Options_W(const T: TPrintDialogOptions); + procedure Options_R(var T: TPrintDialogOptions); + procedure MaxPage_W(const T: Integer); + procedure MaxPage_R(var T: Integer); + procedure MinPage_W(const T: Integer); + procedure MinPage_R(var T: Integer); + procedure FromPage_W(const T: Integer); + procedure FromPage_R(var T: Integer); + procedure Copies_W(const T: Integer); + procedure Copies_R(var T: Integer); + procedure Collate_W(const T: Boolean); + procedure Collate_R(var T: Boolean); + end; + +procedure TPrintDialog_PSHelper.ToPage_W(const T: Integer); +begin Self.ToPage := T; end; + + +procedure TPrintDialog_PSHelper.ToPage_R(var T: Integer); +begin T := Self.ToPage; end; + + +procedure TPrintDialog_PSHelper.PrintRange_W(const T: TPrintRange); +begin Self.PrintRange := T; end; + + +procedure TPrintDialog_PSHelper.PrintRange_R(var T: TPrintRange); +begin T := Self.PrintRange; end; + + +procedure TPrintDialog_PSHelper.PrintToFile_W(const T: Boolean); +begin Self.PrintToFile := T; end; + + +procedure TPrintDialog_PSHelper.PrintToFile_R(var T: Boolean); +begin T := Self.PrintToFile; end; + + +procedure TPrintDialog_PSHelper.Options_W(const T: TPrintDialogOptions); +begin Self.Options := T; end; + + +procedure TPrintDialog_PSHelper.Options_R(var T: TPrintDialogOptions); +begin T := Self.Options; end; + + +procedure TPrintDialog_PSHelper.MaxPage_W(const T: Integer); +begin Self.MaxPage := T; end; + + +procedure TPrintDialog_PSHelper.MaxPage_R(var T: Integer); +begin T := Self.MaxPage; end; + + +procedure TPrintDialog_PSHelper.MinPage_W(const T: Integer); +begin Self.MinPage := T; end; + + +procedure TPrintDialog_PSHelper.MinPage_R(var T: Integer); +begin T := Self.MinPage; end; + + +procedure TPrintDialog_PSHelper.FromPage_W(const T: Integer); +begin Self.FromPage := T; end; + + +procedure TPrintDialog_PSHelper.FromPage_R(var T: Integer); +begin T := Self.FromPage; end; + + +procedure TPrintDialog_PSHelper.Copies_W(const T: Integer); +begin Self.Copies := T; end; + + +procedure TPrintDialog_PSHelper.Copies_R(var T: Integer); +begin T := Self.Copies; end; + + +procedure TPrintDialog_PSHelper.Collate_W(const T: Boolean); +begin Self.Collate := T; end; + + +procedure TPrintDialog_PSHelper.Collate_R(var T: Boolean); +begin T := Self.Collate; end; + +procedure RIRegister_TPrintDialog(CL: TPSRuntimeClassImporter); +begin + with CL.Add(TPrintDialog) do + begin + RegisterPropertyHelper(@TPrintDialog.Collate_R,@TPrintDialog.Collate_W,'Collate'); + RegisterPropertyHelper(@TPrintDialog.Copies_R,@TPrintDialog.Copies_W,'Copies'); + RegisterPropertyHelper(@TPrintDialog.FromPage_R,@TPrintDialog.FromPage_W,'FromPage'); + RegisterPropertyHelper(@TPrintDialog.MinPage_R,@TPrintDialog.MinPage_W,'MinPage'); + RegisterPropertyHelper(@TPrintDialog.MaxPage_R,@TPrintDialog.MaxPage_W,'MaxPage'); + RegisterPropertyHelper(@TPrintDialog.Options_R,@TPrintDialog.Options_W,'Options'); + RegisterPropertyHelper(@TPrintDialog.PrintToFile_R,@TPrintDialog.PrintToFile_W,'PrintToFile'); + RegisterPropertyHelper(@TPrintDialog.PrintRange_R,@TPrintDialog.PrintRange_W,'PrintRange'); + RegisterPropertyHelper(@TPrintDialog.ToPage_R,@TPrintDialog.ToPage_W,'ToPage'); + end; +end; + +{$ELSE} (*----------------------------------------------------------------------------*) procedure TPrintDialogToPage_W(Self: TPrintDialog; const T: Integer); begin Self.ToPage := T; end; @@ -335,7 +551,104 @@ begin Self.Collate := T; end; (*----------------------------------------------------------------------------*) procedure TPrintDialogCollate_R(Self: TPrintDialog; var T: Boolean); begin T := Self.Collate; end; +procedure RIRegister_TPrintDialog(CL: TPSRuntimeClassImporter); +begin + with CL.Add(TPrintDialog) do + begin + RegisterPropertyHelper(@TPrintDialogCollate_R,@TPrintDialogCollate_W,'Collate'); + RegisterPropertyHelper(@TPrintDialogCopies_R,@TPrintDialogCopies_W,'Copies'); + RegisterPropertyHelper(@TPrintDialogFromPage_R,@TPrintDialogFromPage_W,'FromPage'); + RegisterPropertyHelper(@TPrintDialogMinPage_R,@TPrintDialogMinPage_W,'MinPage'); + RegisterPropertyHelper(@TPrintDialogMaxPage_R,@TPrintDialogMaxPage_W,'MaxPage'); + RegisterPropertyHelper(@TPrintDialogOptions_R,@TPrintDialogOptions_W,'Options'); + RegisterPropertyHelper(@TPrintDialogPrintToFile_R,@TPrintDialogPrintToFile_W,'PrintToFile'); + RegisterPropertyHelper(@TPrintDialogPrintRange_R,@TPrintDialogPrintRange_W,'PrintRange'); + RegisterPropertyHelper(@TPrintDialogToPage_R,@TPrintDialogToPage_W,'ToPage'); + end; +end; +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TFontDialog'}{$ENDIF} +{$IFDEF class_helper_present} +type + TFontDialog_PSHelper = class helper for TFontDialog + public + procedure OnApply_W(const T: TFDApplyEvent); + procedure OnApply_R(var T: TFDApplyEvent); + procedure Options_W(const T: TFontDialogOptions); + procedure Options_R(var T: TFontDialogOptions); + procedure MaxFontSize_W(const T: Integer); + procedure MaxFontSize_R(var T: Integer); + procedure MinFontSize_W(const T: Integer); + procedure MinFontSize_R(var T: Integer); + procedure Device_W(const T: TFontDialogDevice); + procedure Device_R(var T: TFontDialogDevice); + procedure Font_W(const T: TFont); + procedure Font_R(var T: TFont); + end; + +procedure TFontDialog_PSHelper.OnApply_W(const T: TFDApplyEvent); +begin Self.OnApply := T; end; + + +procedure TFontDialog_PSHelper.OnApply_R(var T: TFDApplyEvent); +begin T := Self.OnApply; end; + + +procedure TFontDialog_PSHelper.Options_W(const T: TFontDialogOptions); +begin Self.Options := T; end; + + +procedure TFontDialog_PSHelper.Options_R(var T: TFontDialogOptions); +begin T := Self.Options; end; + + +procedure TFontDialog_PSHelper.MaxFontSize_W(const T: Integer); +begin Self.MaxFontSize := T; end; + + +procedure TFontDialog_PSHelper.MaxFontSize_R(var T: Integer); +begin T := Self.MaxFontSize; end; + + +procedure TFontDialog_PSHelper.MinFontSize_W(const T: Integer); +begin Self.MinFontSize := T; end; + + +procedure TFontDialog_PSHelper.MinFontSize_R(var T: Integer); +begin T := Self.MinFontSize; end; + + +procedure TFontDialog_PSHelper.Device_W(const T: TFontDialogDevice); +begin Self.Device := T; end; + + +procedure TFontDialog_PSHelper.Device_R(var T: TFontDialogDevice); +begin T := Self.Device; end; + + +procedure TFontDialog_PSHelper.Font_W(const T: TFont); +begin Self.Font := T; end; + + +procedure TFontDialog_PSHelper.Font_R(var T: TFont); +begin T := Self.Font; end; + +procedure RIRegister_TFontDialog(CL: TPSRuntimeClassImporter); +begin + with CL.Add(TFontDialog) do + begin + RegisterPropertyHelper(@TFontDialog.Font_R,@TFontDialog.Font_W,'Font'); + RegisterPropertyHelper(@TFontDialog.Device_R,@TFontDialog.Device_W,'Device'); + RegisterPropertyHelper(@TFontDialog.MinFontSize_R,@TFontDialog.MinFontSize_W,'MinFontSize'); + RegisterPropertyHelper(@TFontDialog.MaxFontSize_R,@TFontDialog.MaxFontSize_W,'MaxFontSize'); + RegisterPropertyHelper(@TFontDialog.Options_R,@TFontDialog.Options_W,'Options'); + RegisterPropertyHelper(@TFontDialog.OnApply_R,@TFontDialog.OnApply_W,'OnApply'); + end; +end; +{$ELSE} (*----------------------------------------------------------------------------*) procedure TFontDialogOnApply_W(Self: TFontDialog; const T: TFDApplyEvent); begin Self.OnApply := T; end; @@ -384,6 +697,68 @@ begin Self.Font := T; end; procedure TFontDialogFont_R(Self: TFontDialog; var T: TFont); begin T := Self.Font; end; +procedure RIRegister_TFontDialog(CL: TPSRuntimeClassImporter); +begin + with CL.Add(TFontDialog) do + begin + RegisterPropertyHelper(@TFontDialogFont_R,@TFontDialogFont_W,'Font'); + RegisterPropertyHelper(@TFontDialogDevice_R,@TFontDialogDevice_W,'Device'); + RegisterPropertyHelper(@TFontDialogMinFontSize_R,@TFontDialogMinFontSize_W,'MinFontSize'); + RegisterPropertyHelper(@TFontDialogMaxFontSize_R,@TFontDialogMaxFontSize_W,'MaxFontSize'); + RegisterPropertyHelper(@TFontDialogOptions_R,@TFontDialogOptions_W,'Options'); + RegisterPropertyHelper(@TFontDialogOnApply_R,@TFontDialogOnApply_W,'OnApply'); + end; +end; +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TColorDialog'}{$ENDIF} +{$IFDEF class_helper_present} +type + TColorDialog_PSHelper = class helper for TColorDialog + public + procedure Options_W(const T: TColorDialogOptions); + procedure Options_R(var T: TColorDialogOptions); + procedure CustomColors_W(const T: TStrings); + procedure CustomColors_R(var T: TStrings); + procedure Color_W(const T: TColor); + procedure Color_R(var T: TColor); + end; + +procedure TColorDialog_PSHelper.Options_W(const T: TColorDialogOptions); +begin Self.Options := T; end; + + +procedure TColorDialog_PSHelper.Options_R(var T: TColorDialogOptions); +begin T := Self.Options; end; + + +procedure TColorDialog_PSHelper.CustomColors_W(const T: TStrings); +begin Self.CustomColors := T; end; + + +procedure TColorDialog_PSHelper.CustomColors_R(var T: TStrings); +begin T := Self.CustomColors; end; + + +procedure TColorDialog_PSHelper.Color_W(const T: TColor); +begin Self.Color := T; end; + + +procedure TColorDialog_PSHelper.Color_R(var T: TColor); +begin T := Self.Color; end; + +procedure RIRegister_TColorDialog(CL: TPSRuntimeClassImporter); +begin + with CL.Add(TColorDialog) do + begin + RegisterPropertyHelper(@TColorDialog.Color_R,@TColorDialog.Color_W,'Color'); + RegisterPropertyHelper(@TColorDialog.CustomColors_R,@TColorDialog.CustomColors_W,'CustomColors'); + RegisterPropertyHelper(@TColorDialog.Options_R,@TColorDialog.Options_W,'Options'); + end; +end; + +{$ELSE} (*----------------------------------------------------------------------------*) procedure TColorDialogOptions_W(Self: TColorDialog; const T: TColorDialogOptions); begin Self.Options := T; end; @@ -408,6 +783,192 @@ begin Self.Color := T; end; procedure TColorDialogColor_R(Self: TColorDialog; var T: TColor); begin T := Self.Color; end; +procedure RIRegister_TColorDialog(CL: TPSRuntimeClassImporter); +begin + with CL.Add(TColorDialog) do + begin + RegisterPropertyHelper(@TColorDialogColor_R,@TColorDialogColor_W,'Color'); + RegisterPropertyHelper(@TColorDialogCustomColors_R,@TColorDialogCustomColors_W,'CustomColors'); + RegisterPropertyHelper(@TColorDialogOptions_R,@TColorDialogOptions_W,'Options'); + end; +end; + +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TOpenDialog'}{$ENDIF} +{$IFDEF class_helper_present} +type + TOpenDialog_PSHelper = class helper for TOpenDialog + public + procedure OnIncludeItem_W( const T: TIncludeItemEvent); + procedure OnIncludeItem_R( var T: TIncludeItemEvent); + procedure OnTypeChange_W( const T: TNotifyEvent); + procedure OnTypeChange_R( var T: TNotifyEvent); + procedure OnSelectionChange_W( const T: TNotifyEvent); + procedure OnSelectionChange_R( var T: TNotifyEvent); + procedure OnFolderChange_W( const T: TNotifyEvent); + procedure OnFolderChange_R( var T: TNotifyEvent); + procedure OnCanClose_W( const T: TCloseQueryEvent); + procedure OnCanClose_R( var T: TCloseQueryEvent); + procedure Title_W( const T: string); + procedure Title_R( var T: string); + procedure Options_W( const T: TOpenOptions); + procedure Options_R( var T: TOpenOptions); + procedure InitialDir_W( const T: string); + procedure InitialDir_R( var T: string); + procedure FilterIndex_W( const T: Integer); + procedure FilterIndex_R( var T: Integer); + procedure Filter_W( const T: string); + procedure Filter_R( var T: string); + procedure FileName_W( const T: TFileName); + procedure FileName_R( var T: TFileName); + procedure DefaultExt_W( const T: string); + procedure DefaultExt_R( var T: string); + procedure HistoryList_W( const T: TStrings); + procedure HistoryList_R( var T: TStrings); + procedure Files_R( var T: TStrings); + procedure FileEditStyle_W( const T: TFileEditStyle); + procedure FileEditStyle_R( var T: TFileEditStyle); + end; + +procedure TOpenDialog_PSHelper.OnIncludeItem_W( const T: TIncludeItemEvent); +begin Self.OnIncludeItem := T; end; + + +procedure TOpenDialog_PSHelper.OnIncludeItem_R( var T: TIncludeItemEvent); +begin T := Self.OnIncludeItem; end; + + +procedure TOpenDialog_PSHelper.OnTypeChange_W( const T: TNotifyEvent); +begin Self.OnTypeChange := T; end; + + +procedure TOpenDialog_PSHelper.OnTypeChange_R( var T: TNotifyEvent); +begin T := Self.OnTypeChange; end; + + +procedure TOpenDialog_PSHelper.OnSelectionChange_W( const T: TNotifyEvent); +begin Self.OnSelectionChange := T; end; + + +procedure TOpenDialog_PSHelper.OnSelectionChange_R( var T: TNotifyEvent); +begin T := Self.OnSelectionChange; end; + + +procedure TOpenDialog_PSHelper.OnFolderChange_W( const T: TNotifyEvent); +begin Self.OnFolderChange := T; end; + + +procedure TOpenDialog_PSHelper.OnFolderChange_R( var T: TNotifyEvent); +begin T := Self.OnFolderChange; end; + + +procedure TOpenDialog_PSHelper.OnCanClose_W( const T: TCloseQueryEvent); +begin Self.OnCanClose := T; end; + + +procedure TOpenDialog_PSHelper.OnCanClose_R( var T: TCloseQueryEvent); +begin T := Self.OnCanClose; end; + + +procedure TOpenDialog_PSHelper.Title_W( const T: string); +begin Self.Title := T; end; + + +procedure TOpenDialog_PSHelper.Title_R( var T: string); +begin T := Self.Title; end; + + +procedure TOpenDialog_PSHelper.Options_W( const T: TOpenOptions); +begin Self.Options := T; end; + + +procedure TOpenDialog_PSHelper.Options_R( var T: TOpenOptions); +begin T := Self.Options; end; + + +procedure TOpenDialog_PSHelper.InitialDir_W( const T: string); +begin Self.InitialDir := T; end; + + +procedure TOpenDialog_PSHelper.InitialDir_R( var T: string); +begin T := Self.InitialDir; end; + + +procedure TOpenDialog_PSHelper.FilterIndex_W( const T: Integer); +begin Self.FilterIndex := T; end; + + +procedure TOpenDialog_PSHelper.FilterIndex_R( var T: Integer); +begin T := Self.FilterIndex; end; + + +procedure TOpenDialog_PSHelper.Filter_W( const T: string); +begin Self.Filter := T; end; + + +procedure TOpenDialog_PSHelper.Filter_R( var T: string); +begin T := Self.Filter; end; + + +procedure TOpenDialog_PSHelper.FileName_W( const T: TFileName); +begin Self.FileName := T; end; + + +procedure TOpenDialog_PSHelper.FileName_R( var T: TFileName); +begin T := Self.FileName; end; + + +procedure TOpenDialog_PSHelper.DefaultExt_W( const T: string); +begin Self.DefaultExt := T; end; + + +procedure TOpenDialog_PSHelper.DefaultExt_R( var T: string); +begin T := Self.DefaultExt; end; + + +procedure TOpenDialog_PSHelper.HistoryList_W( const T: TStrings); +begin Self.HistoryList := T; end; + + +procedure TOpenDialog_PSHelper.HistoryList_R( var T: TStrings); +begin T := Self.HistoryList; end; + + +procedure TOpenDialog_PSHelper.Files_R( var T: TStrings); +begin T := Self.Files; end; + + +procedure TOpenDialog_PSHelper.FileEditStyle_W( const T: TFileEditStyle); +begin Self.FileEditStyle := T; end; + + +procedure TOpenDialog_PSHelper.FileEditStyle_R( var T: TFileEditStyle); +begin T := Self.FileEditStyle; end; + +procedure RIRegister_TOpenDialog(CL: TPSRuntimeClassImporter); +begin + with CL.Add(TOpenDialog) do + begin + RegisterPropertyHelper(@TOpenDialog.FileEditStyle_R,@TOpenDialog.FileEditStyle_W,'FileEditStyle'); + RegisterPropertyHelper(@TOpenDialog.Files_R,nil,'Files'); + RegisterPropertyHelper(@TOpenDialog.HistoryList_R,@TOpenDialog.HistoryList_W,'HistoryList'); + RegisterPropertyHelper(@TOpenDialog.DefaultExt_R,@TOpenDialog.DefaultExt_W,'DefaultExt'); + RegisterPropertyHelper(@TOpenDialog.FileName_R,@TOpenDialog.FileName_W,'FileName'); + RegisterPropertyHelper(@TOpenDialog.Filter_R,@TOpenDialog.Filter_W,'Filter'); + RegisterPropertyHelper(@TOpenDialog.FilterIndex_R,@TOpenDialog.FilterIndex_W,'FilterIndex'); + RegisterPropertyHelper(@TOpenDialog.InitialDir_R,@TOpenDialog.InitialDir_W,'InitialDir'); + RegisterPropertyHelper(@TOpenDialog.Options_R,@TOpenDialog.Options_W,'Options'); + RegisterPropertyHelper(@TOpenDialog.Title_R,@TOpenDialog.Title_W,'Title'); + RegisterPropertyHelper(@TOpenDialog.OnCanClose_R,@TOpenDialog.OnCanClose_W,'OnCanClose'); + RegisterPropertyHelper(@TOpenDialog.OnFolderChange_R,@TOpenDialog.OnFolderChange_W,'OnFolderChange'); + RegisterPropertyHelper(@TOpenDialog.OnSelectionChange_R,@TOpenDialog.OnSelectionChange_W,'OnSelectionChange'); + RegisterPropertyHelper(@TOpenDialog.OnTypeChange_R,@TOpenDialog.OnTypeChange_W,'OnTypeChange'); + RegisterPropertyHelper(@TOpenDialog.OnIncludeItem_R,@TOpenDialog.OnIncludeItem_W,'OnIncludeItem'); + end; +end; +{$ELSE} (*----------------------------------------------------------------------------*) procedure TOpenDialogOnIncludeItem_W(Self: TOpenDialog; const T: TIncludeItemEvent); begin Self.OnIncludeItem := T; end; @@ -524,6 +1085,94 @@ begin Self.FileEditStyle := T; end; procedure TOpenDialogFileEditStyle_R(Self: TOpenDialog; var T: TFileEditStyle); begin T := Self.FileEditStyle; end; +procedure RIRegister_TOpenDialog(CL: TPSRuntimeClassImporter); +begin + with CL.Add(TOpenDialog) do + begin + RegisterPropertyHelper(@TOpenDialogFileEditStyle_R,@TOpenDialogFileEditStyle_W,'FileEditStyle'); + RegisterPropertyHelper(@TOpenDialogFiles_R,nil,'Files'); + RegisterPropertyHelper(@TOpenDialogHistoryList_R,@TOpenDialogHistoryList_W,'HistoryList'); + RegisterPropertyHelper(@TOpenDialogDefaultExt_R,@TOpenDialogDefaultExt_W,'DefaultExt'); + RegisterPropertyHelper(@TOpenDialogFileName_R,@TOpenDialogFileName_W,'FileName'); + RegisterPropertyHelper(@TOpenDialogFilter_R,@TOpenDialogFilter_W,'Filter'); + RegisterPropertyHelper(@TOpenDialogFilterIndex_R,@TOpenDialogFilterIndex_W,'FilterIndex'); + RegisterPropertyHelper(@TOpenDialogInitialDir_R,@TOpenDialogInitialDir_W,'InitialDir'); + RegisterPropertyHelper(@TOpenDialogOptions_R,@TOpenDialogOptions_W,'Options'); + RegisterPropertyHelper(@TOpenDialogTitle_R,@TOpenDialogTitle_W,'Title'); + RegisterPropertyHelper(@TOpenDialogOnCanClose_R,@TOpenDialogOnCanClose_W,'OnCanClose'); + RegisterPropertyHelper(@TOpenDialogOnFolderChange_R,@TOpenDialogOnFolderChange_W,'OnFolderChange'); + RegisterPropertyHelper(@TOpenDialogOnSelectionChange_R,@TOpenDialogOnSelectionChange_W,'OnSelectionChange'); + RegisterPropertyHelper(@TOpenDialogOnTypeChange_R,@TOpenDialogOnTypeChange_W,'OnTypeChange'); + RegisterPropertyHelper(@TOpenDialogOnIncludeItem_R,@TOpenDialogOnIncludeItem_W,'OnIncludeItem'); + end; +end; +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TCommonDialog'}{$ENDIF} +{$IFDEF class_helper_present} +type + TCommonDialog_PSHelper = class helper for TCommonDialog + public + procedure OnShow_W(const T: TNotifyEvent); + procedure OnShow_R(var T: TNotifyEvent); + procedure OnClose_W(const T: TNotifyEvent); + procedure OnClose_R(var T: TNotifyEvent); + procedure HelpContext_W(const T: THelpContext); + procedure HelpContext_R(var T: THelpContext); + procedure Ctl3D_W(const T: Boolean); + procedure Ctl3D_R(var T: Boolean); + procedure Handle_R(var T: HWnd); + end; + +procedure TCommonDialog_PSHelper.OnShow_W(const T: TNotifyEvent); +begin Self.OnShow := T; end; + + +procedure TCommonDialog_PSHelper.OnShow_R(var T: TNotifyEvent); +begin T := Self.OnShow; end; + + +procedure TCommonDialog_PSHelper.OnClose_W(const T: TNotifyEvent); +begin Self.OnClose := T; end; + + +procedure TCommonDialog_PSHelper.OnClose_R(var T: TNotifyEvent); +begin T := Self.OnClose; end; + + +procedure TCommonDialog_PSHelper.HelpContext_W(const T: THelpContext); +begin Self.HelpContext := T; end; + + +procedure TCommonDialog_PSHelper.HelpContext_R(var T: THelpContext); +begin T := Self.HelpContext; end; + + +procedure TCommonDialog_PSHelper.Ctl3D_W(const T: Boolean); +begin Self.Ctl3D := T; end; + + +procedure TCommonDialog_PSHelper.Ctl3D_R(var T: Boolean); +begin T := Self.Ctl3D; end; + + +procedure TCommonDialog_PSHelper.Handle_R(var T: HWnd); +begin T := Self.Handle; end; + + +procedure RIRegister_TCommonDialog(CL: TPSRuntimeClassImporter); +begin + with CL.Add(TCommonDialog) do + begin + RegisterPropertyHelper(@TCommonDialog.Handle_R,nil,'Handle'); + RegisterPropertyHelper(@TCommonDialog.Ctl3D_R,@TCommonDialog.Ctl3D_W,'CTL3D'); + RegisterPropertyHelper(@TCommonDialog.HelpContext_R,@TCommonDialog.HelpContext_W,'HelpContext'); + RegisterPropertyHelper(@TCommonDialog.OnClose_R,@TCommonDialog.OnClose_W,'OnClose'); + RegisterPropertyHelper(@TCommonDialog.OnShow_R,@TCommonDialog.OnShow_W,'OnShow'); + end; +end; +{$ELSE} (*----------------------------------------------------------------------------*) procedure TCommonDialogOnShow_W(Self: TCommonDialog; const T: TNotifyEvent); begin Self.OnShow := T; end; @@ -561,6 +1210,19 @@ procedure TCommonDialogHandle_R(Self: TCommonDialog; var T: HWnd); begin T := Self.Handle; end; (*----------------------------------------------------------------------------*) +procedure RIRegister_TCommonDialog(CL: TPSRuntimeClassImporter); +begin + with CL.Add(TCommonDialog) do + begin + RegisterPropertyHelper(@TCommonDialogHandle_R,nil,'Handle'); + RegisterPropertyHelper(@TCommonDialogCtl3D_R,@TCommonDialogCtl3D_W,'CTL3D'); + RegisterPropertyHelper(@TCommonDialogHelpContext_R,@TCommonDialogHelpContext_W,'HelpContext'); + RegisterPropertyHelper(@TCommonDialogOnClose_R,@TCommonDialogOnClose_W,'OnClose'); + RegisterPropertyHelper(@TCommonDialogOnShow_R,@TCommonDialogOnShow_W,'OnShow'); + end; +end; +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} { This InputQuery wrapper is necessary because Delphi XE2 and higher have two additional versions of InputQuery, the pointer points to the wrong version and the @@ -590,38 +1252,6 @@ begin end; end; -(*----------------------------------------------------------------------------*) -procedure RIRegister_TFindDialog(CL: TPSRuntimeClassImporter); -begin - with CL.Add(TFindDialog) do - begin - RegisterMethod(@TFindDialog.CloseDialog, 'CloseDialog'); - RegisterPropertyHelper(@TFindDialogLeft_R,@TFindDialogLeft_W,'Left'); - RegisterPropertyHelper(@TFindDialogPosition_R,@TFindDialogPosition_W,'Position'); - RegisterPropertyHelper(@TFindDialogTop_R,@TFindDialogTop_W,'Top'); - RegisterPropertyHelper(@TFindDialogFindText_R,@TFindDialogFindText_W,'FindText'); - RegisterPropertyHelper(@TFindDialogOptions_R,@TFindDialogOptions_W,'Options'); - RegisterPropertyHelper(@TFindDialogOnFind_R,@TFindDialogOnFind_W,'OnFind'); - end; -end; - -(*----------------------------------------------------------------------------*) -procedure RIRegister_TPrintDialog(CL: TPSRuntimeClassImporter); -begin - with CL.Add(TPrintDialog) do - begin - RegisterPropertyHelper(@TPrintDialogCollate_R,@TPrintDialogCollate_W,'Collate'); - RegisterPropertyHelper(@TPrintDialogCopies_R,@TPrintDialogCopies_W,'Copies'); - RegisterPropertyHelper(@TPrintDialogFromPage_R,@TPrintDialogFromPage_W,'FromPage'); - RegisterPropertyHelper(@TPrintDialogMinPage_R,@TPrintDialogMinPage_W,'MinPage'); - RegisterPropertyHelper(@TPrintDialogMaxPage_R,@TPrintDialogMaxPage_W,'MaxPage'); - RegisterPropertyHelper(@TPrintDialogOptions_R,@TPrintDialogOptions_W,'Options'); - RegisterPropertyHelper(@TPrintDialogPrintToFile_R,@TPrintDialogPrintToFile_W,'PrintToFile'); - RegisterPropertyHelper(@TPrintDialogPrintRange_R,@TPrintDialogPrintRange_W,'PrintRange'); - RegisterPropertyHelper(@TPrintDialogToPage_R,@TPrintDialogToPage_W,'ToPage'); - end; -end; - (*----------------------------------------------------------------------------*) procedure RIRegister_TPrinterSetupDialog(CL: TPSRuntimeClassImporter); begin @@ -630,31 +1260,6 @@ begin end; end; -(*----------------------------------------------------------------------------*) -procedure RIRegister_TFontDialog(CL: TPSRuntimeClassImporter); -begin - with CL.Add(TFontDialog) do - begin - RegisterPropertyHelper(@TFontDialogFont_R,@TFontDialogFont_W,'Font'); - RegisterPropertyHelper(@TFontDialogDevice_R,@TFontDialogDevice_W,'Device'); - RegisterPropertyHelper(@TFontDialogMinFontSize_R,@TFontDialogMinFontSize_W,'MinFontSize'); - RegisterPropertyHelper(@TFontDialogMaxFontSize_R,@TFontDialogMaxFontSize_W,'MaxFontSize'); - RegisterPropertyHelper(@TFontDialogOptions_R,@TFontDialogOptions_W,'Options'); - RegisterPropertyHelper(@TFontDialogOnApply_R,@TFontDialogOnApply_W,'OnApply'); - end; -end; - -(*----------------------------------------------------------------------------*) -procedure RIRegister_TColorDialog(CL: TPSRuntimeClassImporter); -begin - with CL.Add(TColorDialog) do - begin - RegisterPropertyHelper(@TColorDialogColor_R,@TColorDialogColor_W,'Color'); - RegisterPropertyHelper(@TColorDialogCustomColors_R,@TColorDialogCustomColors_W,'CustomColors'); - RegisterPropertyHelper(@TColorDialogOptions_R,@TColorDialogOptions_W,'Options'); - end; -end; - (*----------------------------------------------------------------------------*) procedure RIRegister_TSaveDialog(CL: TPSRuntimeClassImporter); begin @@ -663,42 +1268,6 @@ begin end; end; -(*----------------------------------------------------------------------------*) -procedure RIRegister_TOpenDialog(CL: TPSRuntimeClassImporter); -begin - with CL.Add(TOpenDialog) do - begin - RegisterPropertyHelper(@TOpenDialogFileEditStyle_R,@TOpenDialogFileEditStyle_W,'FileEditStyle'); - RegisterPropertyHelper(@TOpenDialogFiles_R,nil,'Files'); - RegisterPropertyHelper(@TOpenDialogHistoryList_R,@TOpenDialogHistoryList_W,'HistoryList'); - RegisterPropertyHelper(@TOpenDialogDefaultExt_R,@TOpenDialogDefaultExt_W,'DefaultExt'); - RegisterPropertyHelper(@TOpenDialogFileName_R,@TOpenDialogFileName_W,'FileName'); - RegisterPropertyHelper(@TOpenDialogFilter_R,@TOpenDialogFilter_W,'Filter'); - RegisterPropertyHelper(@TOpenDialogFilterIndex_R,@TOpenDialogFilterIndex_W,'FilterIndex'); - RegisterPropertyHelper(@TOpenDialogInitialDir_R,@TOpenDialogInitialDir_W,'InitialDir'); - RegisterPropertyHelper(@TOpenDialogOptions_R,@TOpenDialogOptions_W,'Options'); - RegisterPropertyHelper(@TOpenDialogTitle_R,@TOpenDialogTitle_W,'Title'); - RegisterPropertyHelper(@TOpenDialogOnCanClose_R,@TOpenDialogOnCanClose_W,'OnCanClose'); - RegisterPropertyHelper(@TOpenDialogOnFolderChange_R,@TOpenDialogOnFolderChange_W,'OnFolderChange'); - RegisterPropertyHelper(@TOpenDialogOnSelectionChange_R,@TOpenDialogOnSelectionChange_W,'OnSelectionChange'); - RegisterPropertyHelper(@TOpenDialogOnTypeChange_R,@TOpenDialogOnTypeChange_W,'OnTypeChange'); - RegisterPropertyHelper(@TOpenDialogOnIncludeItem_R,@TOpenDialogOnIncludeItem_W,'OnIncludeItem'); - end; -end; - -(*----------------------------------------------------------------------------*) -procedure RIRegister_TCommonDialog(CL: TPSRuntimeClassImporter); -begin - with CL.Add(TCommonDialog) do - begin - RegisterPropertyHelper(@TCommonDialogHandle_R,nil,'Handle'); - RegisterPropertyHelper(@TCommonDialogCtl3D_R,@TCommonDialogCtl3D_W,'CTL3D'); - RegisterPropertyHelper(@TCommonDialogHelpContext_R,@TCommonDialogHelpContext_W,'HelpContext'); - RegisterPropertyHelper(@TCommonDialogOnClose_R,@TCommonDialogOnClose_W,'OnClose'); - RegisterPropertyHelper(@TCommonDialogOnShow_R,@TCommonDialogOnShow_W,'OnShow'); - end; -end; - (*----------------------------------------------------------------------------*) procedure RIRegister_Dialogs(CL: TPSRuntimeClassImporter); begin diff --git a/Source/ThirdParty/uPSI_IBX.pas b/Source/ThirdParty/uPSI_IBX.pas index cce780e..6447534 100644 --- a/Source/ThirdParty/uPSI_IBX.pas +++ b/Source/ThirdParty/uPSI_IBX.pas @@ -5,7 +5,11 @@ Source Code from Carlo Kok has been used to implement various sections of UnitParser. Components of ifps3 are used in the construction of UnitParser, code implementing the class wrapper is taken from Carlo Kok''s conv unility } - +{$IFDEF MSWINDOWS} +{$I ..\PascalScript.inc} +{$ELSE} +{$I ../PascalScript.inc} +{$ENDIF} interface uses @@ -259,8 +263,130 @@ begin SIRegister_TIBBASE(CL); end; -(* === run-time registration functions === *) -(*----------------------------------------------------------------------------*) + +{$IFDEF DELPHI10UP}{$REGION 'TIBBASE'}{$ENDIF} +{$IFDEF class_helper_present} +type + TIBBASE_PSHelper = class helper for TIBBASE + public + procedure TRANSACTION_W(const T: TIBTRANSACTION); + procedure TRANSACTION_R(var T: TIBTRANSACTION); + procedure TRHANDLE_R(var T: PISC_TR_HANDLE); + procedure OWNER_R(var T: TOBJECT); + procedure DBHANDLE_R(var T: PISC_DB_HANDLE); + procedure DATABASE_W(const T: TIBDATABASE); + procedure DATABASE_R(var T: TIBDATABASE); + procedure ONTRANSACTIONFREE_W(const T: TNOTIFYEVENT); + procedure ONTRANSACTIONFREE_R(var T: TNOTIFYEVENT); + procedure AFTERTRANSACTIONEND_W(const T: TNOTIFYEVENT); + procedure AFTERTRANSACTIONEND_R(var T: TNOTIFYEVENT); + procedure BEFORETRANSACTIONEND_W(const T: TNOTIFYEVENT); + procedure BEFORETRANSACTIONEND_R(var T: TNOTIFYEVENT); + procedure ONDATABASEFREE_W(const T: TNOTIFYEVENT); + procedure ONDATABASEFREE_R(var T: TNOTIFYEVENT); + procedure AFTERDATABASEDISCONNECT_W(const T: TNOTIFYEVENT); + procedure AFTERDATABASEDISCONNECT_R(var T: TNOTIFYEVENT); + procedure BEFOREDATABASEDISCONNECT_W(const T: TNOTIFYEVENT); + procedure BEFOREDATABASEDISCONNECT_R(var T: TNOTIFYEVENT); + end; + +procedure TIBBASE_PSHelper.TRANSACTION_W(const T: TIBTRANSACTION); +begin Self.TRANSACTION := T; end; + + +procedure TIBBASE_PSHelper.TRANSACTION_R(var T: TIBTRANSACTION); +begin T := Self.TRANSACTION; end; + + +procedure TIBBASE_PSHelper.TRHANDLE_R(var T: PISC_TR_HANDLE); +begin T := Self.TRHANDLE; end; + + +procedure TIBBASE_PSHelper.OWNER_R(var T: TOBJECT); +begin T := Self.OWNER; end; + + +procedure TIBBASE_PSHelper.DBHANDLE_R(var T: PISC_DB_HANDLE); +begin T := Self.DBHANDLE; end; + + +procedure TIBBASE_PSHelper.DATABASE_W(const T: TIBDATABASE); +begin Self.DATABASE := T; end; + + +procedure TIBBASE_PSHelper.DATABASE_R(var T: TIBDATABASE); +begin T := Self.DATABASE; end; + + +procedure TIBBASE_PSHelper.ONTRANSACTIONFREE_W(const T: TNOTIFYEVENT); +begin Self.ONTRANSACTIONFREE := T; end; + + +procedure TIBBASE_PSHelper.ONTRANSACTIONFREE_R(var T: TNOTIFYEVENT); +begin T := Self.ONTRANSACTIONFREE; end; + + +procedure TIBBASE_PSHelper.AFTERTRANSACTIONEND_W(const T: TNOTIFYEVENT); +begin Self.AFTERTRANSACTIONEND := T; end; + + +procedure TIBBASE_PSHelper.AFTERTRANSACTIONEND_R(var T: TNOTIFYEVENT); +begin T := Self.AFTERTRANSACTIONEND; end; + + +procedure TIBBASE_PSHelper.BEFORETRANSACTIONEND_W(const T: TNOTIFYEVENT); +begin Self.BEFORETRANSACTIONEND := T; end; + + +procedure TIBBASE_PSHelper.BEFORETRANSACTIONEND_R(var T: TNOTIFYEVENT); +begin T := Self.BEFORETRANSACTIONEND; end; + + +procedure TIBBASE_PSHelper.ONDATABASEFREE_W(const T: TNOTIFYEVENT); +begin Self.ONDATABASEFREE := T; end; + + +procedure TIBBASE_PSHelper.ONDATABASEFREE_R(var T: TNOTIFYEVENT); +begin T := Self.ONDATABASEFREE; end; + + +procedure TIBBASE_PSHelper.AFTERDATABASEDISCONNECT_W(const T: TNOTIFYEVENT); +begin Self.AFTERDATABASEDISCONNECT := T; end; + + +procedure TIBBASE_PSHelper.AFTERDATABASEDISCONNECT_R(var T: TNOTIFYEVENT); +begin T := Self.AFTERDATABASEDISCONNECT; end; + + +procedure TIBBASE_PSHelper.BEFOREDATABASEDISCONNECT_W(const T: TNOTIFYEVENT); +begin Self.BEFOREDATABASEDISCONNECT := T; end; + + +procedure TIBBASE_PSHelper.BEFOREDATABASEDISCONNECT_R(var T: TNOTIFYEVENT); +begin T := Self.BEFOREDATABASEDISCONNECT; end; + +procedure RIRegister_TIBBASE(CL: TPSRuntimeClassImporter); +begin + with CL.Add(TIBBASE) do + begin + RegisterConstructor(@TIBBASE.CREATE, 'Create'); + RegisterVirtualMethod(@TIBBASE.CHECKDATABASE, 'CheckDatabase'); + RegisterVirtualMethod(@TIBBASE.CHECKTRANSACTION, 'CheckTransaction'); + RegisterPropertyHelper(@TIBBASE.BEFOREDATABASEDISCONNECT_R,@TIBBASE.BEFOREDATABASEDISCONNECT_W,'BeforeDatabaseDisconnect'); + RegisterPropertyHelper(@TIBBASE.AFTERDATABASEDISCONNECT_R,@TIBBASE.AFTERDATABASEDISCONNECT_W,'AfterDatabaseDisconnect'); + RegisterEventPropertyHelper(@TIBBASE.ONDATABASEFREE_R,@TIBBASE.ONDATABASEFREE_W,'OnDatabaseFree'); + RegisterPropertyHelper(@TIBBASE.BEFORETRANSACTIONEND_R,@TIBBASE.BEFORETRANSACTIONEND_W,'BeforeTransactionEnd'); + RegisterPropertyHelper(@TIBBASE.AFTERTRANSACTIONEND_R,@TIBBASE.AFTERTRANSACTIONEND_W,'AfterTransactionEnd'); + RegisterEventPropertyHelper(@TIBBASE.ONTRANSACTIONFREE_R,@TIBBASE.ONTRANSACTIONFREE_W,'OnTransactionFree'); + RegisterPropertyHelper(@TIBBASE.DATABASE_R,@TIBBASE.DATABASE_W,'Database'); + RegisterPropertyHelper(@TIBBASE.DBHANDLE_R,nil,'DBHandle'); + RegisterPropertyHelper(@TIBBASE.OWNER_R,nil,'Owner'); + RegisterPropertyHelper(@TIBBASE.TRHANDLE_R,nil,'TRHandle'); + RegisterPropertyHelper(@TIBBASE.TRANSACTION_R,@TIBBASE.TRANSACTION_W,'Transaction'); + end; +end; + +{$ELSE} procedure TIBBASETRANSACTION_W(Self: TIBBASE; const T: TIBTRANSACTION); begin Self.TRANSACTION := T; end; @@ -336,7 +462,189 @@ begin Self.BEFOREDATABASEDISCONNECT := T; end; procedure TIBBASEBEFOREDATABASEDISCONNECT_R(Self: TIBBASE; var T: TNOTIFYEVENT); begin T := Self.BEFOREDATABASEDISCONNECT; end; -(*----------------------------------------------------------------------------*) +procedure RIRegister_TIBBASE(CL: TPSRuntimeClassImporter); +begin + with CL.Add(TIBBASE) do + begin + RegisterConstructor(@TIBBASE.CREATE, 'Create'); + RegisterVirtualMethod(@TIBBASE.CHECKDATABASE, 'CheckDatabase'); + RegisterVirtualMethod(@TIBBASE.CHECKTRANSACTION, 'CheckTransaction'); + RegisterPropertyHelper(@TIBBASEBEFOREDATABASEDISCONNECT_R,@TIBBASEBEFOREDATABASEDISCONNECT_W,'BeforeDatabaseDisconnect'); + RegisterPropertyHelper(@TIBBASEAFTERDATABASEDISCONNECT_R,@TIBBASEAFTERDATABASEDISCONNECT_W,'AfterDatabaseDisconnect'); + RegisterEventPropertyHelper(@TIBBASEONDATABASEFREE_R,@TIBBASEONDATABASEFREE_W,'OnDatabaseFree'); + RegisterPropertyHelper(@TIBBASEBEFORETRANSACTIONEND_R,@TIBBASEBEFORETRANSACTIONEND_W,'BeforeTransactionEnd'); + RegisterPropertyHelper(@TIBBASEAFTERTRANSACTIONEND_R,@TIBBASEAFTERTRANSACTIONEND_W,'AfterTransactionEnd'); + RegisterEventPropertyHelper(@TIBBASEONTRANSACTIONFREE_R,@TIBBASEONTRANSACTIONFREE_W,'OnTransactionFree'); + RegisterPropertyHelper(@TIBBASEDATABASE_R,@TIBBASEDATABASE_W,'Database'); + RegisterPropertyHelper(@TIBBASEDBHANDLE_R,nil,'DBHandle'); + RegisterPropertyHelper(@TIBBASEOWNER_R,nil,'Owner'); + RegisterPropertyHelper(@TIBBASETRHANDLE_R,nil,'TRHandle'); + RegisterPropertyHelper(@TIBBASETRANSACTION_R,@TIBBASETRANSACTION_W,'Transaction'); + end; +end; + +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TIBTRANSACTION'}{$ENDIF} +{$IFDEF class_helper_present} +type + TIBTRANSACTION_PSHelper = class helper for TIBTRANSACTION + public + procedure ONIDLETIMER_W(const T: TNOTIFYEVENT); + procedure ONIDLETIMER_R(var T: TNOTIFYEVENT); + procedure AUTOSTOPACTION_W(const T: TAUTOSTOPACTION); + procedure AUTOSTOPACTION_R(var T: TAUTOSTOPACTION); + procedure PARAMS_W(const T: TSTRINGS); + procedure PARAMS_R(var T: TSTRINGS); + procedure DEFAULTACTION_W(const T: TTRANSACTIONACTION); + procedure DEFAULTACTION_R(var T: TTRANSACTIONACTION); + procedure IDLETIMER_W(const T: INTEGER); + procedure IDLETIMER_R(var T: INTEGER); + procedure DEFAULTDATABASE_W(const T: TIBDATABASE); + procedure DEFAULTDATABASE_R(var T: TIBDATABASE); + procedure ACTIVE_W(const T: BOOLEAN); + procedure ACTIVE_R(var T: BOOLEAN); + procedure TPBLENGTH_R(var T: SHORT); + procedure TPB_R(var T: PCHAR); + procedure INTRANSACTION_R(var T: BOOLEAN); + procedure HANDLEISSHARED_R(var T: BOOLEAN); + procedure HANDLE_R(var T: TISC_TR_HANDLE); + procedure SQLOBJECTS_R(var T: TIBBASE; const t1: INTEGER); + procedure SQLOBJECTCOUNT_R(var T: INTEGER); + procedure DATABASES_R(var T: TIBDATABASE; const t1: INTEGER); + procedure DATABASECOUNT_R(var T: INTEGER); + end; + +procedure TIBTRANSACTION_PSHelper.ONIDLETIMER_W(const T: TNOTIFYEVENT); +begin Self.ONIDLETIMER := T; end; + + +procedure TIBTRANSACTION_PSHelper.ONIDLETIMER_R(var T: TNOTIFYEVENT); +begin T := Self.ONIDLETIMER; end; + + +procedure TIBTRANSACTION_PSHelper.AUTOSTOPACTION_W(const T: TAUTOSTOPACTION); +begin Self.AUTOSTOPACTION := T; end; + + +procedure TIBTRANSACTION_PSHelper.AUTOSTOPACTION_R(var T: TAUTOSTOPACTION); +begin T := Self.AUTOSTOPACTION; end; + + +procedure TIBTRANSACTION_PSHelper.PARAMS_W(const T: TSTRINGS); +begin Self.PARAMS := T; end; + + +procedure TIBTRANSACTION_PSHelper.PARAMS_R(var T: TSTRINGS); +begin T := Self.PARAMS; end; + + +procedure TIBTRANSACTION_PSHelper.DEFAULTACTION_W(const T: TTRANSACTIONACTION); +begin Self.DEFAULTACTION := T; end; + + +procedure TIBTRANSACTION_PSHelper.DEFAULTACTION_R(var T: TTRANSACTIONACTION); +begin T := Self.DEFAULTACTION; end; + + +procedure TIBTRANSACTION_PSHelper.IDLETIMER_W(const T: INTEGER); +begin Self.IDLETIMER := T; end; + + +procedure TIBTRANSACTION_PSHelper.IDLETIMER_R(var T: INTEGER); +begin T := Self.IDLETIMER; end; + + +procedure TIBTRANSACTION_PSHelper.DEFAULTDATABASE_W(const T: TIBDATABASE); +begin Self.DEFAULTDATABASE := T; end; + + +procedure TIBTRANSACTION_PSHelper.DEFAULTDATABASE_R(var T: TIBDATABASE); +begin T := Self.DEFAULTDATABASE; end; + + +procedure TIBTRANSACTION_PSHelper.ACTIVE_W(const T: BOOLEAN); +begin Self.ACTIVE := T; end; + + +procedure TIBTRANSACTION_PSHelper.ACTIVE_R(var T: BOOLEAN); +begin T := Self.ACTIVE; end; + + +procedure TIBTRANSACTION_PSHelper.TPBLENGTH_R(var T: SHORT); +begin T := Self.TPBLENGTH; end; + + +procedure TIBTRANSACTION_PSHelper.TPB_R(var T: PCHAR); +begin T := Self.TPB; end; + + +procedure TIBTRANSACTION_PSHelper.INTRANSACTION_R(var T: BOOLEAN); +begin T := Self.INTRANSACTION; end; + + +procedure TIBTRANSACTION_PSHelper.HANDLEISSHARED_R(var T: BOOLEAN); +begin T := Self.HANDLEISSHARED; end; + + +procedure TIBTRANSACTION_PSHelper.HANDLE_R(var T: TISC_TR_HANDLE); +begin T := Self.HANDLE; end; + + +procedure TIBTRANSACTION_PSHelper.SQLOBJECTS_R(var T: TIBBASE; const t1: INTEGER); +begin T := Self.SQLOBJECTS[t1]; end; + + +procedure TIBTRANSACTION_PSHelper.SQLOBJECTCOUNT_R(var T: INTEGER); +begin T := Self.SQLOBJECTCOUNT; end; + + +procedure TIBTRANSACTION_PSHelper.DATABASES_R(var T: TIBDATABASE; const t1: INTEGER); +begin T := Self.DATABASES[t1]; end; + + +procedure TIBTRANSACTION_PSHelper.DATABASECOUNT_R(var T: INTEGER); +begin T := Self.DATABASECOUNT; end; + +procedure RIRegister_TIBTRANSACTION(CL: TPSRuntimeClassImporter); +begin + with CL.Add(TIBTRANSACTION) do + begin + RegisterMethod(@TIBTRANSACTION.CALL, 'Call'); + RegisterMethod(@TIBTRANSACTION.COMMIT, 'Commit'); + RegisterMethod(@TIBTRANSACTION.COMMITRETAINING, 'CommitRetaining'); + RegisterMethod(@TIBTRANSACTION.ROLLBACK, 'Rollback'); + RegisterMethod(@TIBTRANSACTION.ROLLBACKRETAINING, 'RollbackRetaining'); + RegisterMethod(@TIBTRANSACTION.STARTTRANSACTION, 'StartTransaction'); + RegisterMethod(@TIBTRANSACTION.CHECKINTRANSACTION, 'CheckInTransaction'); + RegisterMethod(@TIBTRANSACTION.CHECKNOTINTRANSACTION, 'CheckNotInTransaction'); + RegisterMethod(@TIBTRANSACTION.CHECKAUTOSTOP, 'CheckAutoStop'); + RegisterMethod(@TIBTRANSACTION.ADDDATABASE, 'AddDatabase'); + RegisterMethod(@TIBTRANSACTION.FINDDATABASE, 'FindDatabase'); + RegisterMethod(@TIBTRANSACTION.FINDDEFAULTDATABASE, 'FindDefaultDatabase'); + RegisterMethod(@TIBTRANSACTION.REMOVEDATABASE, 'RemoveDatabase'); + RegisterMethod(@TIBTRANSACTION.REMOVEDATABASES, 'RemoveDatabases'); + RegisterMethod(@TIBTRANSACTION.CHECKDATABASESINLIST, 'CheckDatabasesInList'); + RegisterPropertyHelper(@TIBTRANSACTION.DATABASECOUNT_R,nil,'DatabaseCount'); + RegisterPropertyHelper(@TIBTRANSACTION.DATABASES_R,nil,'Databases'); + RegisterPropertyHelper(@TIBTRANSACTION.SQLOBJECTCOUNT_R,nil,'SQLObjectCount'); + RegisterPropertyHelper(@TIBTRANSACTION.SQLOBJECTS_R,nil,'SQLObjects'); + RegisterPropertyHelper(@TIBTRANSACTION.HANDLE_R,nil,'Handle'); + RegisterPropertyHelper(@TIBTRANSACTION.HANDLEISSHARED_R,nil,'HandleIsShared'); + RegisterPropertyHelper(@TIBTRANSACTION.INTRANSACTION_R,nil,'InTransaction'); + RegisterPropertyHelper(@TIBTRANSACTION.TPB_R,nil,'TPB'); + RegisterPropertyHelper(@TIBTRANSACTION.TPBLENGTH_R,nil,'TPBLength'); + RegisterPropertyHelper(@TIBTRANSACTION.ACTIVE_R,@TIBTRANSACTION.ACTIVE_W,'Active'); + RegisterPropertyHelper(@TIBTRANSACTION.DEFAULTDATABASE_R,@TIBTRANSACTION.DEFAULTDATABASE_W,'DefaultDatabase'); + RegisterPropertyHelper(@TIBTRANSACTION.IDLETIMER_R,@TIBTRANSACTION.IDLETIMER_W,'IdleTimer'); + RegisterPropertyHelper(@TIBTRANSACTION.DEFAULTACTION_R,@TIBTRANSACTION.DEFAULTACTION_W,'DefaultAction'); + RegisterPropertyHelper(@TIBTRANSACTION.PARAMS_R,@TIBTRANSACTION.PARAMS_W,'Params'); + RegisterPropertyHelper(@TIBTRANSACTION.AUTOSTOPACTION_R,@TIBTRANSACTION.AUTOSTOPACTION_W,'AutoStopAction'); + RegisterEventPropertyHelper(@TIBTRANSACTION.ONIDLETIMER_R,@TIBTRANSACTION.ONIDLETIMER_W,'OnIdleTimer'); + end; +end; +{$ELSE} procedure TIBTRANSACTIONONIDLETIMER_W(Self: TIBTRANSACTION; const T: TNOTIFYEVENT); begin Self.ONIDLETIMER := T; end; @@ -428,7 +736,272 @@ begin T := Self.DATABASES[t1]; end; procedure TIBTRANSACTIONDATABASECOUNT_R(Self: TIBTRANSACTION; var T: INTEGER); begin T := Self.DATABASECOUNT; end; -(*----------------------------------------------------------------------------*) +procedure RIRegister_TIBTRANSACTION(CL: TPSRuntimeClassImporter); +begin + with CL.Add(TIBTRANSACTION) do + begin + RegisterMethod(@TIBTRANSACTION.CALL, 'Call'); + RegisterMethod(@TIBTRANSACTION.COMMIT, 'Commit'); + RegisterMethod(@TIBTRANSACTION.COMMITRETAINING, 'CommitRetaining'); + RegisterMethod(@TIBTRANSACTION.ROLLBACK, 'Rollback'); + RegisterMethod(@TIBTRANSACTION.ROLLBACKRETAINING, 'RollbackRetaining'); + RegisterMethod(@TIBTRANSACTION.STARTTRANSACTION, 'StartTransaction'); + RegisterMethod(@TIBTRANSACTION.CHECKINTRANSACTION, 'CheckInTransaction'); + RegisterMethod(@TIBTRANSACTION.CHECKNOTINTRANSACTION, 'CheckNotInTransaction'); + RegisterMethod(@TIBTRANSACTION.CHECKAUTOSTOP, 'CheckAutoStop'); + RegisterMethod(@TIBTRANSACTION.ADDDATABASE, 'AddDatabase'); + RegisterMethod(@TIBTRANSACTION.FINDDATABASE, 'FindDatabase'); + RegisterMethod(@TIBTRANSACTION.FINDDEFAULTDATABASE, 'FindDefaultDatabase'); + RegisterMethod(@TIBTRANSACTION.REMOVEDATABASE, 'RemoveDatabase'); + RegisterMethod(@TIBTRANSACTION.REMOVEDATABASES, 'RemoveDatabases'); + RegisterMethod(@TIBTRANSACTION.CHECKDATABASESINLIST, 'CheckDatabasesInList'); + RegisterPropertyHelper(@TIBTRANSACTIONDATABASECOUNT_R,nil,'DatabaseCount'); + RegisterPropertyHelper(@TIBTRANSACTIONDATABASES_R,nil,'Databases'); + RegisterPropertyHelper(@TIBTRANSACTIONSQLOBJECTCOUNT_R,nil,'SQLObjectCount'); + RegisterPropertyHelper(@TIBTRANSACTIONSQLOBJECTS_R,nil,'SQLObjects'); + RegisterPropertyHelper(@TIBTRANSACTIONHANDLE_R,nil,'Handle'); + RegisterPropertyHelper(@TIBTRANSACTIONHANDLEISSHARED_R,nil,'HandleIsShared'); + RegisterPropertyHelper(@TIBTRANSACTIONINTRANSACTION_R,nil,'InTransaction'); + RegisterPropertyHelper(@TIBTRANSACTIONTPB_R,nil,'TPB'); + RegisterPropertyHelper(@TIBTRANSACTIONTPBLENGTH_R,nil,'TPBLength'); + RegisterPropertyHelper(@TIBTRANSACTIONACTIVE_R,@TIBTRANSACTIONACTIVE_W,'Active'); + RegisterPropertyHelper(@TIBTRANSACTIONDEFAULTDATABASE_R,@TIBTRANSACTIONDEFAULTDATABASE_W,'DefaultDatabase'); + RegisterPropertyHelper(@TIBTRANSACTIONIDLETIMER_R,@TIBTRANSACTIONIDLETIMER_W,'IdleTimer'); + RegisterPropertyHelper(@TIBTRANSACTIONDEFAULTACTION_R,@TIBTRANSACTIONDEFAULTACTION_W,'DefaultAction'); + RegisterPropertyHelper(@TIBTRANSACTIONPARAMS_R,@TIBTRANSACTIONPARAMS_W,'Params'); + RegisterPropertyHelper(@TIBTRANSACTIONAUTOSTOPACTION_R,@TIBTRANSACTIONAUTOSTOPACTION_W,'AutoStopAction'); + RegisterEventPropertyHelper(@TIBTRANSACTIONONIDLETIMER_R,@TIBTRANSACTIONONIDLETIMER_W,'OnIdleTimer'); + end; +end; +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TIBDATABASE'}{$ENDIF} +{$IFDEF class_helper_present} +type + TIBDATABASE_PSHelper = class helper for TIBDATABASE + public + procedure ONDIALECTDOWNGRADEWARNING_W(const T: TNOTIFYEVENT); + procedure ONDIALECTDOWNGRADEWARNING_R(var T: TNOTIFYEVENT); + procedure ONIDLETIMER_W(const T: TNOTIFYEVENT); + procedure ONIDLETIMER_R(var T: TNOTIFYEVENT); + procedure ONLOGIN_W(const T: TIBDATABASELOGINEVENT); + procedure ONLOGIN_R(var T: TIBDATABASELOGINEVENT); + procedure CONNECTED_W(const T: Boolean); + procedure CONNECTED_R(var T: Boolean); + procedure ALLOWSTREAMEDCONNECTED_W(const T: BOOLEAN); + procedure ALLOWSTREAMEDCONNECTED_R(var T: BOOLEAN); + procedure TRACEFLAGS_W(const T: TTRACEFLAGS); + procedure TRACEFLAGS_R(var T: TTRACEFLAGS); + procedure DBSQLDIALECT_R(var T: INTEGER); + procedure SQLDIALECT_W(const T: INTEGER); + procedure SQLDIALECT_R(var T: INTEGER); + procedure IDLETIMER_W(const T: INTEGER); + procedure IDLETIMER_R(var T: INTEGER); + procedure DEFAULTTRANSACTION_W(const T: TIBTRANSACTION); + procedure DEFAULTTRANSACTION_R(var T: TIBTRANSACTION); + procedure PARAMS_W(const T: TSTRINGS); + procedure PARAMS_R(var T: TSTRINGS); + procedure DATABASENAME_W(const T: TIBFILENAME); + procedure DATABASENAME_R(var T: TIBFILENAME); + procedure INTERNALTRANSACTION_R(var T: TIBTRANSACTION); + procedure TRANSACTIONS_R(var T: TIBTRANSACTION; const t1: INTEGER); + procedure TRANSACTIONCOUNT_R(var T: INTEGER); + procedure HANDLEISSHARED_R(var T: BOOLEAN); + procedure SQLOBJECTS_R(var T: TIBBASE; const t1: INTEGER); + procedure SQLOBJECTCOUNT_R(var T: INTEGER); + procedure DBPARAMBYDPB_W(const T: STRING; const t1: INTEGER); + procedure DBPARAMBYDPB_R(var T: STRING; const t1: INTEGER); + procedure ISREADONLY_R(var T: BOOLEAN); + procedure HANDLE_R(var T: TISC_DB_HANDLE); + end; + +procedure TIBDATABASE_PSHelper.ONDIALECTDOWNGRADEWARNING_W(const T: TNOTIFYEVENT); +begin Self.ONDIALECTDOWNGRADEWARNING := T; end; + + +procedure TIBDATABASE_PSHelper.ONDIALECTDOWNGRADEWARNING_R(var T: TNOTIFYEVENT); +begin T := Self.ONDIALECTDOWNGRADEWARNING; end; + + +procedure TIBDATABASE_PSHelper.ONIDLETIMER_W(const T: TNOTIFYEVENT); +begin Self.ONIDLETIMER := T; end; + + +procedure TIBDATABASE_PSHelper.ONIDLETIMER_R(var T: TNOTIFYEVENT); +begin T := Self.ONIDLETIMER; end; + + +procedure TIBDATABASE_PSHelper.ONLOGIN_W(const T: TIBDATABASELOGINEVENT); +begin Self.ONLOGIN := T; end; + + +procedure TIBDATABASE_PSHelper.ONLOGIN_R(var T: TIBDATABASELOGINEVENT); +begin T := Self.ONLOGIN; end; + + +procedure TIBDATABASE_PSHelper.CONNECTED_W(const T: Boolean); +begin Self.Connected := T; end; + + +procedure TIBDATABASE_PSHelper.CONNECTED_R(var T: Boolean); +begin T := Self.Connected; end; + + +procedure TIBDATABASE_PSHelper.ALLOWSTREAMEDCONNECTED_W(const T: BOOLEAN); +begin Self.ALLOWSTREAMEDCONNECTED := T; end; + + +procedure TIBDATABASE_PSHelper.ALLOWSTREAMEDCONNECTED_R(var T: BOOLEAN); +begin T := Self.ALLOWSTREAMEDCONNECTED; end; + + +procedure TIBDATABASE_PSHelper.TRACEFLAGS_W(const T: TTRACEFLAGS); +begin Self.TRACEFLAGS := T; end; + + +procedure TIBDATABASE_PSHelper.TRACEFLAGS_R(var T: TTRACEFLAGS); +begin T := Self.TRACEFLAGS; end; + + +procedure TIBDATABASE_PSHelper.DBSQLDIALECT_R(var T: INTEGER); +begin T := Self.DBSQLDIALECT; end; + + +procedure TIBDATABASE_PSHelper.SQLDIALECT_W(const T: INTEGER); +begin Self.SQLDIALECT := T; end; + + +procedure TIBDATABASE_PSHelper.SQLDIALECT_R(var T: INTEGER); +begin T := Self.SQLDIALECT; end; + + +procedure TIBDATABASE_PSHelper.IDLETIMER_W(const T: INTEGER); +begin Self.IDLETIMER := T; end; + + +procedure TIBDATABASE_PSHelper.IDLETIMER_R(var T: INTEGER); +begin T := Self.IDLETIMER; end; + + +procedure TIBDATABASE_PSHelper.DEFAULTTRANSACTION_W(const T: TIBTRANSACTION); +begin Self.DEFAULTTRANSACTION := T; end; + + +procedure TIBDATABASE_PSHelper.DEFAULTTRANSACTION_R(var T: TIBTRANSACTION); +begin T := Self.DEFAULTTRANSACTION; end; + + +procedure TIBDATABASE_PSHelper.PARAMS_W(const T: TSTRINGS); +begin Self.PARAMS := T; end; + + +procedure TIBDATABASE_PSHelper.PARAMS_R(var T: TSTRINGS); +begin T := Self.PARAMS; end; + + +procedure TIBDATABASE_PSHelper.DATABASENAME_W(const T: TIBFILENAME); +begin Self.DATABASENAME := T; end; + + +procedure TIBDATABASE_PSHelper.DATABASENAME_R(var T: TIBFILENAME); +begin T := Self.DATABASENAME; end; + + +procedure TIBDATABASE_PSHelper.INTERNALTRANSACTION_R(var T: TIBTRANSACTION); +begin T := Self.INTERNALTRANSACTION; end; + + +procedure TIBDATABASE_PSHelper.TRANSACTIONS_R(var T: TIBTRANSACTION; const t1: INTEGER); +begin T := Self.TRANSACTIONS[t1]; end; + + +procedure TIBDATABASE_PSHelper.TRANSACTIONCOUNT_R(var T: INTEGER); +begin T := Self.TRANSACTIONCOUNT; end; + + +procedure TIBDATABASE_PSHelper.HANDLEISSHARED_R(var T: BOOLEAN); +begin T := Self.HANDLEISSHARED; end; + + +procedure TIBDATABASE_PSHelper.SQLOBJECTS_R(var T: TIBBASE; const t1: INTEGER); +begin T := Self.SQLOBJECTS[t1]; end; + + +procedure TIBDATABASE_PSHelper.SQLOBJECTCOUNT_R(var T: INTEGER); +begin T := Self.SQLOBJECTCOUNT; end; + + +procedure TIBDATABASE_PSHelper.DBPARAMBYDPB_W(const T: STRING; const t1: INTEGER); +begin Self.DBPARAMBYDPB[t1] := T; end; + + +procedure TIBDATABASE_PSHelper.DBPARAMBYDPB_R(var T: STRING; const t1: INTEGER); +begin T := Self.DBPARAMBYDPB[t1]; end; + + +procedure TIBDATABASE_PSHelper.ISREADONLY_R(var T: BOOLEAN); +begin T := Self.ISREADONLY; end; + + +procedure TIBDATABASE_PSHelper.HANDLE_R(var T: TISC_DB_HANDLE); +begin T := Self.HANDLE; end; + +procedure RIRegister_TIBDATABASE(CL: TPSRuntimeClassImporter); +begin + with CL.Add(TIBDATABASE) do + begin + RegisterMethod(@TIBDATABASE.ADDEVENTNOTIFIER, 'AddEventNotifier'); + RegisterMethod(@TIBDATABASE.REMOVEEVENTNOTIFIER, 'RemoveEventNotifier'); + RegisterMethod(@TIBDATABASE.APPLYUPDATES, 'ApplyUpdates'); + RegisterMethod(@TIBDATABASE.CLOSEDATASETS, 'CloseDataSets'); + RegisterMethod(@TIBDATABASE.CHECKACTIVE, 'CheckActive'); + RegisterMethod(@TIBDATABASE.CHECKINACTIVE, 'CheckInactive'); + RegisterMethod(@TIBDATABASE.CREATEDATABASE, 'CreateDatabase'); + RegisterMethod(@TIBDATABASE.DROPDATABASE, 'DropDatabase'); + RegisterMethod(@TIBDATABASE.FORCECLOSE, 'ForceClose'); + RegisterMethod(@TIBDATABASE.GETFIELDNAMES, 'GetFieldNames'); + RegisterMethod(@TIBDATABASE.GETTABLENAMES, 'GetTableNames'); + RegisterMethod(@TIBDATABASE.INDEXOFDBCONST, 'IndexOfDBConst'); + RegisterMethod(@TIBDATABASE.TESTCONNECTED, 'TestConnected'); + RegisterMethod(@TIBDATABASE.CHECKDATABASENAME, 'CheckDatabaseName'); + RegisterMethod(@TIBDATABASE.CALL, 'Call'); + RegisterMethod(@TIBDATABASE.Open, 'Open'); + RegisterMethod(@TIBDATABASE.Close, 'Close'); + RegisterMethod(@TIBDATABASE.ADDTRANSACTION, 'AddTransaction'); + RegisterMethod(@TIBDATABASE.FINDTRANSACTION, 'FindTransaction'); + RegisterMethod(@TIBDATABASE.FINDDEFAULTTRANSACTION, 'FindDefaultTransaction'); + RegisterMethod(@TIBDATABASE.REMOVETRANSACTION, 'RemoveTransaction'); + RegisterMethod(@TIBDATABASE.REMOVETRANSACTIONS, 'RemoveTransactions'); + RegisterMethod(@TIBDATABASE.SETHANDLE, 'SetHandle'); + RegisterPropertyHelper(@TIBDATABASE.HANDLE_R,nil,'Handle'); + RegisterPropertyHelper(@TIBDATABASE.ISREADONLY_R,nil,'IsReadOnly'); + RegisterPropertyHelper(@TIBDATABASE.DBPARAMBYDPB_R,@TIBDATABASE.DBPARAMBYDPB_W,'DBParamByDPB'); + RegisterPropertyHelper(@TIBDATABASE.SQLOBJECTCOUNT_R,nil,'SQLObjectCount'); + RegisterPropertyHelper(@TIBDATABASE.SQLOBJECTS_R,nil,'SQLObjects'); + RegisterPropertyHelper(@TIBDATABASE.HANDLEISSHARED_R,nil,'HandleIsShared'); + RegisterPropertyHelper(@TIBDATABASE.TRANSACTIONCOUNT_R,nil,'TransactionCount'); + RegisterPropertyHelper(@TIBDATABASE.TRANSACTIONS_R,nil,'Transactions'); + RegisterPropertyHelper(@TIBDATABASE.INTERNALTRANSACTION_R,nil,'InternalTransaction'); + RegisterMethod(@TIBDATABASE.HAS_DEFAULT_VALUE, 'Has_DEFAULT_VALUE'); + RegisterMethod(@TIBDATABASE.HAS_COMPUTED_BLR, 'Has_COMPUTED_BLR'); + RegisterMethod(@TIBDATABASE.FLUSHSCHEMA, 'FlushSchema'); + RegisterPropertyHelper(@TIBDATABASE.DATABASENAME_R,@TIBDATABASE.DATABASENAME_W,'DatabaseName'); + RegisterPropertyHelper(@TIBDATABASE.CONNECTED_R,@TIBDATABASE.CONNECTED_W,'Connected'); + RegisterPropertyHelper(@TIBDATABASE.PARAMS_R,@TIBDATABASE.PARAMS_W,'Params'); + RegisterPropertyHelper(@TIBDATABASE.DEFAULTTRANSACTION_R,@TIBDATABASE.DEFAULTTRANSACTION_W,'DefaultTransaction'); + RegisterPropertyHelper(@TIBDATABASE.IDLETIMER_R,@TIBDATABASE.IDLETIMER_W,'IdleTimer'); + RegisterPropertyHelper(@TIBDATABASE.SQLDIALECT_R,@TIBDATABASE.SQLDIALECT_W,'SQLDialect'); + RegisterPropertyHelper(@TIBDATABASE.DBSQLDIALECT_R,nil,'DBSQLDialect'); + RegisterPropertyHelper(@TIBDATABASE.TRACEFLAGS_R,@TIBDATABASE.TRACEFLAGS_W,'TraceFlags'); + RegisterPropertyHelper(@TIBDATABASE.ALLOWSTREAMEDCONNECTED_R,@TIBDATABASE.ALLOWSTREAMEDCONNECTED_W,'AllowStreamedConnected'); + RegisterEventPropertyHelper(@TIBDATABASE.ONLOGIN_R,@TIBDATABASE.ONLOGIN_W,'OnLogin'); + RegisterEventPropertyHelper(@TIBDATABASE.ONIDLETIMER_R,@TIBDATABASE.ONIDLETIMER_W,'OnIdleTimer'); + RegisterEventPropertyHelper(@TIBDATABASE.ONDIALECTDOWNGRADEWARNING_R,@TIBDATABASE.ONDIALECTDOWNGRADEWARNING_W,'OnDialectDowngradeWarning'); + end; +end; + +{$ELSE} procedure TIBDATABASEONDIALECTDOWNGRADEWARNING_W(Self: TIBDATABASE; const T: TNOTIFYEVENT); begin Self.ONDIALECTDOWNGRADEWARNING := T; end; @@ -559,6 +1132,63 @@ begin T := Self.ISREADONLY; end; (*----------------------------------------------------------------------------*) procedure TIBDATABASEHANDLE_R(Self: TIBDATABASE; var T: TISC_DB_HANDLE); begin T := Self.HANDLE; end; +procedure RIRegister_TIBDATABASE(CL: TPSRuntimeClassImporter); +begin + with CL.Add(TIBDATABASE) do + begin + RegisterMethod(@TIBDATABASE.ADDEVENTNOTIFIER, 'AddEventNotifier'); + RegisterMethod(@TIBDATABASE.REMOVEEVENTNOTIFIER, 'RemoveEventNotifier'); + RegisterMethod(@TIBDATABASE.APPLYUPDATES, 'ApplyUpdates'); + RegisterMethod(@TIBDATABASE.CLOSEDATASETS, 'CloseDataSets'); + RegisterMethod(@TIBDATABASE.CHECKACTIVE, 'CheckActive'); + RegisterMethod(@TIBDATABASE.CHECKINACTIVE, 'CheckInactive'); + RegisterMethod(@TIBDATABASE.CREATEDATABASE, 'CreateDatabase'); + RegisterMethod(@TIBDATABASE.DROPDATABASE, 'DropDatabase'); + RegisterMethod(@TIBDATABASE.FORCECLOSE, 'ForceClose'); + RegisterMethod(@TIBDATABASE.GETFIELDNAMES, 'GetFieldNames'); + RegisterMethod(@TIBDATABASE.GETTABLENAMES, 'GetTableNames'); + RegisterMethod(@TIBDATABASE.INDEXOFDBCONST, 'IndexOfDBConst'); + RegisterMethod(@TIBDATABASE.TESTCONNECTED, 'TestConnected'); + RegisterMethod(@TIBDATABASE.CHECKDATABASENAME, 'CheckDatabaseName'); + RegisterMethod(@TIBDATABASE.CALL, 'Call'); + RegisterMethod(@TIBDATABASE.Open, 'Open'); + RegisterMethod(@TIBDATABASE.Close, 'Close'); + RegisterMethod(@TIBDATABASE.ADDTRANSACTION, 'AddTransaction'); + RegisterMethod(@TIBDATABASE.FINDTRANSACTION, 'FindTransaction'); + RegisterMethod(@TIBDATABASE.FINDDEFAULTTRANSACTION, 'FindDefaultTransaction'); + RegisterMethod(@TIBDATABASE.REMOVETRANSACTION, 'RemoveTransaction'); + RegisterMethod(@TIBDATABASE.REMOVETRANSACTIONS, 'RemoveTransactions'); + RegisterMethod(@TIBDATABASE.SETHANDLE, 'SetHandle'); + RegisterPropertyHelper(@TIBDATABASEHANDLE_R,nil,'Handle'); + RegisterPropertyHelper(@TIBDATABASEISREADONLY_R,nil,'IsReadOnly'); + RegisterPropertyHelper(@TIBDATABASEDBPARAMBYDPB_R,@TIBDATABASEDBPARAMBYDPB_W,'DBParamByDPB'); + RegisterPropertyHelper(@TIBDATABASESQLOBJECTCOUNT_R,nil,'SQLObjectCount'); + RegisterPropertyHelper(@TIBDATABASESQLOBJECTS_R,nil,'SQLObjects'); + RegisterPropertyHelper(@TIBDATABASEHANDLEISSHARED_R,nil,'HandleIsShared'); + RegisterPropertyHelper(@TIBDATABASETRANSACTIONCOUNT_R,nil,'TransactionCount'); + RegisterPropertyHelper(@TIBDATABASETRANSACTIONS_R,nil,'Transactions'); + RegisterPropertyHelper(@TIBDATABASEINTERNALTRANSACTION_R,nil,'InternalTransaction'); + RegisterMethod(@TIBDATABASE.HAS_DEFAULT_VALUE, 'Has_DEFAULT_VALUE'); + RegisterMethod(@TIBDATABASE.HAS_COMPUTED_BLR, 'Has_COMPUTED_BLR'); + RegisterMethod(@TIBDATABASE.FLUSHSCHEMA, 'FlushSchema'); + RegisterPropertyHelper(@TIBDATABASEDATABASENAME_R,@TIBDATABASEDATABASENAME_W,'DatabaseName'); + RegisterPropertyHelper(@TIBDATABASECONNECTED_R,@TIBDATABASECONNECTED_W,'Connected'); + RegisterPropertyHelper(@TIBDATABASEPARAMS_R,@TIBDATABASEPARAMS_W,'Params'); + RegisterPropertyHelper(@TIBDATABASEDEFAULTTRANSACTION_R,@TIBDATABASEDEFAULTTRANSACTION_W,'DefaultTransaction'); + RegisterPropertyHelper(@TIBDATABASEIDLETIMER_R,@TIBDATABASEIDLETIMER_W,'IdleTimer'); + RegisterPropertyHelper(@TIBDATABASESQLDIALECT_R,@TIBDATABASESQLDIALECT_W,'SQLDialect'); + RegisterPropertyHelper(@TIBDATABASEDBSQLDIALECT_R,nil,'DBSQLDialect'); + RegisterPropertyHelper(@TIBDATABASETRACEFLAGS_R,@TIBDATABASETRACEFLAGS_W,'TraceFlags'); + RegisterPropertyHelper(@TIBDATABASEALLOWSTREAMEDCONNECTED_R,@TIBDATABASEALLOWSTREAMEDCONNECTED_W,'AllowStreamedConnected'); + RegisterEventPropertyHelper(@TIBDATABASEONLOGIN_R,@TIBDATABASEONLOGIN_W,'OnLogin'); + RegisterEventPropertyHelper(@TIBDATABASEONIDLETIMER_R,@TIBDATABASEONIDLETIMER_W,'OnIdleTimer'); + RegisterEventPropertyHelper(@TIBDATABASEONDIALECTDOWNGRADEWARNING_R,@TIBDATABASEONDIALECTDOWNGRADEWARNING_W,'OnDialectDowngradeWarning'); + end; +end; + +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} +(* === run-time registration functions === *) (*----------------------------------------------------------------------------*) procedure SIRegister_TIBDATALINK(CL: TPSPascalCompiler); @@ -624,12 +1254,162 @@ begin SIRegister_TIBDATASET(CL); end; -(* === run-time registration functions === *) -(*----------------------------------------------------------------------------*) +{$IFDEF DELPHI10UP}{$REGION 'TIBDATASET'}{$ENDIF} +{$IFDEF class_helper_present} +type + TIBDATASET_PSHelper = class helper for TIBDATASET + public + procedure PREPARED_R(var T: BOOLEAN); + end; + +procedure TIBDATASET_PSHelper.PREPARED_R(var T: BOOLEAN); +begin T := Self.PREPARED; end; + +procedure RIRegister_TIBDATASET(CL: TPSRuntimeClassImporter); +begin + with CL.Add(TIBDATASET) do + begin + RegisterMethod(@TIBDATASET.PREPARE, 'Prepare'); + RegisterMethod(@TIBDATASET.UNPREPARE, 'UnPrepare'); + RegisterMethod(@TIBDATASET.BATCHINPUT, 'BatchInput'); + RegisterMethod(@TIBDATASET.BATCHOUTPUT, 'BatchOutput'); + RegisterMethod(@TIBDATASET.EXECSQL, 'ExecSQL'); + RegisterMethod(@TIBDATASET.PARAMBYNAME, 'ParamByName'); + RegisterPropertyHelper(@TIBDATASET.PREPARED_R,nil,'Prepared'); + end; +end; + +{$ELSE} procedure TIBDATASETPREPARED_R(Self: TIBDATASET; var T: BOOLEAN); begin T := Self.PREPARED; end; -(*----------------------------------------------------------------------------*) +procedure RIRegister_TIBDATASET(CL: TPSRuntimeClassImporter); +begin + with CL.Add(TIBDATASET) do + begin + RegisterMethod(@TIBDATASET.PREPARE, 'Prepare'); + RegisterMethod(@TIBDATASET.UNPREPARE, 'UnPrepare'); + RegisterMethod(@TIBDATASET.BATCHINPUT, 'BatchInput'); + RegisterMethod(@TIBDATASET.BATCHOUTPUT, 'BatchOutput'); + RegisterMethod(@TIBDATASET.EXECSQL, 'ExecSQL'); + RegisterMethod(@TIBDATASET.PARAMBYNAME, 'ParamByName'); + RegisterPropertyHelper(@TIBDATASETPREPARED_R,nil,'Prepared'); + end; +end; + +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TIBCUSTOMDATASET'}{$ENDIF} +{$IFDEF class_helper_present} +type + TIBCUSTOMDATASET_PSHelper = class helper for TIBCUSTOMDATASET + public + procedure FORCEDREFRESH_W(const T: BOOLEAN); + procedure FORCEDREFRESH_R(var T: BOOLEAN); + procedure TRANSACTION_W(const T: TIBTRANSACTION); + procedure TRANSACTION_R(var T: TIBTRANSACTION); + procedure DATABASE_W(const T: TIBDATABASE); + procedure DATABASE_R(var T: TIBDATABASE); + procedure PLAN_R(var T: STRING); + procedure ROWSAFFECTED_R(var T: INTEGER); + procedure UPDATERECORDTYPES_W(const T: TIBUPDATERECORDTYPES); + procedure UPDATERECORDTYPES_R(var T: TIBUPDATERECORDTYPES); + procedure UPDATESPENDING_R(var T: BOOLEAN); + procedure UPDATEOBJECT_W(const T: TIBDATASETUPDATEOBJECT); + procedure UPDATEOBJECT_R(var T: TIBDATASETUPDATEOBJECT); + procedure TRHANDLE_R(var T: PISC_TR_HANDLE); + procedure DBHANDLE_R(var T: PISC_DB_HANDLE); + end; + +procedure TIBCUSTOMDATASET_PSHelper.FORCEDREFRESH_W(const T: BOOLEAN); +begin Self.FORCEDREFRESH := T; end; + + +procedure TIBCUSTOMDATASET_PSHelper.FORCEDREFRESH_R(var T: BOOLEAN); +begin T := Self.FORCEDREFRESH; end; + + +procedure TIBCUSTOMDATASET_PSHelper.TRANSACTION_W(const T: TIBTRANSACTION); +begin Self.TRANSACTION := T; end; + + +procedure TIBCUSTOMDATASET_PSHelper.TRANSACTION_R(var T: TIBTRANSACTION); +begin T := Self.TRANSACTION; end; + + +procedure TIBCUSTOMDATASET_PSHelper.DATABASE_W(const T: TIBDATABASE); +begin Self.DATABASE := T; end; + + +procedure TIBCUSTOMDATASET_PSHelper.DATABASE_R(var T: TIBDATABASE); +begin T := Self.DATABASE; end; + + +procedure TIBCUSTOMDATASET_PSHelper.PLAN_R(var T: STRING); +begin T := Self.PLAN; end; + + +procedure TIBCUSTOMDATASET_PSHelper.ROWSAFFECTED_R(var T: INTEGER); +begin T := Self.ROWSAFFECTED; end; + + +procedure TIBCUSTOMDATASET_PSHelper.UPDATERECORDTYPES_W(const T: TIBUPDATERECORDTYPES); +begin Self.UPDATERECORDTYPES := T; end; + + +procedure TIBCUSTOMDATASET_PSHelper.UPDATERECORDTYPES_R(var T: TIBUPDATERECORDTYPES); +begin T := Self.UPDATERECORDTYPES; end; + + +procedure TIBCUSTOMDATASET_PSHelper.UPDATESPENDING_R(var T: BOOLEAN); +begin T := Self.UPDATESPENDING; end; + + +procedure TIBCUSTOMDATASET_PSHelper.UPDATEOBJECT_W(const T: TIBDATASETUPDATEOBJECT); +begin Self.UPDATEOBJECT := T; end; + + +procedure TIBCUSTOMDATASET_PSHelper.UPDATEOBJECT_R(var T: TIBDATASETUPDATEOBJECT); +begin T := Self.UPDATEOBJECT; end; + + +procedure TIBCUSTOMDATASET_PSHelper.TRHANDLE_R(var T: PISC_TR_HANDLE); +begin T := Self.TRHANDLE; end; + + +procedure TIBCUSTOMDATASET_PSHelper.DBHANDLE_R(var T: PISC_DB_HANDLE); +begin T := Self.DBHANDLE; end; + +procedure RIRegister_TIBCUSTOMDATASET(CL: TPSRuntimeClassImporter); +begin + with CL.Add(TIBCUSTOMDATASET) do + begin + RegisterMethod(@TIBCUSTOMDATASET.APPLYUPDATES, 'ApplyUpdates'); + RegisterMethod(@TIBCUSTOMDATASET.CACHEDUPDATESTATUS, 'CachedUpdateStatus'); + RegisterMethod(@TIBCUSTOMDATASET.CANCELUPDATES, 'CancelUpdates'); + RegisterMethod(@TIBCUSTOMDATASET.FETCHALL, 'FetchAll'); + RegisterMethod(@TIBCUSTOMDATASET.LOCATENEXT, 'LocateNext'); +// RegisterMethod(@TIBCUSTOMDATASET.LOCATE, 'Locate'); + RegisterMethod(@TIBCUSTOMDATASET.RECORDMODIFIED, 'RecordModified'); + RegisterMethod(@TIBCUSTOMDATASET.REVERTRECORD, 'RevertRecord'); + RegisterMethod(@TIBCUSTOMDATASET.UNDELETE, 'Undelete'); + RegisterMethod(@TIBCUSTOMDATASET.CURRENT, 'Current'); + RegisterMethod(@TIBCUSTOMDATASET.SQLTYPE, 'SqlType'); + RegisterPropertyHelper(@TIBCUSTOMDATASET.DBHANDLE_R,nil,'DBHandle'); + RegisterPropertyHelper(@TIBCUSTOMDATASET.TRHANDLE_R,nil,'TRHandle'); + RegisterPropertyHelper(@TIBCUSTOMDATASET.UPDATEOBJECT_R,@TIBCUSTOMDATASET.UPDATEOBJECT_W,'UpdateObject'); + RegisterPropertyHelper(@TIBCUSTOMDATASET.UPDATESPENDING_R,nil,'UpdatesPending'); + RegisterPropertyHelper(@TIBCUSTOMDATASET.UPDATERECORDTYPES_R,@TIBCUSTOMDATASET.UPDATERECORDTYPES_W,'UpdateRecordTypes'); + RegisterPropertyHelper(@TIBCUSTOMDATASET.ROWSAFFECTED_R,nil,'RowsAffected'); + RegisterPropertyHelper(@TIBCUSTOMDATASET.PLAN_R,nil,'Plan'); + RegisterPropertyHelper(@TIBCUSTOMDATASET.DATABASE_R,@TIBCUSTOMDATASET.DATABASE_W,'Database'); + RegisterPropertyHelper(@TIBCUSTOMDATASET.TRANSACTION_R,@TIBCUSTOMDATASET.TRANSACTION_W,'Transaction'); + RegisterPropertyHelper(@TIBCUSTOMDATASET.FORCEDREFRESH_R,@TIBCUSTOMDATASET.FORCEDREFRESH_W,'ForcedRefresh'); + end; +end; + +{$ELSE} procedure TIBCUSTOMDATASETFORCEDREFRESH_W(Self: TIBCUSTOMDATASET; const T: BOOLEAN); begin Self.FORCEDREFRESH := T; end; @@ -688,8 +1468,98 @@ begin T := Self.TRHANDLE; end; (*----------------------------------------------------------------------------*) procedure TIBCUSTOMDATASETDBHANDLE_R(Self: TIBCUSTOMDATASET; var T: PISC_DB_HANDLE); begin T := Self.DBHANDLE; end; +procedure RIRegister_TIBCUSTOMDATASET(CL: TPSRuntimeClassImporter); +begin + with CL.Add(TIBCUSTOMDATASET) do + begin + RegisterMethod(@TIBCUSTOMDATASET.APPLYUPDATES, 'ApplyUpdates'); + RegisterMethod(@TIBCUSTOMDATASET.CACHEDUPDATESTATUS, 'CachedUpdateStatus'); + RegisterMethod(@TIBCUSTOMDATASET.CANCELUPDATES, 'CancelUpdates'); + RegisterMethod(@TIBCUSTOMDATASET.FETCHALL, 'FetchAll'); + RegisterMethod(@TIBCUSTOMDATASET.LOCATENEXT, 'LocateNext'); +// RegisterMethod(@TIBCUSTOMDATASET.LOCATE, 'Locate'); + RegisterMethod(@TIBCUSTOMDATASET.RECORDMODIFIED, 'RecordModified'); + RegisterMethod(@TIBCUSTOMDATASET.REVERTRECORD, 'RevertRecord'); + RegisterMethod(@TIBCUSTOMDATASET.UNDELETE, 'Undelete'); + RegisterMethod(@TIBCUSTOMDATASET.CURRENT, 'Current'); + RegisterMethod(@TIBCUSTOMDATASET.SQLTYPE, 'SqlType'); + RegisterPropertyHelper(@TIBCUSTOMDATASETDBHANDLE_R,nil,'DBHandle'); + RegisterPropertyHelper(@TIBCUSTOMDATASETTRHANDLE_R,nil,'TRHandle'); + RegisterPropertyHelper(@TIBCUSTOMDATASETUPDATEOBJECT_R,@TIBCUSTOMDATASETUPDATEOBJECT_W,'UpdateObject'); + RegisterPropertyHelper(@TIBCUSTOMDATASETUPDATESPENDING_R,nil,'UpdatesPending'); + RegisterPropertyHelper(@TIBCUSTOMDATASETUPDATERECORDTYPES_R,@TIBCUSTOMDATASETUPDATERECORDTYPES_W,'UpdateRecordTypes'); + RegisterPropertyHelper(@TIBCUSTOMDATASETROWSAFFECTED_R,nil,'RowsAffected'); + RegisterPropertyHelper(@TIBCUSTOMDATASETPLAN_R,nil,'Plan'); + RegisterPropertyHelper(@TIBCUSTOMDATASETDATABASE_R,@TIBCUSTOMDATASETDATABASE_W,'Database'); + RegisterPropertyHelper(@TIBCUSTOMDATASETTRANSACTION_R,@TIBCUSTOMDATASETTRANSACTION_W,'Transaction'); + RegisterPropertyHelper(@TIBCUSTOMDATASETFORCEDREFRESH_R,@TIBCUSTOMDATASETFORCEDREFRESH_W,'ForcedRefresh'); + end; +end; -(*----------------------------------------------------------------------------*) +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TIBGENERATORFIELD'}{$ENDIF} +{$IFDEF class_helper_present} +type + TIBGENERATORFIELD_PSHelper = class helper for TIBGENERATORFIELD + public + procedure APPLYEVENT_W(const T: TIBGENERATORAPPLYEVENT); + procedure APPLYEVENT_R(var T: TIBGENERATORAPPLYEVENT); + procedure INCREMENTBY_W(const T: INTEGER); + procedure INCREMENTBY_R(var T: INTEGER); + procedure GENERATOR_W(const T: STRING); + procedure GENERATOR_R(var T: STRING); + procedure FIELD_W(const T: STRING); + procedure FIELD_R(var T: STRING); + end; + +procedure TIBGENERATORFIELD_PSHelper.APPLYEVENT_W(const T: TIBGENERATORAPPLYEVENT); +begin Self.APPLYEVENT := T; end; + + +procedure TIBGENERATORFIELD_PSHelper.APPLYEVENT_R(var T: TIBGENERATORAPPLYEVENT); +begin T := Self.APPLYEVENT; end; + + +procedure TIBGENERATORFIELD_PSHelper.INCREMENTBY_W(const T: INTEGER); +begin Self.INCREMENTBY := T; end; + + +procedure TIBGENERATORFIELD_PSHelper.INCREMENTBY_R(var T: INTEGER); +begin T := Self.INCREMENTBY; end; + + +procedure TIBGENERATORFIELD_PSHelper.GENERATOR_W(const T: STRING); +begin Self.GENERATOR := T; end; + + +procedure TIBGENERATORFIELD_PSHelper.GENERATOR_R(var T: STRING); +begin T := Self.GENERATOR; end; + + +procedure TIBGENERATORFIELD_PSHelper.FIELD_W(const T: STRING); +begin Self.FIELD := T; end; + + +procedure TIBGENERATORFIELD_PSHelper.FIELD_R(var T: STRING); +begin T := Self.FIELD; end; + +procedure RIRegister_TIBGENERATORFIELD(CL: TPSRuntimeClassImporter); +begin + with CL.Add(TIBGENERATORFIELD) do + begin + RegisterConstructor(@TIBGENERATORFIELD.CREATE, 'Create'); + RegisterMethod(@TIBGENERATORFIELD.VALUENAME, 'ValueName'); + RegisterMethod(@TIBGENERATORFIELD.APPLY, 'Apply'); + RegisterPropertyHelper(@TIBGENERATORFIELDFIELD_R,@TIBGENERATORFIELDFIELD_W,'Field'); + RegisterPropertyHelper(@TIBGENERATORFIELDGENERATOR_R,@TIBGENERATORFIELDGENERATOR_W,'Generator'); + RegisterPropertyHelper(@TIBGENERATORFIELDINCREMENTBY_R,@TIBGENERATORFIELDINCREMENTBY_W,'IncrementBy'); + RegisterPropertyHelper(@TIBGENERATORFIELDAPPLYEVENT_R,@TIBGENERATORFIELDAPPLYEVENT_W,'ApplyEvent'); + end; +end; + +{$ELSE} procedure TIBGENERATORFIELDAPPLYEVENT_W(Self: TIBGENERATORFIELD; const T: TIBGENERATORAPPLYEVENT); begin Self.APPLYEVENT := T; end; @@ -720,60 +1590,6 @@ begin Self.FIELD := T; end; (*----------------------------------------------------------------------------*) procedure TIBGENERATORFIELDFIELD_R(Self: TIBGENERATORFIELD; var T: STRING); begin T := Self.FIELD; end; - -(*----------------------------------------------------------------------------*) -procedure TIBDATASETUPDATEOBJECTREFRESHSQL_W(Self: TIBDATASETUPDATEOBJECT; const T: TSTRINGS); -begin Self.REFRESHSQL := T; end; - -(*----------------------------------------------------------------------------*) -procedure TIBDATASETUPDATEOBJECTREFRESHSQL_R(Self: TIBDATASETUPDATEOBJECT; var T: TSTRINGS); -begin T := Self.REFRESHSQL; end; - -(*----------------------------------------------------------------------------*) -procedure RIRegister_TIBDATASET(CL: TPSRuntimeClassImporter); -begin - with CL.Add(TIBDATASET) do - begin - RegisterMethod(@TIBDATASET.PREPARE, 'Prepare'); - RegisterMethod(@TIBDATASET.UNPREPARE, 'UnPrepare'); - RegisterMethod(@TIBDATASET.BATCHINPUT, 'BatchInput'); - RegisterMethod(@TIBDATASET.BATCHOUTPUT, 'BatchOutput'); - RegisterMethod(@TIBDATASET.EXECSQL, 'ExecSQL'); - RegisterMethod(@TIBDATASET.PARAMBYNAME, 'ParamByName'); - RegisterPropertyHelper(@TIBDATASETPREPARED_R,nil,'Prepared'); - end; -end; - -(*----------------------------------------------------------------------------*) -procedure RIRegister_TIBCUSTOMDATASET(CL: TPSRuntimeClassImporter); -begin - with CL.Add(TIBCUSTOMDATASET) do - begin - RegisterMethod(@TIBCUSTOMDATASET.APPLYUPDATES, 'ApplyUpdates'); - RegisterMethod(@TIBCUSTOMDATASET.CACHEDUPDATESTATUS, 'CachedUpdateStatus'); - RegisterMethod(@TIBCUSTOMDATASET.CANCELUPDATES, 'CancelUpdates'); - RegisterMethod(@TIBCUSTOMDATASET.FETCHALL, 'FetchAll'); - RegisterMethod(@TIBCUSTOMDATASET.LOCATENEXT, 'LocateNext'); -// RegisterMethod(@TIBCUSTOMDATASET.LOCATE, 'Locate'); - RegisterMethod(@TIBCUSTOMDATASET.RECORDMODIFIED, 'RecordModified'); - RegisterMethod(@TIBCUSTOMDATASET.REVERTRECORD, 'RevertRecord'); - RegisterMethod(@TIBCUSTOMDATASET.UNDELETE, 'Undelete'); - RegisterMethod(@TIBCUSTOMDATASET.CURRENT, 'Current'); - RegisterMethod(@TIBCUSTOMDATASET.SQLTYPE, 'SqlType'); - RegisterPropertyHelper(@TIBCUSTOMDATASETDBHANDLE_R,nil,'DBHandle'); - RegisterPropertyHelper(@TIBCUSTOMDATASETTRHANDLE_R,nil,'TRHandle'); - RegisterPropertyHelper(@TIBCUSTOMDATASETUPDATEOBJECT_R,@TIBCUSTOMDATASETUPDATEOBJECT_W,'UpdateObject'); - RegisterPropertyHelper(@TIBCUSTOMDATASETUPDATESPENDING_R,nil,'UpdatesPending'); - RegisterPropertyHelper(@TIBCUSTOMDATASETUPDATERECORDTYPES_R,@TIBCUSTOMDATASETUPDATERECORDTYPES_W,'UpdateRecordTypes'); - RegisterPropertyHelper(@TIBCUSTOMDATASETROWSAFFECTED_R,nil,'RowsAffected'); - RegisterPropertyHelper(@TIBCUSTOMDATASETPLAN_R,nil,'Plan'); - RegisterPropertyHelper(@TIBCUSTOMDATASETDATABASE_R,@TIBCUSTOMDATASETDATABASE_W,'Database'); - RegisterPropertyHelper(@TIBCUSTOMDATASETTRANSACTION_R,@TIBCUSTOMDATASETTRANSACTION_W,'Transaction'); - RegisterPropertyHelper(@TIBCUSTOMDATASETFORCEDREFRESH_R,@TIBCUSTOMDATASETFORCEDREFRESH_W,'ForcedRefresh'); - end; -end; - -(*----------------------------------------------------------------------------*) procedure RIRegister_TIBGENERATORFIELD(CL: TPSRuntimeClassImporter); begin with CL.Add(TIBGENERATORFIELD) do @@ -788,6 +1604,53 @@ begin end; end; +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TIBDATASETUPDATEOBJECT'}{$ENDIF} +{$IFDEF class_helper_present} +type + TIBDATASETUPDATEOBJECT_PSHelper = class helper for TIBDATASETUPDATEOBJECT + public + procedure REFRESHSQL_W(const T: TSTRINGS); + procedure REFRESHSQL_R(var T: TSTRINGS); + end; + +procedure TIBDATASETUPDATEOBJECT_PSHelper.REFRESHSQL_W(const T: TSTRINGS); +begin Self.REFRESHSQL := T; end; + +procedure TIBDATASETUPDATEOBJECT_PSHelper.REFRESHSQL_R(var T: TSTRINGS); +begin T := Self.REFRESHSQL; end; + +procedure RIRegister_TIBDATASETUPDATEOBJECT(CL: TPSRuntimeClassImporter); +begin + with CL.Add(TIBDATASETUPDATEOBJECT) do + begin + RegisterPropertyHelper(@TIBDATASETUPDATEOBJECT.REFRESHSQL_R,@TIBDATASETUPDATEOBJECT.REFRESHSQL_W,'RefreshSQL'); + end; +end; + +{$ELSE} +procedure TIBDATASETUPDATEOBJECTREFRESHSQL_W(Self: TIBDATASETUPDATEOBJECT; const T: TSTRINGS); +begin Self.REFRESHSQL := T; end; + +(*----------------------------------------------------------------------------*) +procedure TIBDATASETUPDATEOBJECTREFRESHSQL_R(Self: TIBDATASETUPDATEOBJECT; var T: TSTRINGS); +begin T := Self.REFRESHSQL; end; + +procedure RIRegister_TIBDATASETUPDATEOBJECT(CL: TPSRuntimeClassImporter); +begin + with CL.Add(TIBDATASETUPDATEOBJECT) do + begin + RegisterPropertyHelper(@TIBDATASETUPDATEOBJECTREFRESHSQL_R,@TIBDATASETUPDATEOBJECTREFRESHSQL_W,'RefreshSQL'); + end; +end; + +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +(* === run-time registration functions === *) + (*----------------------------------------------------------------------------*) procedure RIRegister_TIBDATALINK(CL: TPSRuntimeClassImporter); begin @@ -815,13 +1678,6 @@ begin end; (*----------------------------------------------------------------------------*) -procedure RIRegister_TIBDATASETUPDATEOBJECT(CL: TPSRuntimeClassImporter); -begin - with CL.Add(TIBDATASETUPDATEOBJECT) do - begin - RegisterPropertyHelper(@TIBDATASETUPDATEOBJECTREFRESHSQL_R,@TIBDATASETUPDATEOBJECTREFRESHSQL_W,'RefreshSQL'); - end; -end; (*----------------------------------------------------------------------------*) procedure RIRegister_IBCustomDataSet(CL: TPSRuntimeClassImporter); @@ -837,122 +1693,6 @@ begin RIRegister_TIBDATASET(CL); end; -(*----------------------------------------------------------------------------*) -procedure RIRegister_TIBBASE(CL: TPSRuntimeClassImporter); -begin - with CL.Add(TIBBASE) do - begin - RegisterConstructor(@TIBBASE.CREATE, 'Create'); - RegisterVirtualMethod(@TIBBASE.CHECKDATABASE, 'CheckDatabase'); - RegisterVirtualMethod(@TIBBASE.CHECKTRANSACTION, 'CheckTransaction'); - RegisterPropertyHelper(@TIBBASEBEFOREDATABASEDISCONNECT_R,@TIBBASEBEFOREDATABASEDISCONNECT_W,'BeforeDatabaseDisconnect'); - RegisterPropertyHelper(@TIBBASEAFTERDATABASEDISCONNECT_R,@TIBBASEAFTERDATABASEDISCONNECT_W,'AfterDatabaseDisconnect'); - RegisterEventPropertyHelper(@TIBBASEONDATABASEFREE_R,@TIBBASEONDATABASEFREE_W,'OnDatabaseFree'); - RegisterPropertyHelper(@TIBBASEBEFORETRANSACTIONEND_R,@TIBBASEBEFORETRANSACTIONEND_W,'BeforeTransactionEnd'); - RegisterPropertyHelper(@TIBBASEAFTERTRANSACTIONEND_R,@TIBBASEAFTERTRANSACTIONEND_W,'AfterTransactionEnd'); - RegisterEventPropertyHelper(@TIBBASEONTRANSACTIONFREE_R,@TIBBASEONTRANSACTIONFREE_W,'OnTransactionFree'); - RegisterPropertyHelper(@TIBBASEDATABASE_R,@TIBBASEDATABASE_W,'Database'); - RegisterPropertyHelper(@TIBBASEDBHANDLE_R,nil,'DBHandle'); - RegisterPropertyHelper(@TIBBASEOWNER_R,nil,'Owner'); - RegisterPropertyHelper(@TIBBASETRHANDLE_R,nil,'TRHandle'); - RegisterPropertyHelper(@TIBBASETRANSACTION_R,@TIBBASETRANSACTION_W,'Transaction'); - end; -end; - -(*----------------------------------------------------------------------------*) -procedure RIRegister_TIBTRANSACTION(CL: TPSRuntimeClassImporter); -begin - with CL.Add(TIBTRANSACTION) do - begin - RegisterMethod(@TIBTRANSACTION.CALL, 'Call'); - RegisterMethod(@TIBTRANSACTION.COMMIT, 'Commit'); - RegisterMethod(@TIBTRANSACTION.COMMITRETAINING, 'CommitRetaining'); - RegisterMethod(@TIBTRANSACTION.ROLLBACK, 'Rollback'); - RegisterMethod(@TIBTRANSACTION.ROLLBACKRETAINING, 'RollbackRetaining'); - RegisterMethod(@TIBTRANSACTION.STARTTRANSACTION, 'StartTransaction'); - RegisterMethod(@TIBTRANSACTION.CHECKINTRANSACTION, 'CheckInTransaction'); - RegisterMethod(@TIBTRANSACTION.CHECKNOTINTRANSACTION, 'CheckNotInTransaction'); - RegisterMethod(@TIBTRANSACTION.CHECKAUTOSTOP, 'CheckAutoStop'); - RegisterMethod(@TIBTRANSACTION.ADDDATABASE, 'AddDatabase'); - RegisterMethod(@TIBTRANSACTION.FINDDATABASE, 'FindDatabase'); - RegisterMethod(@TIBTRANSACTION.FINDDEFAULTDATABASE, 'FindDefaultDatabase'); - RegisterMethod(@TIBTRANSACTION.REMOVEDATABASE, 'RemoveDatabase'); - RegisterMethod(@TIBTRANSACTION.REMOVEDATABASES, 'RemoveDatabases'); - RegisterMethod(@TIBTRANSACTION.CHECKDATABASESINLIST, 'CheckDatabasesInList'); - RegisterPropertyHelper(@TIBTRANSACTIONDATABASECOUNT_R,nil,'DatabaseCount'); - RegisterPropertyHelper(@TIBTRANSACTIONDATABASES_R,nil,'Databases'); - RegisterPropertyHelper(@TIBTRANSACTIONSQLOBJECTCOUNT_R,nil,'SQLObjectCount'); - RegisterPropertyHelper(@TIBTRANSACTIONSQLOBJECTS_R,nil,'SQLObjects'); - RegisterPropertyHelper(@TIBTRANSACTIONHANDLE_R,nil,'Handle'); - RegisterPropertyHelper(@TIBTRANSACTIONHANDLEISSHARED_R,nil,'HandleIsShared'); - RegisterPropertyHelper(@TIBTRANSACTIONINTRANSACTION_R,nil,'InTransaction'); - RegisterPropertyHelper(@TIBTRANSACTIONTPB_R,nil,'TPB'); - RegisterPropertyHelper(@TIBTRANSACTIONTPBLENGTH_R,nil,'TPBLength'); - RegisterPropertyHelper(@TIBTRANSACTIONACTIVE_R,@TIBTRANSACTIONACTIVE_W,'Active'); - RegisterPropertyHelper(@TIBTRANSACTIONDEFAULTDATABASE_R,@TIBTRANSACTIONDEFAULTDATABASE_W,'DefaultDatabase'); - RegisterPropertyHelper(@TIBTRANSACTIONIDLETIMER_R,@TIBTRANSACTIONIDLETIMER_W,'IdleTimer'); - RegisterPropertyHelper(@TIBTRANSACTIONDEFAULTACTION_R,@TIBTRANSACTIONDEFAULTACTION_W,'DefaultAction'); - RegisterPropertyHelper(@TIBTRANSACTIONPARAMS_R,@TIBTRANSACTIONPARAMS_W,'Params'); - RegisterPropertyHelper(@TIBTRANSACTIONAUTOSTOPACTION_R,@TIBTRANSACTIONAUTOSTOPACTION_W,'AutoStopAction'); - RegisterEventPropertyHelper(@TIBTRANSACTIONONIDLETIMER_R,@TIBTRANSACTIONONIDLETIMER_W,'OnIdleTimer'); - end; -end; - -(*----------------------------------------------------------------------------*) -procedure RIRegister_TIBDATABASE(CL: TPSRuntimeClassImporter); -begin - with CL.Add(TIBDATABASE) do - begin - RegisterMethod(@TIBDATABASE.ADDEVENTNOTIFIER, 'AddEventNotifier'); - RegisterMethod(@TIBDATABASE.REMOVEEVENTNOTIFIER, 'RemoveEventNotifier'); - RegisterMethod(@TIBDATABASE.APPLYUPDATES, 'ApplyUpdates'); - RegisterMethod(@TIBDATABASE.CLOSEDATASETS, 'CloseDataSets'); - RegisterMethod(@TIBDATABASE.CHECKACTIVE, 'CheckActive'); - RegisterMethod(@TIBDATABASE.CHECKINACTIVE, 'CheckInactive'); - RegisterMethod(@TIBDATABASE.CREATEDATABASE, 'CreateDatabase'); - RegisterMethod(@TIBDATABASE.DROPDATABASE, 'DropDatabase'); - RegisterMethod(@TIBDATABASE.FORCECLOSE, 'ForceClose'); - RegisterMethod(@TIBDATABASE.GETFIELDNAMES, 'GetFieldNames'); - RegisterMethod(@TIBDATABASE.GETTABLENAMES, 'GetTableNames'); - RegisterMethod(@TIBDATABASE.INDEXOFDBCONST, 'IndexOfDBConst'); - RegisterMethod(@TIBDATABASE.TESTCONNECTED, 'TestConnected'); - RegisterMethod(@TIBDATABASE.CHECKDATABASENAME, 'CheckDatabaseName'); - RegisterMethod(@TIBDATABASE.CALL, 'Call'); - RegisterMethod(@TIBDATABASE.Open, 'Open'); - RegisterMethod(@TIBDATABASE.Close, 'Close'); - RegisterMethod(@TIBDATABASE.ADDTRANSACTION, 'AddTransaction'); - RegisterMethod(@TIBDATABASE.FINDTRANSACTION, 'FindTransaction'); - RegisterMethod(@TIBDATABASE.FINDDEFAULTTRANSACTION, 'FindDefaultTransaction'); - RegisterMethod(@TIBDATABASE.REMOVETRANSACTION, 'RemoveTransaction'); - RegisterMethod(@TIBDATABASE.REMOVETRANSACTIONS, 'RemoveTransactions'); - RegisterMethod(@TIBDATABASE.SETHANDLE, 'SetHandle'); - RegisterPropertyHelper(@TIBDATABASEHANDLE_R,nil,'Handle'); - RegisterPropertyHelper(@TIBDATABASEISREADONLY_R,nil,'IsReadOnly'); - RegisterPropertyHelper(@TIBDATABASEDBPARAMBYDPB_R,@TIBDATABASEDBPARAMBYDPB_W,'DBParamByDPB'); - RegisterPropertyHelper(@TIBDATABASESQLOBJECTCOUNT_R,nil,'SQLObjectCount'); - RegisterPropertyHelper(@TIBDATABASESQLOBJECTS_R,nil,'SQLObjects'); - RegisterPropertyHelper(@TIBDATABASEHANDLEISSHARED_R,nil,'HandleIsShared'); - RegisterPropertyHelper(@TIBDATABASETRANSACTIONCOUNT_R,nil,'TransactionCount'); - RegisterPropertyHelper(@TIBDATABASETRANSACTIONS_R,nil,'Transactions'); - RegisterPropertyHelper(@TIBDATABASEINTERNALTRANSACTION_R,nil,'InternalTransaction'); - RegisterMethod(@TIBDATABASE.HAS_DEFAULT_VALUE, 'Has_DEFAULT_VALUE'); - RegisterMethod(@TIBDATABASE.HAS_COMPUTED_BLR, 'Has_COMPUTED_BLR'); - RegisterMethod(@TIBDATABASE.FLUSHSCHEMA, 'FlushSchema'); - RegisterPropertyHelper(@TIBDATABASEDATABASENAME_R,@TIBDATABASEDATABASENAME_W,'DatabaseName'); - RegisterPropertyHelper(@TIBDATABASECONNECTED_R,@TIBDATABASECONNECTED_W,'Connected'); - RegisterPropertyHelper(@TIBDATABASEPARAMS_R,@TIBDATABASEPARAMS_W,'Params'); - RegisterPropertyHelper(@TIBDATABASEDEFAULTTRANSACTION_R,@TIBDATABASEDEFAULTTRANSACTION_W,'DefaultTransaction'); - RegisterPropertyHelper(@TIBDATABASEIDLETIMER_R,@TIBDATABASEIDLETIMER_W,'IdleTimer'); - RegisterPropertyHelper(@TIBDATABASESQLDIALECT_R,@TIBDATABASESQLDIALECT_W,'SQLDialect'); - RegisterPropertyHelper(@TIBDATABASEDBSQLDIALECT_R,nil,'DBSQLDialect'); - RegisterPropertyHelper(@TIBDATABASETRACEFLAGS_R,@TIBDATABASETRACEFLAGS_W,'TraceFlags'); - RegisterPropertyHelper(@TIBDATABASEALLOWSTREAMEDCONNECTED_R,@TIBDATABASEALLOWSTREAMEDCONNECTED_W,'AllowStreamedConnected'); - RegisterEventPropertyHelper(@TIBDATABASEONLOGIN_R,@TIBDATABASEONLOGIN_W,'OnLogin'); - RegisterEventPropertyHelper(@TIBDATABASEONIDLETIMER_R,@TIBDATABASEONIDLETIMER_W,'OnIdleTimer'); - RegisterEventPropertyHelper(@TIBDATABASEONDIALECTDOWNGRADEWARNING_R,@TIBDATABASEONDIALECTDOWNGRADEWARNING_W,'OnDialectDowngradeWarning'); - end; -end; - (*----------------------------------------------------------------------------*) procedure RIRegister_IBDatabase(CL: TPSRuntimeClassImporter); begin @@ -1006,8 +1746,173 @@ begin SIRegister_TIBTABLE(CL); end; -(* === run-time registration functions === *) -(*----------------------------------------------------------------------------*) +{$IFDEF DELPHI10UP}{$REGION 'TIBTABLE'}{$ENDIF} +{$IFDEF class_helper_present} +type + TIBTABLE_PSHelper = class helper for TIBTABLE + public + procedure TABLETYPES_W(const T: TIBTABLETYPES); + procedure TABLETYPES_R(var T: TIBTABLETYPES); + procedure TABLENAME_W(const T: STRING); + procedure TABLENAME_R(var T: STRING); + procedure STOREDEFS_W(const T: BOOLEAN); + procedure STOREDEFS_R(var T: BOOLEAN); + procedure READONLY_W(const T: BOOLEAN); + procedure READONLY_R(var T: BOOLEAN); + procedure MASTERSOURCE_W(const T: TDATASOURCE); + procedure MASTERSOURCE_R(var T: TDATASOURCE); + procedure MASTERFIELDS_W(const T: STRING); + procedure MASTERFIELDS_R(var T: STRING); + procedure INDEXNAME_W(const T: STRING); + procedure INDEXNAME_R(var T: STRING); + procedure INDEXFIELDNAMES_W(const T: STRING); + procedure INDEXFIELDNAMES_R(var T: STRING); + procedure INDEXDEFS_W(const T: TINDEXDEFS); + procedure INDEXDEFS_R(var T: TINDEXDEFS); + procedure DEFAULTINDEX_W(const T: BOOLEAN); + procedure DEFAULTINDEX_R(var T: BOOLEAN); + procedure TABLENAMES_R(var T: TSTRINGS); + procedure INDEXFIELDS_W(const T: TFIELD; const t1: INTEGER); + procedure INDEXFIELDS_R(var T: TFIELD; const t1: INTEGER); + procedure INDEXFIELDCOUNT_R(var T: INTEGER); + procedure EXISTS_R(var T: BOOLEAN); + procedure CURRENTDBKEY_R(var T: TIBDBKEY); + end; + +procedure TIBTABLE_PSHelper.TABLETYPES_W(const T: TIBTABLETYPES); +begin Self.TABLETYPES := T; end; + + +procedure TIBTABLE_PSHelper.TABLETYPES_R(var T: TIBTABLETYPES); +begin T := Self.TABLETYPES; end; + + +procedure TIBTABLE_PSHelper.TABLENAME_W(const T: STRING); +begin Self.TABLENAME := T; end; + + +procedure TIBTABLE_PSHelper.TABLENAME_R(var T: STRING); +begin T := Self.TABLENAME; end; + + +procedure TIBTABLE_PSHelper.STOREDEFS_W(const T: BOOLEAN); +begin Self.STOREDEFS := T; end; + + +procedure TIBTABLE_PSHelper.STOREDEFS_R(var T: BOOLEAN); +begin T := Self.STOREDEFS; end; + + +procedure TIBTABLE_PSHelper.READONLY_W(const T: BOOLEAN); +begin Self.READONLY := T; end; + + +procedure TIBTABLE_PSHelper.READONLY_R(var T: BOOLEAN); +begin T := Self.READONLY; end; + + +procedure TIBTABLE_PSHelper.MASTERSOURCE_W(const T: TDATASOURCE); +begin Self.MASTERSOURCE := T; end; + + +procedure TIBTABLE_PSHelper.MASTERSOURCE_R(var T: TDATASOURCE); +begin T := Self.MASTERSOURCE; end; + + +procedure TIBTABLE_PSHelper.MASTERFIELDS_W(const T: STRING); +begin Self.MASTERFIELDS := T; end; + + +procedure TIBTABLE_PSHelper.MASTERFIELDS_R(var T: STRING); +begin T := Self.MASTERFIELDS; end; + + +procedure TIBTABLE_PSHelper.INDEXNAME_W(const T: STRING); +begin Self.INDEXNAME := T; end; + + +procedure TIBTABLE_PSHelper.INDEXNAME_R(var T: STRING); +begin T := Self.INDEXNAME; end; + + +procedure TIBTABLE_PSHelper.INDEXFIELDNAMES_W(const T: STRING); +begin Self.INDEXFIELDNAMES := T; end; + + +procedure TIBTABLE_PSHelper.INDEXFIELDNAMES_R(var T: STRING); +begin T := Self.INDEXFIELDNAMES; end; + + +procedure TIBTABLE_PSHelper.INDEXDEFS_W(const T: TINDEXDEFS); +begin Self.INDEXDEFS := T; end; + + +procedure TIBTABLE_PSHelper.INDEXDEFS_R(var T: TINDEXDEFS); +begin T := Self.INDEXDEFS; end; + + +procedure TIBTABLE_PSHelper.DEFAULTINDEX_W(const T: BOOLEAN); +begin Self.DEFAULTINDEX := T; end; + + +procedure TIBTABLE_PSHelper.DEFAULTINDEX_R(var T: BOOLEAN); +begin T := Self.DEFAULTINDEX; end; + + +procedure TIBTABLE_PSHelper.TABLENAMES_R(var T: TSTRINGS); +begin T := Self.TABLENAMES; end; + + +procedure TIBTABLE_PSHelper.INDEXFIELDS_W(const T: TFIELD; const t1: INTEGER); +begin Self.INDEXFIELDS[t1] := T; end; + + +procedure TIBTABLE_PSHelper.INDEXFIELDS_R(var T: TFIELD; const t1: INTEGER); +begin T := Self.INDEXFIELDS[t1]; end; + + +procedure TIBTABLE_PSHelper.INDEXFIELDCOUNT_R(var T: INTEGER); +begin T := Self.INDEXFIELDCOUNT; end; + + +procedure TIBTABLE_PSHelper.EXISTS_R(var T: BOOLEAN); +begin T := Self.EXISTS; end; + + +procedure TIBTABLE_PSHelper.CURRENTDBKEY_R(var T: TIBDBKEY); +begin T := Self.CURRENTDBKEY; end; + + +procedure RIRegister_TIBTABLE(CL: TPSRuntimeClassImporter); +begin + with CL.Add(TIBTABLE) do + begin + RegisterMethod(@TIBTABLE.ADDINDEX, 'AddIndex'); + RegisterMethod(@TIBTABLE.CREATETABLE, 'CreateTable'); + RegisterMethod(@TIBTABLE.DELETEINDEX, 'DeleteIndex'); + RegisterMethod(@TIBTABLE.DELETETABLE, 'DeleteTable'); + RegisterMethod(@TIBTABLE.EMPTYTABLE, 'EmptyTable'); + RegisterMethod(@TIBTABLE.GETINDEXNAMES, 'GetIndexNames'); + RegisterMethod(@TIBTABLE.GOTOCURRENT, 'GotoCurrent'); + RegisterPropertyHelper(@TIBTABLE.CURRENTDBKEY_R,nil,'CurrentDBKey'); + RegisterPropertyHelper(@TIBTABLE.EXISTS_R,nil,'Exists'); + RegisterPropertyHelper(@TIBTABLE.INDEXFIELDCOUNT_R,nil,'IndexFieldCount'); + RegisterPropertyHelper(@TIBTABLE.INDEXFIELDS_R,@TIBTABLE.INDEXFIELDS_W,'IndexFields'); + RegisterPropertyHelper(@TIBTABLE.TABLENAMES_R,nil,'TableNames'); + RegisterPropertyHelper(@TIBTABLE.DEFAULTINDEX_R,@TIBTABLE.DEFAULTINDEX_W,'DefaultIndex'); + RegisterPropertyHelper(@TIBTABLE.INDEXDEFS_R,@TIBTABLE.INDEXDEFS_W,'IndexDefs'); + RegisterPropertyHelper(@TIBTABLE.INDEXFIELDNAMES_R,@TIBTABLE.INDEXFIELDNAMES_W,'IndexFieldNames'); + RegisterPropertyHelper(@TIBTABLE.INDEXNAME_R,@TIBTABLE.INDEXNAME_W,'IndexName'); + RegisterPropertyHelper(@TIBTABLE.MASTERFIELDS_R,@TIBTABLE.MASTERFIELDS_W,'MasterFields'); + RegisterPropertyHelper(@TIBTABLE.MASTERSOURCE_R,@TIBTABLE.MASTERSOURCE_W,'MasterSource'); + RegisterPropertyHelper(@TIBTABLE.READONLY_R,@TIBTABLE.READONLY_W,'ReadOnly'); + RegisterPropertyHelper(@TIBTABLE.STOREDEFS_R,@TIBTABLE.STOREDEFS_W,'StoreDefs'); + RegisterPropertyHelper(@TIBTABLE.TABLENAME_R,@TIBTABLE.TABLENAME_W,'TableName'); + RegisterPropertyHelper(@TIBTABLE.TABLETYPES_R,@TIBTABLE.TABLETYPES_W,'TableTypes'); + end; +end; + +{$ELSE} procedure TIBTABLETABLETYPES_W(Self: TIBTABLE; const T: TIBTABLETYPES); begin Self.TABLETYPES := T; end; @@ -1141,6 +2046,11 @@ begin end; end; +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +(* === run-time registration functions === *) + (*----------------------------------------------------------------------------*) procedure RIRegister_IBTable(CL: TPSRuntimeClassImporter); begin @@ -1374,8 +2284,202 @@ begin CL.AddDelphiFunction('procedure OutputXML(SQLObject: TIBSQL; OutputObject: TIBOutputXML)'); end; -(* === run-time registration functions === *) -(*----------------------------------------------------------------------------*) +{$IFDEF DELPHI10UP}{$REGION 'TIBSQL'}{$ENDIF} +{$IFDEF class_helper_present} +type + TIBSQL_PSHelper = class helper for TIBSQL + public + procedure BOF_R(var T: BOOLEAN); + procedure DATABASE_R(var T: TIBDATABASE); + procedure DATABASE_W(const T: TIBDATABASE); + procedure DBHANDLE_R(var T: PISC_DB_HANDLE); + procedure EOF_R(var T: BOOLEAN); + procedure FIELDINDEX_R(var T: INTEGER; const t1: STRING); + procedure FIELDS_R(var T: TIBXSQLVAR; const t1: INTEGER); + procedure GENERATEPARAMNAMES_R(var T: BOOLEAN); + procedure GENERATEPARAMNAMES_W(const T: BOOLEAN); + procedure GOTOFIRSTRECORDONEXECUTE_R(var T: BOOLEAN); + procedure GOTOFIRSTRECORDONEXECUTE_W(const T: BOOLEAN); + procedure HANDLE_R(var T: TISC_STMT_HANDLE); + procedure ONSQLCHANGING_R(var T: TNOTIFYEVENT); + procedure ONSQLCHANGING_W(const T: TNOTIFYEVENT); + procedure OPEN_R(var T: BOOLEAN); + procedure PARAMCHECK_R(var T: BOOLEAN); + procedure PARAMCHECK_W(const T: BOOLEAN); + procedure PARAMS_R(var T: TIBXSQLDA); + procedure PLAN_R(var T: STRING); + procedure PREPARED_R(var T: BOOLEAN); + procedure RECORDCOUNT_R(var T: INTEGER); + procedure ROWSAFFECTED_R(var T: INTEGER); + procedure SQL_R(var T: TSTRINGS); + procedure SQL_W(const T: TSTRINGS); + procedure SQLTYPE_R(var T: TIBSQLTYPES); + procedure TRANSACTION_R(var T: TIBTRANSACTION); + procedure TRANSACTION_W(const T: TIBTRANSACTION); + procedure TRHANDLE_R(var T: PISC_TR_HANDLE); + procedure UNIQUERELATIONNAME_R(var T: STRING); + end; + +procedure TIBSQL_PSHelper.ONSQLCHANGING_W(const T: TNOTIFYEVENT); +begin Self.ONSQLCHANGING := T; end; + + +procedure TIBSQL_PSHelper.ONSQLCHANGING_R(var T: TNOTIFYEVENT); +begin T := Self.ONSQLCHANGING; end; + + +procedure TIBSQL_PSHelper.TRANSACTION_W(const T: TIBTRANSACTION); +begin Self.TRANSACTION := T; end; + + +procedure TIBSQL_PSHelper.TRANSACTION_R(var T: TIBTRANSACTION); +begin T := Self.TRANSACTION; end; + + +procedure TIBSQL_PSHelper.SQL_W(const T: TSTRINGS); +begin Self.SQL := T; end; + + +procedure TIBSQL_PSHelper.SQL_R(var T: TSTRINGS); +begin T := Self.SQL; end; + + +procedure TIBSQL_PSHelper.PARAMCHECK_W(const T: BOOLEAN); +begin Self.PARAMCHECK := T; end; + + +procedure TIBSQL_PSHelper.PARAMCHECK_R(var T: BOOLEAN); +begin T := Self.PARAMCHECK; end; + + +procedure TIBSQL_PSHelper.GOTOFIRSTRECORDONEXECUTE_W(const T: BOOLEAN); +begin Self.GOTOFIRSTRECORDONEXECUTE := T; end; + + +procedure TIBSQL_PSHelper.GOTOFIRSTRECORDONEXECUTE_R(var T: BOOLEAN); +begin T := Self.GOTOFIRSTRECORDONEXECUTE; end; + + +procedure TIBSQL_PSHelper.DATABASE_W(const T: TIBDATABASE); +begin Self.DATABASE := T; end; + + +procedure TIBSQL_PSHelper.DATABASE_R(var T: TIBDATABASE); +begin T := Self.DATABASE; end; + + +procedure TIBSQL_PSHelper.UNIQUERELATIONNAME_R(var T: STRING); +begin T := Self.UNIQUERELATIONNAME; end; + + +procedure TIBSQL_PSHelper.GENERATEPARAMNAMES_W(const T: BOOLEAN); +begin Self.GENERATEPARAMNAMES := T; end; + + +procedure TIBSQL_PSHelper.GENERATEPARAMNAMES_R(var T: BOOLEAN); +begin T := Self.GENERATEPARAMNAMES; end; + + +procedure TIBSQL_PSHelper.HANDLE_R(var T: TISC_STMT_HANDLE); +begin T := Self.HANDLE; end; + + +procedure TIBSQL_PSHelper.TRHANDLE_R(var T: PISC_TR_HANDLE); +begin T := Self.TRHANDLE; end; + + +procedure TIBSQL_PSHelper.SQLTYPE_R(var T: TIBSQLTYPES); +begin T := Self.SQLTYPE; end; + + +procedure TIBSQL_PSHelper.ROWSAFFECTED_R(var T: INTEGER); +begin T := Self.ROWSAFFECTED; end; + + +procedure TIBSQL_PSHelper.RECORDCOUNT_R(var T: INTEGER); +begin T := Self.RECORDCOUNT; end; + + +procedure TIBSQL_PSHelper.PREPARED_R(var T: BOOLEAN); +begin T := Self.PREPARED; end; + + +procedure TIBSQL_PSHelper.PLAN_R(var T: STRING); +begin T := Self.PLAN; end; + + +procedure TIBSQL_PSHelper.PARAMS_R(var T: TIBXSQLDA); +begin T := Self.PARAMS; end; + + +procedure TIBSQL_PSHelper.OPEN_R(var T: BOOLEAN); +begin T := Self.OPEN; end; + + +procedure TIBSQL_PSHelper.FIELDINDEX_R(var T: INTEGER; const t1: STRING); +begin T := Self.FIELDINDEX[t1]; end; + + +procedure TIBSQL_PSHelper.FIELDS_R(var T: TIBXSQLVAR; const t1: INTEGER); +begin T := Self.FIELDS[t1]; end; + + +procedure TIBSQL_PSHelper.EOF_R(var T: BOOLEAN); +begin T := Self.EOF; end; + + +procedure TIBSQL_PSHelper.DBHANDLE_R(var T: PISC_DB_HANDLE); +begin T := Self.DBHANDLE; end; + + +procedure TIBSQL_PSHelper.BOF_R(var T: BOOLEAN); +begin T := Self.BOF; end; + +procedure RIRegister_TIBSQL(CL: TPSRuntimeClassImporter); +begin + with CL.Add(TIBSQL) do + begin + RegisterMethod(@TIBSQL.BATCHINPUT, 'BatchInput'); + RegisterMethod(@TIBSQL.BATCHOUTPUT, 'BatchOutput'); + RegisterMethod(@TIBSQL.CALL, 'Call'); + RegisterMethod(@TIBSQL.CHECKCLOSED, 'CheckClosed'); + RegisterMethod(@TIBSQL.CHECKOPEN, 'CheckOpen'); + RegisterMethod(@TIBSQL.CHECKVALIDSTATEMENT, 'CheckValidStatement'); + RegisterMethod(@TIBSQL.CLOSE, 'Close'); + RegisterMethod(@TIBSQL.CURRENT, 'Current'); + RegisterMethod(@TIBSQL.EXECQUERY, 'ExecQuery'); + RegisterMethod(@TIBSQL.FIELDBYNAME, 'FieldByName'); + RegisterMethod(@TIBSQL.FREEHANDLE, 'FreeHandle'); + RegisterMethod(@TIBSQL.NEXT, 'Next'); + RegisterMethod(@TIBSQL.PREPARE, 'Prepare'); + RegisterMethod(@TIBSQL.GETUNIQUERELATIONNAME, 'GetUniqueRelationName'); + RegisterMethod(@TIBSQL.PARAMBYNAME, 'ParamByName'); + RegisterPropertyHelper(@TIBSQL.BOF_R,nil,'BOF'); + RegisterPropertyHelper(@TIBSQL.DBHANDLE_R,nil,'DBHandle'); + RegisterPropertyHelper(@TIBSQL.EOF_R,nil,'EOF'); + RegisterPropertyHelper(@TIBSQL.FIELDS_R,nil,'Fields'); + RegisterPropertyHelper(@TIBSQL.FIELDINDEX_R,nil,'FieldIndex'); + RegisterPropertyHelper(@TIBSQL.OPEN_R,nil,'Open'); + RegisterPropertyHelper(@TIBSQL.PARAMS_R,nil,'Params'); + RegisterPropertyHelper(@TIBSQL.PLAN_R,nil,'Plan'); + RegisterPropertyHelper(@TIBSQL.PREPARED_R,nil,'Prepared'); + RegisterPropertyHelper(@TIBSQL.RECORDCOUNT_R,nil,'RecordCount'); + RegisterPropertyHelper(@TIBSQL.ROWSAFFECTED_R,nil,'RowsAffected'); + RegisterPropertyHelper(@TIBSQL.SQLTYPE_R,nil,'SqlType'); + RegisterPropertyHelper(@TIBSQL.TRHANDLE_R,nil,'TRHandle'); + RegisterPropertyHelper(@TIBSQL.HANDLE_R,nil,'Handle'); + RegisterPropertyHelper(@TIBSQL.GENERATEPARAMNAMES_R,@TIBSQL.GENERATEPARAMNAMES_W,'GenerateParamNames'); + RegisterPropertyHelper(@TIBSQL.UNIQUERELATIONNAME_R,nil,'UniqueRelationName'); + RegisterPropertyHelper(@TIBSQL.DATABASE_R,@TIBSQL.DATABASE_W,'Database'); + RegisterPropertyHelper(@TIBSQL.GOTOFIRSTRECORDONEXECUTE_R,@TIBSQL.GOTOFIRSTRECORDONEXECUTE_W,'GoToFirstRecordOnExecute'); + RegisterPropertyHelper(@TIBSQL.PARAMCHECK_R,@TIBSQL.PARAMCHECK_W,'ParamCheck'); + RegisterPropertyHelper(@TIBSQL.SQL_R,@TIBSQL.SQL_W,'SQL'); + RegisterPropertyHelper(@TIBSQL.TRANSACTION_R,@TIBSQL.TRANSACTION_W,'Transaction'); + RegisterEventPropertyHelper(@TIBSQL.ONSQLCHANGING_R,@TIBSQL.ONSQLCHANGING_W,'OnSQLChanging'); + end; +end; + +{$ELSE} procedure TIBSQLONSQLCHANGING_W(Self: TIBSQL; const T: TNOTIFYEVENT); begin Self.ONSQLCHANGING := T; end; @@ -1490,8 +2594,134 @@ begin T := Self.DBHANDLE; end; (*----------------------------------------------------------------------------*) procedure TIBSQLBOF_R(Self: TIBSQL; var T: BOOLEAN); begin T := Self.BOF; end; +procedure RIRegister_TIBSQL(CL: TPSRuntimeClassImporter); +begin + with CL.Add(TIBSQL) do + begin + RegisterMethod(@TIBSQL.BATCHINPUT, 'BatchInput'); + RegisterMethod(@TIBSQL.BATCHOUTPUT, 'BatchOutput'); + RegisterMethod(@TIBSQL.CALL, 'Call'); + RegisterMethod(@TIBSQL.CHECKCLOSED, 'CheckClosed'); + RegisterMethod(@TIBSQL.CHECKOPEN, 'CheckOpen'); + RegisterMethod(@TIBSQL.CHECKVALIDSTATEMENT, 'CheckValidStatement'); + RegisterMethod(@TIBSQL.CLOSE, 'Close'); + RegisterMethod(@TIBSQL.CURRENT, 'Current'); + RegisterMethod(@TIBSQL.EXECQUERY, 'ExecQuery'); + RegisterMethod(@TIBSQL.FIELDBYNAME, 'FieldByName'); + RegisterMethod(@TIBSQL.FREEHANDLE, 'FreeHandle'); + RegisterMethod(@TIBSQL.NEXT, 'Next'); + RegisterMethod(@TIBSQL.PREPARE, 'Prepare'); + RegisterMethod(@TIBSQL.GETUNIQUERELATIONNAME, 'GetUniqueRelationName'); + RegisterMethod(@TIBSQL.PARAMBYNAME, 'ParamByName'); + RegisterPropertyHelper(@TIBSQLBOF_R,nil,'BOF'); + RegisterPropertyHelper(@TIBSQLDBHANDLE_R,nil,'DBHandle'); + RegisterPropertyHelper(@TIBSQLEOF_R,nil,'EOF'); + RegisterPropertyHelper(@TIBSQLFIELDS_R,nil,'Fields'); + RegisterPropertyHelper(@TIBSQLFIELDINDEX_R,nil,'FieldIndex'); + RegisterPropertyHelper(@TIBSQLOPEN_R,nil,'Open'); + RegisterPropertyHelper(@TIBSQLPARAMS_R,nil,'Params'); + RegisterPropertyHelper(@TIBSQLPLAN_R,nil,'Plan'); + RegisterPropertyHelper(@TIBSQLPREPARED_R,nil,'Prepared'); + RegisterPropertyHelper(@TIBSQLRECORDCOUNT_R,nil,'RecordCount'); + RegisterPropertyHelper(@TIBSQLROWSAFFECTED_R,nil,'RowsAffected'); + RegisterPropertyHelper(@TIBSQLSQLTYPE_R,nil,'SqlType'); + RegisterPropertyHelper(@TIBSQLTRHANDLE_R,nil,'TRHandle'); + RegisterPropertyHelper(@TIBSQLHANDLE_R,nil,'Handle'); + RegisterPropertyHelper(@TIBSQLGENERATEPARAMNAMES_R,@TIBSQLGENERATEPARAMNAMES_W,'GenerateParamNames'); + RegisterPropertyHelper(@TIBSQLUNIQUERELATIONNAME_R,nil,'UniqueRelationName'); + RegisterPropertyHelper(@TIBSQLDATABASE_R,@TIBSQLDATABASE_W,'Database'); + RegisterPropertyHelper(@TIBSQLGOTOFIRSTRECORDONEXECUTE_R,@TIBSQLGOTOFIRSTRECORDONEXECUTE_W,'GoToFirstRecordOnExecute'); + RegisterPropertyHelper(@TIBSQLPARAMCHECK_R,@TIBSQLPARAMCHECK_W,'ParamCheck'); + RegisterPropertyHelper(@TIBSQLSQL_R,@TIBSQLSQL_W,'SQL'); + RegisterPropertyHelper(@TIBSQLTRANSACTION_R,@TIBSQLTRANSACTION_W,'Transaction'); + RegisterEventPropertyHelper(@TIBSQLONSQLCHANGING_R,@TIBSQLONSQLCHANGING_W,'OnSQLChanging'); + end; +end; -(*----------------------------------------------------------------------------*) +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TIBOUTPUTXML'}{$ENDIF} +{$IFDEF class_helper_present} +type + TIBOUTPUTXML_PSHelper = class helper for TIBOUTPUTXML + public + procedure DATABASETAG_R(var T: STRING); + procedure DATABASETAG_W(const T: STRING); + procedure FLAGS_R(var T: TIBXMLFLAGS); + procedure FLAGS_W(const T: TIBXMLFLAGS); + procedure HEADERTAG_R(var T: STRING); + procedure HEADERTAG_W(const T: STRING); + procedure ROWTAG_R(var T: STRING); + procedure ROWTAG_W(const T: STRING); + procedure STREAM_R(var T: TSTREAM); + procedure STREAM_W(const T: TSTREAM); + procedure TABLETAG_R(var T: STRING); + procedure TABLETAG_W(const T: STRING); + end; + +procedure TIBOUTPUTXML_PSHelper.FLAGS_W(const T: TIBXMLFLAGS); +begin Self.FLAGS := T; end; + + +procedure TIBOUTPUTXML_PSHelper.FLAGS_R(var T: TIBXMLFLAGS); +begin T := Self.FLAGS; end; + + +procedure TIBOUTPUTXML_PSHelper.ROWTAG_W(const T: STRING); +begin Self.ROWTAG := T; end; + + +procedure TIBOUTPUTXML_PSHelper.ROWTAG_R(var T: STRING); +begin T := Self.ROWTAG; end; + + +procedure TIBOUTPUTXML_PSHelper.TABLETAG_W(const T: STRING); +begin Self.TABLETAG := T; end; + + +procedure TIBOUTPUTXML_PSHelper.TABLETAG_R(var T: STRING); +begin T := Self.TABLETAG; end; + + +procedure TIBOUTPUTXML_PSHelper.STREAM_W(const T: TSTREAM); +begin Self.STREAM := T; end; + + +procedure TIBOUTPUTXML_PSHelper.STREAM_R(var T: TSTREAM); +begin T := Self.STREAM; end; + + +procedure TIBOUTPUTXML_PSHelper.DATABASETAG_W(const T: STRING); +begin Self.DATABASETAG := T; end; + + +procedure TIBOUTPUTXML_PSHelper.DATABASETAG_R(var T: STRING); +begin T := Self.DATABASETAG; end; + + +procedure TIBOUTPUTXML_PSHelper.HEADERTAG_W(const T: STRING); +begin Self.HEADERTAG := T; end; + + +procedure TIBOUTPUTXML_PSHelper.HEADERTAG_R(var T: STRING); +begin T := Self.HEADERTAG; end; + +procedure RIRegister_TIBOUTPUTXML(CL: TPSRuntimeClassImporter); +begin + with CL.Add(TIBOUTPUTXML) do + begin + RegisterMethod(@TIBOUTPUTXML.WRITEXML, 'WriteXML'); + RegisterPropertyHelper(@TIBOUTPUTXML.HEADERTAG_R,@TIBOUTPUTXML.HEADERTAG_W,'HeaderTag'); + RegisterPropertyHelper(@TIBOUTPUTXML.DATABASETAG_R,@TIBOUTPUTXML.DATABASETAG_W,'DatabaseTag'); + RegisterPropertyHelper(@TIBOUTPUTXML.STREAM_R,@TIBOUTPUTXML.STREAM_W,'Stream'); + RegisterPropertyHelper(@TIBOUTPUTXML.TABLETAG_R,@TIBOUTPUTXML.TABLETAG_W,'TableTag'); + RegisterPropertyHelper(@TIBOUTPUTXML.ROWTAG_R,@TIBOUTPUTXML.ROWTAG_W,'RowTag'); + RegisterPropertyHelper(@TIBOUTPUTXML.FLAGS_R,@TIBOUTPUTXML.FLAGS_W,'Flags'); + end; +end; + +{$ELSE} procedure TIBOUTPUTXMLFLAGS_W(Self: TIBOUTPUTXML; const T: TIBXMLFLAGS); begin Self.FLAGS := T; end; @@ -1539,7 +2769,82 @@ begin Self.HEADERTAG := T; end; procedure TIBOUTPUTXMLHEADERTAG_R(Self: TIBOUTPUTXML; var T: STRING); begin T := Self.HEADERTAG; end; -(*----------------------------------------------------------------------------*) +procedure RIRegister_TIBOUTPUTXML(CL: TPSRuntimeClassImporter); +begin + with CL.Add(TIBOUTPUTXML) do + begin + RegisterMethod(@TIBOUTPUTXML.WRITEXML, 'WriteXML'); + RegisterPropertyHelper(@TIBOUTPUTXMLHEADERTAG_R,@TIBOUTPUTXMLHEADERTAG_W,'HeaderTag'); + RegisterPropertyHelper(@TIBOUTPUTXMLDATABASETAG_R,@TIBOUTPUTXMLDATABASETAG_W,'DatabaseTag'); + RegisterPropertyHelper(@TIBOUTPUTXMLSTREAM_R,@TIBOUTPUTXMLSTREAM_W,'Stream'); + RegisterPropertyHelper(@TIBOUTPUTXMLTABLETAG_R,@TIBOUTPUTXMLTABLETAG_W,'TableTag'); + RegisterPropertyHelper(@TIBOUTPUTXMLROWTAG_R,@TIBOUTPUTXMLROWTAG_W,'RowTag'); + RegisterPropertyHelper(@TIBOUTPUTXMLFLAGS_R,@TIBOUTPUTXMLFLAGS_W,'Flags'); + end; +end; + +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TIBINPUTDELIMITEDFILE'}{$ENDIF} +{$IFDEF class_helper_present} +type + TIBINPUTDELIMITEDFILE_PSHelper = class helper for TIBINPUTDELIMITEDFILE + public + procedure COLDELIMITER_R(var T: STRING); + procedure COLDELIMITER_W(const T: STRING); + procedure READBLANKSASNULL_R(var T: BOOLEAN); + procedure READBLANKSASNULL_W(const T: BOOLEAN); + procedure ROWDELIMITER_R(var T: STRING); + procedure ROWDELIMITER_W(const T: STRING); + procedure SKIPTITLES_R(var T: BOOLEAN); + procedure SKIPTITLES_W(const T: BOOLEAN); + end; + +procedure TIBINPUTDELIMITEDFILE_PSHelper.SKIPTITLES_W(const T: BOOLEAN); +begin Self.SKIPTITLES := T; end; + + +procedure TIBINPUTDELIMITEDFILE_PSHelper.SKIPTITLES_R(var T: BOOLEAN); +begin T := Self.SKIPTITLES; end; + + +procedure TIBINPUTDELIMITEDFILE_PSHelper.ROWDELIMITER_W(const T: STRING); +begin Self.ROWDELIMITER := T; end; + + +procedure TIBINPUTDELIMITEDFILE_PSHelper.ROWDELIMITER_R(var T: STRING); +begin T := Self.ROWDELIMITER; end; + + +procedure TIBINPUTDELIMITEDFILE_PSHelper.READBLANKSASNULL_W(const T: BOOLEAN); +begin Self.READBLANKSASNULL := T; end; + + +procedure TIBINPUTDELIMITEDFILE_PSHelper.READBLANKSASNULL_R(var T: BOOLEAN); +begin T := Self.READBLANKSASNULL; end; + + +procedure TIBINPUTDELIMITEDFILE_PSHelper.COLDELIMITER_W(const T: STRING); +begin Self.COLDELIMITER := T; end; + + +procedure TIBINPUTDELIMITEDFILE_PSHelper.COLDELIMITER_R(var T: STRING); +begin T := Self.COLDELIMITER; end; + +procedure RIRegister_TIBINPUTDELIMITEDFILE(CL: TPSRuntimeClassImporter); +begin + with CL.Add(TIBINPUTDELIMITEDFILE) do + begin + RegisterMethod(@TIBINPUTDELIMITEDFILE.GETCOLUMN, 'GetColumn'); + RegisterPropertyHelper(@TIBINPUTDELIMITEDFILE.COLDELIMITER_R,@TIBINPUTDELIMITEDFILE.COLDELIMITER_W,'ColDelimiter'); + RegisterPropertyHelper(@TIBINPUTDELIMITEDFILE.READBLANKSASNULL_R,@TIBINPUTDELIMITEDFILE.READBLANKSASNULL_W,'ReadBlanksAsNull'); + RegisterPropertyHelper(@TIBINPUTDELIMITEDFILE.ROWDELIMITER_R,@TIBINPUTDELIMITEDFILE.ROWDELIMITER_W,'RowDelimiter'); + RegisterPropertyHelper(@TIBINPUTDELIMITEDFILE.SKIPTITLES_R,@TIBINPUTDELIMITEDFILE.SKIPTITLES_W,'SkipTitles'); + end; +end; + +{$ELSE} procedure TIBINPUTDELIMITEDFILESKIPTITLES_W(Self: TIBINPUTDELIMITEDFILE; const T: BOOLEAN); begin Self.SKIPTITLES := T; end; @@ -1571,6 +2876,68 @@ begin Self.COLDELIMITER := T; end; procedure TIBINPUTDELIMITEDFILECOLDELIMITER_R(Self: TIBINPUTDELIMITEDFILE; var T: STRING); begin T := Self.COLDELIMITER; end; +procedure RIRegister_TIBINPUTDELIMITEDFILE(CL: TPSRuntimeClassImporter); +begin + with CL.Add(TIBINPUTDELIMITEDFILE) do + begin + RegisterMethod(@TIBINPUTDELIMITEDFILE.GETCOLUMN, 'GetColumn'); + RegisterPropertyHelper(@TIBINPUTDELIMITEDFILECOLDELIMITER_R,@TIBINPUTDELIMITEDFILECOLDELIMITER_W,'ColDelimiter'); + RegisterPropertyHelper(@TIBINPUTDELIMITEDFILEREADBLANKSASNULL_R,@TIBINPUTDELIMITEDFILEREADBLANKSASNULL_W,'ReadBlanksAsNull'); + RegisterPropertyHelper(@TIBINPUTDELIMITEDFILEROWDELIMITER_R,@TIBINPUTDELIMITEDFILEROWDELIMITER_W,'RowDelimiter'); + RegisterPropertyHelper(@TIBINPUTDELIMITEDFILESKIPTITLES_R,@TIBINPUTDELIMITEDFILESKIPTITLES_W,'SkipTitles'); + end; +end; +(*----------------------------------------------------------------------------*) + + +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TIBOUTPUTDELIMITEDFILE'}{$ENDIF} +{$IFDEF class_helper_present} +type + TIBOUTPUTDELIMITEDFILE_PSHelper = class helper for TIBOUTPUTDELIMITEDFILE + public + procedure COLDELIMITER_R(var T: STRING); + procedure COLDELIMITER_W(const T: STRING); + procedure OUTPUTTITLES_R(var T: BOOLEAN); + procedure OUTPUTTITLES_W(const T: BOOLEAN); + procedure ROWDELIMITER_R(var T: STRING); + procedure ROWDELIMITER_W(const T: STRING); + end; + +procedure TIBOUTPUTDELIMITEDFILE_PSHelper.ROWDELIMITER_W(const T: STRING); +begin Self.ROWDELIMITER := T; end; + + +procedure TIBOUTPUTDELIMITEDFILE_PSHelper.ROWDELIMITER_R(var T: STRING); +begin T := Self.ROWDELIMITER; end; + + +procedure TIBOUTPUTDELIMITEDFILE_PSHelper.OUTPUTTITLES_W(const T: BOOLEAN); +begin Self.OUTPUTTITLES := T; end; + + +procedure TIBOUTPUTDELIMITEDFILE_PSHelper.OUTPUTTITLES_R(var T: BOOLEAN); +begin T := Self.OUTPUTTITLES; end; + +procedure TIBOUTPUTDELIMITEDFILE_PSHelper.COLDELIMITER_W(const T: STRING); +begin Self.COLDELIMITER := T; end; + +procedure TIBOUTPUTDELIMITEDFILE_PSHelper.COLDELIMITER_R(var T: STRING); +begin T := Self.COLDELIMITER; end; + +procedure RIRegister_TIBOUTPUTDELIMITEDFILE(CL: TPSRuntimeClassImporter); +begin + with CL.Add(TIBOUTPUTDELIMITEDFILE) do + begin + RegisterPropertyHelper(@TIBOUTPUTDELIMITEDFILECOLDELIMITER_R,@TIBOUTPUTDELIMITEDFILECOLDELIMITER_W,'ColDelimiter'); + RegisterPropertyHelper(@TIBOUTPUTDELIMITEDFILEOUTPUTTITLES_R,@TIBOUTPUTDELIMITEDFILEOUTPUTTITLES_W,'OutputTitles'); + RegisterPropertyHelper(@TIBOUTPUTDELIMITEDFILEROWDELIMITER_R,@TIBOUTPUTDELIMITEDFILEROWDELIMITER_W,'RowDelimiter'); + end; +end; + +{$ELSE} (*----------------------------------------------------------------------------*) procedure TIBOUTPUTDELIMITEDFILEROWDELIMITER_W(Self: TIBOUTPUTDELIMITEDFILE; const T: STRING); begin Self.ROWDELIMITER := T; end; @@ -1591,11 +2958,86 @@ begin T := Self.OUTPUTTITLES; end; procedure TIBOUTPUTDELIMITEDFILECOLDELIMITER_W(Self: TIBOUTPUTDELIMITEDFILE; const T: STRING); begin Self.COLDELIMITER := T; end; -(*----------------------------------------------------------------------------*) procedure TIBOUTPUTDELIMITEDFILECOLDELIMITER_R(Self: TIBOUTPUTDELIMITEDFILE; var T: STRING); begin T := Self.COLDELIMITER; end; -(*----------------------------------------------------------------------------*) +procedure RIRegister_TIBOUTPUTDELIMITEDFILE(CL: TPSRuntimeClassImporter); +begin + with CL.Add(TIBOUTPUTDELIMITEDFILE) do + begin + RegisterPropertyHelper(@TIBOUTPUTDELIMITEDFILECOLDELIMITER_R,@TIBOUTPUTDELIMITEDFILECOLDELIMITER_W,'ColDelimiter'); + RegisterPropertyHelper(@TIBOUTPUTDELIMITEDFILEOUTPUTTITLES_R,@TIBOUTPUTDELIMITEDFILEOUTPUTTITLES_W,'OutputTitles'); + RegisterPropertyHelper(@TIBOUTPUTDELIMITEDFILEROWDELIMITER_R,@TIBOUTPUTDELIMITEDFILEROWDELIMITER_W,'RowDelimiter'); + end; +end; + +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TIBXSQLDA'}{$ENDIF} +{$IFDEF class_helper_present} +type + TIBXSQLDA_PSHelper = class helper for TIBXSQLDA + public + procedure ASXSQLDA_R( var T: PXSQLDA); + procedure COUNT_R( var T: INTEGER); + procedure COUNT_W( const T: INTEGER); + procedure MODIFIED_R( var T: BOOLEAN); + procedure NAMES_R( var T: STRING); + procedure RECORDSIZE_R( var T: INTEGER); + procedure UNIQUERELATIONNAME_R( var T: STRING); + procedure VARS_R( var T: TIBXSQLVAR; const t1: INTEGER); + end; + +procedure TIBXSQLDA_PSHelper.UNIQUERELATIONNAME_R( var T: STRING); +begin T := Self.UNIQUERELATIONNAME; end; + + +procedure TIBXSQLDA_PSHelper.VARS_R( var T: TIBXSQLVAR; const t1: INTEGER); +begin T := Self.VARS[t1]; end; + + +procedure TIBXSQLDA_PSHelper.RECORDSIZE_R( var T: INTEGER); +begin T := Self.RECORDSIZE; end; + + +procedure TIBXSQLDA_PSHelper.NAMES_R( var T: STRING); +begin T := Self.NAMES; end; + + +procedure TIBXSQLDA_PSHelper.MODIFIED_R( var T: BOOLEAN); +begin T := Self.MODIFIED; end; + + +procedure TIBXSQLDA_PSHelper.COUNT_W( const T: INTEGER); +begin Self.COUNT := T; end; + + +procedure TIBXSQLDA_PSHelper.COUNT_R( var T: INTEGER); +begin T := Self.COUNT; end; + + +procedure TIBXSQLDA_PSHelper.ASXSQLDA_R( var T: PXSQLDA); +begin T := Self.ASXSQLDA; end; + +procedure RIRegister_TIBXSQLDA(CL: TPSRuntimeClassImporter); +begin + with CL.Add(TIBXSQLDA) do + begin + RegisterConstructor(@TIBXSQLDA.CREATE, 'Create'); + RegisterMethod(@TIBXSQLDA.ADDNAME, 'AddName'); + RegisterMethod(@TIBXSQLDA.BYNAME, 'ByName'); + RegisterPropertyHelper(@TIBXSQLDA.ASXSQLDA_R,nil,'AsXSQLDA'); + RegisterPropertyHelper(@TIBXSQLDA.COUNT_R,@TIBXSQLDA.COUNT_W,'Count'); + RegisterPropertyHelper(@TIBXSQLDA.MODIFIED_R,nil,'Modified'); + RegisterPropertyHelper(@TIBXSQLDA.NAMES_R,nil,'Names'); + RegisterPropertyHelper(@TIBXSQLDA.RECORDSIZE_R,nil,'RecordSize'); + RegisterPropertyHelper(@TIBXSQLDA.VARS_R,nil,'Vars'); + RegisterPropertyHelper(@TIBXSQLDA.UNIQUERELATIONNAME_R,nil,'UniqueRelationName'); + end; +end; + +{$ELSE} procedure TIBXSQLDAUNIQUERELATIONNAME_R(Self: TIBXSQLDA; var T: STRING); begin T := Self.UNIQUERELATIONNAME; end; @@ -1627,7 +3069,302 @@ begin T := Self.COUNT; end; procedure TIBXSQLDAASXSQLDA_R(Self: TIBXSQLDA; var T: PXSQLDA); begin T := Self.ASXSQLDA; end; -(*----------------------------------------------------------------------------*) +procedure RIRegister_TIBXSQLDA(CL: TPSRuntimeClassImporter); +begin + with CL.Add(TIBXSQLDA) do + begin + RegisterConstructor(@TIBXSQLDA.CREATE, 'Create'); + RegisterMethod(@TIBXSQLDA.ADDNAME, 'AddName'); + RegisterMethod(@TIBXSQLDA.BYNAME, 'ByName'); + RegisterPropertyHelper(@TIBXSQLDAASXSQLDA_R,nil,'AsXSQLDA'); + RegisterPropertyHelper(@TIBXSQLDACOUNT_R,@TIBXSQLDACOUNT_W,'Count'); + RegisterPropertyHelper(@TIBXSQLDAMODIFIED_R,nil,'Modified'); + RegisterPropertyHelper(@TIBXSQLDANAMES_R,nil,'Names'); + RegisterPropertyHelper(@TIBXSQLDARECORDSIZE_R,nil,'RecordSize'); + RegisterPropertyHelper(@TIBXSQLDAVARS_R,nil,'Vars'); + RegisterPropertyHelper(@TIBXSQLDAUNIQUERELATIONNAME_R,nil,'UniqueRelationName'); + end; +end; + +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TIBXSQLVAR'}{$ENDIF} +{$IFDEF class_helper_present} +type + TIBXSQLVAR_PSHelper = class helper for TIBXSQLVAR + public + procedure ASCURRENCY_R(var T: CURRENCY); + procedure ASCURRENCY_W(const T: CURRENCY); + procedure ASDATE_R(var T: TDATETIME); + procedure ASDATE_W(const T: TDATETIME); + procedure ASDATETIME_R(var T: TDATETIME); + procedure ASDATETIME_W(const T: TDATETIME); + procedure ASDOUBLE_R(var T: DOUBLE); + procedure ASDOUBLE_W(const T: DOUBLE); + procedure ASFLOAT_R(var T: FLOAT); + procedure ASFLOAT_W(const T: FLOAT); + procedure ASINT64_R(var T: INT64); + procedure ASINT64_W(const T: INT64); + procedure ASINTEGER_R(var T: INTEGER); + procedure ASINTEGER_W(const T: INTEGER); + procedure ASLONG_R(var T: LONG); + procedure ASLONG_W(const T: LONG); + procedure ASPOINTER_R(var T: POINTER); + procedure ASPOINTER_W(const T: POINTER); + procedure ASQUAD_R(var T: TISC_QUAD); + procedure ASQUAD_W(const T: TISC_QUAD); + procedure ASSHORT_R(var T: SHORT); + procedure ASSHORT_W(const T: SHORT); + procedure ASSTRING_R(var T: STRING); + procedure ASSTRING_W(const T: STRING); + procedure ASTIME_R(var T: TDATETIME); + procedure ASTIME_W(const T: TDATETIME); + procedure ASTRIMSTRING_R(var T: STRING); + procedure ASTRIMSTRING_W(const T: STRING); + procedure ASVARIANT_R(var T: VARIANT); + procedure ASVARIANT_W(const T: VARIANT); + procedure ASXSQLVAR_R(var T: PXSQLVAR); + procedure ASXSQLVAR_W(const T: PXSQLVAR); + procedure DATA_R(var T: PXSQLVAR); + procedure DATA_W(const T: PXSQLVAR); + procedure INDEX_R(var T: INTEGER); + procedure ISNULL_R(var T: BOOLEAN); + procedure ISNULL_W(const T: BOOLEAN); + procedure ISNULLABLE_R(var T: BOOLEAN); + procedure ISNULLABLE_W(const T: BOOLEAN); + procedure MODIFIED_R(var T: BOOLEAN); + procedure MODIFIED_W(const T: BOOLEAN); + procedure NAME_R(var T: STRING); + procedure SIZE_R(var T: INTEGER); + procedure SQLTYPE_R(var T: INTEGER); + procedure VALUE_R(var T: VARIANT); + procedure VALUE_W(const T: VARIANT); + end; + +procedure TIBXSQLVAR_PSHelper.VALUE_W(const T: VARIANT); +begin Self.VALUE := T; end; + + +procedure TIBXSQLVAR_PSHelper.VALUE_R(var T: VARIANT); +begin T := Self.VALUE; end; + + +procedure TIBXSQLVAR_PSHelper.SQLTYPE_R(var T: INTEGER); +begin T := Self.SQLTYPE; end; + + +procedure TIBXSQLVAR_PSHelper.SIZE_R(var T: INTEGER); +begin T := Self.SIZE; end; + + +procedure TIBXSQLVAR_PSHelper.NAME_R(var T: STRING); +begin T := Self.NAME; end; + + +procedure TIBXSQLVAR_PSHelper.MODIFIED_W(const T: BOOLEAN); +begin Self.MODIFIED := T; end; + + +procedure TIBXSQLVAR_PSHelper.MODIFIED_R(var T: BOOLEAN); +begin T := Self.MODIFIED; end; + + +procedure TIBXSQLVAR_PSHelper.INDEX_R(var T: INTEGER); +begin T := Self.INDEX; end; + + +procedure TIBXSQLVAR_PSHelper.ISNULLABLE_W(const T: BOOLEAN); +begin Self.ISNULLABLE := T; end; + + +procedure TIBXSQLVAR_PSHelper.ISNULLABLE_R(var T: BOOLEAN); +begin T := Self.ISNULLABLE; end; + + +procedure TIBXSQLVAR_PSHelper.ISNULL_W(const T: BOOLEAN); +begin Self.ISNULL := T; end; + + +procedure TIBXSQLVAR_PSHelper.ISNULL_R(var T: BOOLEAN); +begin T := Self.ISNULL; end; + + +procedure TIBXSQLVAR_PSHelper.DATA_W(const T: PXSQLVAR); +begin Self.DATA := T; end; + + +procedure TIBXSQLVAR_PSHelper.DATA_R(var T: PXSQLVAR); +begin T := Self.DATA; end; + + +procedure TIBXSQLVAR_PSHelper.ASXSQLVAR_W(const T: PXSQLVAR); +begin Self.ASXSQLVAR := T; end; + + +procedure TIBXSQLVAR_PSHelper.ASXSQLVAR_R(var T: PXSQLVAR); +begin T := Self.ASXSQLVAR; end; + + +procedure TIBXSQLVAR_PSHelper.ASVARIANT_W(const T: VARIANT); +begin Self.ASVARIANT := T; end; + + +procedure TIBXSQLVAR_PSHelper.ASVARIANT_R(var T: VARIANT); +begin T := Self.ASVARIANT; end; + + +procedure TIBXSQLVAR_PSHelper.ASTRIMSTRING_W(const T: STRING); +begin Self.ASTRIMSTRING := T; end; + + +procedure TIBXSQLVAR_PSHelper.ASTRIMSTRING_R(var T: STRING); +begin T := Self.ASTRIMSTRING; end; + + +procedure TIBXSQLVAR_PSHelper.ASSTRING_W(const T: STRING); +begin Self.ASSTRING := T; end; + + +procedure TIBXSQLVAR_PSHelper.ASSTRING_R(var T: STRING); +begin T := Self.ASSTRING; end; + + +procedure TIBXSQLVAR_PSHelper.ASSHORT_W(const T: SHORT); +begin Self.ASSHORT := T; end; + + +procedure TIBXSQLVAR_PSHelper.ASSHORT_R(var T: SHORT); +begin T := Self.ASSHORT; end; + + +procedure TIBXSQLVAR_PSHelper.ASQUAD_W(const T: TISC_QUAD); +begin Self.ASQUAD := T; end; + + +procedure TIBXSQLVAR_PSHelper.ASQUAD_R(var T: TISC_QUAD); +begin T := Self.ASQUAD; end; + + +procedure TIBXSQLVAR_PSHelper.ASPOINTER_W(const T: POINTER); +begin Self.ASPOINTER := T; end; + + +procedure TIBXSQLVAR_PSHelper.ASPOINTER_R(var T: POINTER); +begin T := Self.ASPOINTER; end; + + +procedure TIBXSQLVAR_PSHelper.ASLONG_W(const T: LONG); +begin Self.ASLONG := T; end; + + +procedure TIBXSQLVAR_PSHelper.ASLONG_R(var T: LONG); +begin T := Self.ASLONG; end; + + +procedure TIBXSQLVAR_PSHelper.ASINTEGER_W(const T: INTEGER); +begin Self.ASINTEGER := T; end; + + +procedure TIBXSQLVAR_PSHelper.ASINTEGER_R(var T: INTEGER); +begin T := Self.ASINTEGER; end; + + +procedure TIBXSQLVAR_PSHelper.ASINT64_W(const T: INT64); +begin Self.ASINT64 := T; end; + + +procedure TIBXSQLVAR_PSHelper.ASINT64_R(var T: INT64); +begin T := Self.ASINT64; end; + + +procedure TIBXSQLVAR_PSHelper.ASCURRENCY_W(const T: CURRENCY); +begin Self.ASCURRENCY := T; end; + + +procedure TIBXSQLVAR_PSHelper.ASCURRENCY_R(var T: CURRENCY); +begin T := Self.ASCURRENCY; end; + + +procedure TIBXSQLVAR_PSHelper.ASFLOAT_W(const T: FLOAT); +begin Self.ASFLOAT := T; end; + + +procedure TIBXSQLVAR_PSHelper.ASFLOAT_R(var T: FLOAT); +begin T := Self.ASFLOAT; end; + + +procedure TIBXSQLVAR_PSHelper.ASDOUBLE_W(const T: DOUBLE); +begin Self.ASDOUBLE := T; end; + + +procedure TIBXSQLVAR_PSHelper.ASDOUBLE_R(var T: DOUBLE); +begin T := Self.ASDOUBLE; end; + + +procedure TIBXSQLVAR_PSHelper.ASDATETIME_W(const T: TDATETIME); +begin Self.ASDATETIME := T; end; + + +procedure TIBXSQLVAR_PSHelper.ASDATETIME_R(var T: TDATETIME); +begin T := Self.ASDATETIME; end; + + +procedure TIBXSQLVAR_PSHelper.ASTIME_W(const T: TDATETIME); +begin Self.ASTIME := T; end; + + +procedure TIBXSQLVAR_PSHelper.ASTIME_R(var T: TDATETIME); +begin T := Self.ASTIME; end; + + +procedure TIBXSQLVAR_PSHelper.ASDATE_W(const T: TDATETIME); +begin Self.ASDATE := T; end; + + +procedure TIBXSQLVAR_PSHelper.ASDATE_R(var T: TDATETIME); +begin T := Self.ASDATE; end; + +procedure RIRegister_TIBXSQLVAR(CL: TPSRuntimeClassImporter); +begin + with CL.Add(TIBXSQLVAR) do + begin + RegisterConstructor(@TIBXSQLVAR.CREATE, 'Create'); + RegisterMethod(@TIBXSQLVAR.ASSIGN, 'Assign'); + RegisterMethod(@TIBXSQLVAR.LOADFROMFILE, 'LoadFromFile'); + RegisterMethod(@TIBXSQLVAR.LOADFROMSTREAM, 'LoadFromStream'); + RegisterMethod(@TIBXSQLVAR.SAVETOFILE, 'SaveToFile'); + RegisterMethod(@TIBXSQLVAR.SAVETOSTREAM, 'SaveToStream'); + RegisterMethod(@TIBXSQLVAR.CLEAR, 'Clear'); + RegisterPropertyHelper(@TIBXSQLVAR.ASDATE_R,@TIBXSQLVAR.ASDATE_W,'AsDate'); + RegisterPropertyHelper(@TIBXSQLVAR.ASTIME_R,@TIBXSQLVAR.ASTIME_W,'AsTime'); + RegisterPropertyHelper(@TIBXSQLVAR.ASDATETIME_R,@TIBXSQLVAR.ASDATETIME_W,'AsDateTime'); + RegisterPropertyHelper(@TIBXSQLVAR.ASDOUBLE_R,@TIBXSQLVAR.ASDOUBLE_W,'AsDouble'); + RegisterPropertyHelper(@TIBXSQLVAR.ASFLOAT_R,@TIBXSQLVAR.ASFLOAT_W,'AsFloat'); + RegisterPropertyHelper(@TIBXSQLVAR.ASCURRENCY_R,@TIBXSQLVAR.ASCURRENCY_W,'AsCurrency'); + RegisterPropertyHelper(@TIBXSQLVAR.ASINT64_R,@TIBXSQLVAR.ASINT64_W,'ASINT64'); + RegisterPropertyHelper(@TIBXSQLVAR.ASINTEGER_R,@TIBXSQLVAR.ASINTEGER_W,'AsInteger'); + RegisterPropertyHelper(@TIBXSQLVAR.ASLONG_R,@TIBXSQLVAR.ASLONG_W,'AsLong'); + RegisterPropertyHelper(@TIBXSQLVAR.ASPOINTER_R,@TIBXSQLVAR.ASPOINTER_W,'AsPointer'); + RegisterPropertyHelper(@TIBXSQLVAR.ASQUAD_R,@TIBXSQLVAR.ASQUAD_W,'AsQuad'); + RegisterPropertyHelper(@TIBXSQLVAR.ASSHORT_R,@TIBXSQLVAR.ASSHORT_W,'AsShort'); + RegisterPropertyHelper(@TIBXSQLVAR.ASSTRING_R,@TIBXSQLVAR.ASSTRING_W,'AsString'); + RegisterPropertyHelper(@TIBXSQLVAR.ASTRIMSTRING_R,@TIBXSQLVAR.ASTRIMSTRING_W,'AsTrimString'); + RegisterPropertyHelper(@TIBXSQLVAR.ASVARIANT_R,@TIBXSQLVAR.ASVARIANT_W,'AsVariant'); + RegisterPropertyHelper(@TIBXSQLVAR.ASXSQLVAR_R,@TIBXSQLVAR.ASXSQLVAR_W,'AsXSQLVAR'); + RegisterPropertyHelper(@TIBXSQLVAR.DATA_R,@TIBXSQLVAR.DATA_W,'Data'); + RegisterPropertyHelper(@TIBXSQLVAR.ISNULL_R,@TIBXSQLVAR.ISNULL_W,'IsNull'); + RegisterPropertyHelper(@TIBXSQLVAR.ISNULLABLE_R,@TIBXSQLVAR.ISNULLABLE_W,'IsNullable'); + RegisterPropertyHelper(@TIBXSQLVAR.INDEX_R,nil,'Index'); + RegisterPropertyHelper(@TIBXSQLVAR.MODIFIED_R,@TIBXSQLVAR.MODIFIED_W,'Modified'); + RegisterPropertyHelper(@TIBXSQLVAR.NAME_R,nil,'Name'); + RegisterPropertyHelper(@TIBXSQLVAR.SIZE_R,nil,'Size'); + RegisterPropertyHelper(@TIBXSQLVAR.SQLTYPE_R,nil,'SqlType'); + RegisterPropertyHelper(@TIBXSQLVAR.VALUE_R,@TIBXSQLVAR.VALUE_W,'Value'); + end; +end; + +{$ELSE} procedure TIBXSQLVARVALUE_W(Self: TIBXSQLVAR; const T: VARIANT); begin Self.VALUE := T; end; @@ -1811,132 +3548,6 @@ begin Self.ASDATE := T; end; procedure TIBXSQLVARASDATE_R(Self: TIBXSQLVAR; var T: TDATETIME); begin T := Self.ASDATE; end; -(*----------------------------------------------------------------------------*) -procedure RIRegister_IBSQL_Routines(S: TIFPSExec); -begin - S.RegisterDelphiFunction(@OUTPUTXML, 'OutputXML', cdRegister); -end; - -(*----------------------------------------------------------------------------*) -procedure RIRegister_TIBSQL(CL: TPSRuntimeClassImporter); -begin - with CL.Add(TIBSQL) do - begin - RegisterMethod(@TIBSQL.BATCHINPUT, 'BatchInput'); - RegisterMethod(@TIBSQL.BATCHOUTPUT, 'BatchOutput'); - RegisterMethod(@TIBSQL.CALL, 'Call'); - RegisterMethod(@TIBSQL.CHECKCLOSED, 'CheckClosed'); - RegisterMethod(@TIBSQL.CHECKOPEN, 'CheckOpen'); - RegisterMethod(@TIBSQL.CHECKVALIDSTATEMENT, 'CheckValidStatement'); - RegisterMethod(@TIBSQL.CLOSE, 'Close'); - RegisterMethod(@TIBSQL.CURRENT, 'Current'); - RegisterMethod(@TIBSQL.EXECQUERY, 'ExecQuery'); - RegisterMethod(@TIBSQL.FIELDBYNAME, 'FieldByName'); - RegisterMethod(@TIBSQL.FREEHANDLE, 'FreeHandle'); - RegisterMethod(@TIBSQL.NEXT, 'Next'); - RegisterMethod(@TIBSQL.PREPARE, 'Prepare'); - RegisterMethod(@TIBSQL.GETUNIQUERELATIONNAME, 'GetUniqueRelationName'); - RegisterMethod(@TIBSQL.PARAMBYNAME, 'ParamByName'); - RegisterPropertyHelper(@TIBSQLBOF_R,nil,'BOF'); - RegisterPropertyHelper(@TIBSQLDBHANDLE_R,nil,'DBHandle'); - RegisterPropertyHelper(@TIBSQLEOF_R,nil,'EOF'); - RegisterPropertyHelper(@TIBSQLFIELDS_R,nil,'Fields'); - RegisterPropertyHelper(@TIBSQLFIELDINDEX_R,nil,'FieldIndex'); - RegisterPropertyHelper(@TIBSQLOPEN_R,nil,'Open'); - RegisterPropertyHelper(@TIBSQLPARAMS_R,nil,'Params'); - RegisterPropertyHelper(@TIBSQLPLAN_R,nil,'Plan'); - RegisterPropertyHelper(@TIBSQLPREPARED_R,nil,'Prepared'); - RegisterPropertyHelper(@TIBSQLRECORDCOUNT_R,nil,'RecordCount'); - RegisterPropertyHelper(@TIBSQLROWSAFFECTED_R,nil,'RowsAffected'); - RegisterPropertyHelper(@TIBSQLSQLTYPE_R,nil,'SqlType'); - RegisterPropertyHelper(@TIBSQLTRHANDLE_R,nil,'TRHandle'); - RegisterPropertyHelper(@TIBSQLHANDLE_R,nil,'Handle'); - RegisterPropertyHelper(@TIBSQLGENERATEPARAMNAMES_R,@TIBSQLGENERATEPARAMNAMES_W,'GenerateParamNames'); - RegisterPropertyHelper(@TIBSQLUNIQUERELATIONNAME_R,nil,'UniqueRelationName'); - RegisterPropertyHelper(@TIBSQLDATABASE_R,@TIBSQLDATABASE_W,'Database'); - RegisterPropertyHelper(@TIBSQLGOTOFIRSTRECORDONEXECUTE_R,@TIBSQLGOTOFIRSTRECORDONEXECUTE_W,'GoToFirstRecordOnExecute'); - RegisterPropertyHelper(@TIBSQLPARAMCHECK_R,@TIBSQLPARAMCHECK_W,'ParamCheck'); - RegisterPropertyHelper(@TIBSQLSQL_R,@TIBSQLSQL_W,'SQL'); - RegisterPropertyHelper(@TIBSQLTRANSACTION_R,@TIBSQLTRANSACTION_W,'Transaction'); - RegisterEventPropertyHelper(@TIBSQLONSQLCHANGING_R,@TIBSQLONSQLCHANGING_W,'OnSQLChanging'); - end; -end; - -(*----------------------------------------------------------------------------*) -procedure RIRegister_TIBOUTPUTXML(CL: TPSRuntimeClassImporter); -begin - with CL.Add(TIBOUTPUTXML) do - begin - RegisterMethod(@TIBOUTPUTXML.WRITEXML, 'WriteXML'); - RegisterPropertyHelper(@TIBOUTPUTXMLHEADERTAG_R,@TIBOUTPUTXMLHEADERTAG_W,'HeaderTag'); - RegisterPropertyHelper(@TIBOUTPUTXMLDATABASETAG_R,@TIBOUTPUTXMLDATABASETAG_W,'DatabaseTag'); - RegisterPropertyHelper(@TIBOUTPUTXMLSTREAM_R,@TIBOUTPUTXMLSTREAM_W,'Stream'); - RegisterPropertyHelper(@TIBOUTPUTXMLTABLETAG_R,@TIBOUTPUTXMLTABLETAG_W,'TableTag'); - RegisterPropertyHelper(@TIBOUTPUTXMLROWTAG_R,@TIBOUTPUTXMLROWTAG_W,'RowTag'); - RegisterPropertyHelper(@TIBOUTPUTXMLFLAGS_R,@TIBOUTPUTXMLFLAGS_W,'Flags'); - end; -end; - -(*----------------------------------------------------------------------------*) -procedure RIRegister_TIBINPUTRAWFILE(CL: TPSRuntimeClassImporter); -begin - with CL.Add(TIBINPUTRAWFILE) do - begin - end; -end; - -(*----------------------------------------------------------------------------*) -procedure RIRegister_TIBOUTPUTRAWFILE(CL: TPSRuntimeClassImporter); -begin - with CL.Add(TIBOUTPUTRAWFILE) do - begin - end; -end; - -(*----------------------------------------------------------------------------*) -procedure RIRegister_TIBINPUTDELIMITEDFILE(CL: TPSRuntimeClassImporter); -begin - with CL.Add(TIBINPUTDELIMITEDFILE) do - begin - RegisterMethod(@TIBINPUTDELIMITEDFILE.GETCOLUMN, 'GetColumn'); - RegisterPropertyHelper(@TIBINPUTDELIMITEDFILECOLDELIMITER_R,@TIBINPUTDELIMITEDFILECOLDELIMITER_W,'ColDelimiter'); - RegisterPropertyHelper(@TIBINPUTDELIMITEDFILEREADBLANKSASNULL_R,@TIBINPUTDELIMITEDFILEREADBLANKSASNULL_W,'ReadBlanksAsNull'); - RegisterPropertyHelper(@TIBINPUTDELIMITEDFILEROWDELIMITER_R,@TIBINPUTDELIMITEDFILEROWDELIMITER_W,'RowDelimiter'); - RegisterPropertyHelper(@TIBINPUTDELIMITEDFILESKIPTITLES_R,@TIBINPUTDELIMITEDFILESKIPTITLES_W,'SkipTitles'); - end; -end; - -(*----------------------------------------------------------------------------*) -procedure RIRegister_TIBOUTPUTDELIMITEDFILE(CL: TPSRuntimeClassImporter); -begin - with CL.Add(TIBOUTPUTDELIMITEDFILE) do - begin - RegisterPropertyHelper(@TIBOUTPUTDELIMITEDFILECOLDELIMITER_R,@TIBOUTPUTDELIMITEDFILECOLDELIMITER_W,'ColDelimiter'); - RegisterPropertyHelper(@TIBOUTPUTDELIMITEDFILEOUTPUTTITLES_R,@TIBOUTPUTDELIMITEDFILEOUTPUTTITLES_W,'OutputTitles'); - RegisterPropertyHelper(@TIBOUTPUTDELIMITEDFILEROWDELIMITER_R,@TIBOUTPUTDELIMITEDFILEROWDELIMITER_W,'RowDelimiter'); - end; -end; - - -(*----------------------------------------------------------------------------*) -procedure RIRegister_TIBXSQLDA(CL: TPSRuntimeClassImporter); -begin - with CL.Add(TIBXSQLDA) do - begin - RegisterConstructor(@TIBXSQLDA.CREATE, 'Create'); - RegisterMethod(@TIBXSQLDA.ADDNAME, 'AddName'); - RegisterMethod(@TIBXSQLDA.BYNAME, 'ByName'); - RegisterPropertyHelper(@TIBXSQLDAASXSQLDA_R,nil,'AsXSQLDA'); - RegisterPropertyHelper(@TIBXSQLDACOUNT_R,@TIBXSQLDACOUNT_W,'Count'); - RegisterPropertyHelper(@TIBXSQLDAMODIFIED_R,nil,'Modified'); - RegisterPropertyHelper(@TIBXSQLDANAMES_R,nil,'Names'); - RegisterPropertyHelper(@TIBXSQLDARECORDSIZE_R,nil,'RecordSize'); - RegisterPropertyHelper(@TIBXSQLDAVARS_R,nil,'Vars'); - RegisterPropertyHelper(@TIBXSQLDAUNIQUERELATIONNAME_R,nil,'UniqueRelationName'); - end; -end; - -(*----------------------------------------------------------------------------*) procedure RIRegister_TIBXSQLVAR(CL: TPSRuntimeClassImporter); begin with CL.Add(TIBXSQLVAR) do @@ -1976,6 +3587,33 @@ begin end; end; +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +(* === run-time registration functions === *) + +(*----------------------------------------------------------------------------*) +procedure RIRegister_IBSQL_Routines(S: TIFPSExec); +begin + S.RegisterDelphiFunction(@OUTPUTXML, 'OutputXML', cdRegister); +end; + +(*----------------------------------------------------------------------------*) +procedure RIRegister_TIBINPUTRAWFILE(CL: TPSRuntimeClassImporter); +begin + with CL.Add(TIBINPUTRAWFILE) do + begin + end; +end; + +(*----------------------------------------------------------------------------*) +procedure RIRegister_TIBOUTPUTRAWFILE(CL: TPSRuntimeClassImporter); +begin + with CL.Add(TIBOUTPUTRAWFILE) do + begin + end; +end; + (*----------------------------------------------------------------------------*) procedure RIRegister_IBSQL(CL: TPSRuntimeClassImporter); begin @@ -2022,8 +3660,105 @@ begin SIRegister_TIBQuery(CL); end; -(* === run-time registration functions === *) -(*----------------------------------------------------------------------------*) +{$IFDEF DELPHI10UP}{$REGION 'TIBQuery'}{$ENDIF} +{$IFDEF class_helper_present} +type + TIBQuery_PSHelper = class helper for TIBQuery + public + procedure DataSource_R(var T: TDatasource); + procedure DataSource_W(const T: TDatasource); + procedure GenerateParamNames_R(var T: Boolean); + procedure GenerateParamNames_W(const T: Boolean); + procedure ParamCount_R(var T: Word); + procedure Params_R(var T: TParams); + procedure Params_W(const T: TParams); + procedure Prepared_R(var T: Boolean); + procedure Prepared_W(const T: Boolean); + procedure RowsAffected_R(var T: Integer); + procedure SQL_R(var T: TStrings); + procedure SQL_W(const T: TStrings); + procedure StmtHandle_R(var T: TISC_STMT_HANDLE); + procedure Text_R(var T: string); + end; + +procedure TIBQuery_PSHelper.Params_W(const T: TParams); +begin Self.Params := T; end; + +procedure TIBQuery_PSHelper.Params_R(var T: TParams); +begin T := Self.Params; end; + + +procedure TIBQuery_PSHelper.SQL_W(const T: TStrings); +begin Self.SQL := T; end; + + +procedure TIBQuery_PSHelper.SQL_R(var T: TStrings); +begin T := Self.SQL; end; + + +procedure TIBQuery_PSHelper.DataSource_W(const T: TDatasource); +begin Self.DataSource := T; end; + + +procedure TIBQuery_PSHelper.DataSource_R(var T: TDatasource); +begin T := Self.DataSource; end; + + +procedure TIBQuery_PSHelper.GenerateParamNames_W(const T: Boolean); +begin Self.GenerateParamNames := T; end; + + +procedure TIBQuery_PSHelper.GenerateParamNames_R(var T: Boolean); +begin T := Self.GenerateParamNames; end; + + +procedure TIBQuery_PSHelper.RowsAffected_R(var T: Integer); +begin T := Self.RowsAffected; end; + + +procedure TIBQuery_PSHelper.Text_R(var T: string); +begin T := Self.Text; end; + + +procedure TIBQuery_PSHelper.StmtHandle_R(var T: TISC_STMT_HANDLE); +begin T := Self.StmtHandle; end; + + +procedure TIBQuery_PSHelper.ParamCount_R(var T: Word); +begin T := Self.ParamCount; end; + + +procedure TIBQuery_PSHelper.Prepared_W(const T: Boolean); +begin Self.Prepared := T; end; + + +procedure TIBQuery_PSHelper.Prepared_R(var T: Boolean); +begin T := Self.Prepared; end; + + +procedure RIRegister_TIBQuery(CL: TPSRuntimeClassImporter); +begin + with CL.Add(TIBQuery) do + begin + RegisterMethod(@TIBQuery.BatchInput, 'BatchInput'); + RegisterMethod(@TIBQuery.BatchOutput, 'BatchOutput'); + RegisterMethod(@TIBQuery.ExecSQL, 'ExecSQL'); + RegisterMethod(@TIBQuery.ParamByName, 'ParamByName'); + RegisterMethod(@TIBQuery.Prepare, 'Prepare'); + RegisterMethod(@TIBQuery.UnPrepare, 'UnPrepare'); + RegisterPropertyHelper(@TIBQuery.Prepared_R,@TIBQuery.Prepared_W,'Prepared'); + RegisterPropertyHelper(@TIBQuery.ParamCount_R,nil,'ParamCount'); + RegisterPropertyHelper(@TIBQuery.StmtHandle_R,nil,'StmtHandle'); + RegisterPropertyHelper(@TIBQuery.Text_R,nil,'Text'); + RegisterPropertyHelper(@TIBQuery.RowsAffected_R,nil,'RowsAffected'); + RegisterPropertyHelper(@TIBQuery.GenerateParamNames_R,@TIBQuery.GenerateParamNames_W,'GenerateParamNames'); + RegisterPropertyHelper(@TIBQuery.DataSource_R,@TIBQuery.DataSource_W,'DataSource'); + RegisterPropertyHelper(@TIBQuery.SQL_R,@TIBQuery.SQL_W,'SQL'); + RegisterPropertyHelper(@TIBQuery.Params_R,@TIBQuery.Params_W,'Params'); + end; +end; + +{$ELSE} procedure TIBQueryParams_W(Self: TIBQuery; const T: TParams); begin Self.Params := T; end; @@ -2102,14 +3837,17 @@ begin end; end; +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +(* === run-time registration functions === *) + (*----------------------------------------------------------------------------*) procedure RIRegister_IBQuery(CL: TPSRuntimeClassImporter); begin RIRegister_TIBQuery(CL); end; - - { TIFPS3CE_IBCustomDataSet } (*----------------------------------------------------------------------------*) procedure TPSImport_IBX.CompOnUses(CompExec: TPSScript); diff --git a/Source/ThirdParty/uPSI_JvMail.pas b/Source/ThirdParty/uPSI_JvMail.pas index 4262d21..832e0b5 100644 --- a/Source/ThirdParty/uPSI_JvMail.pas +++ b/Source/ThirdParty/uPSI_JvMail.pas @@ -6,6 +6,12 @@ Source Code from Carlo Kok has been used to implement various sections of UnitParser. Components of ifps3 are used in the construction of UnitParser, code implementing the class wrapper is taken from Carlo Kok''s conv unility } + +{$IFDEF MSWINDOWS} +{$I ..\PascalScript.inc} +{$ELSE} +{$I ../PascalScript.inc} +{$ENDIF} interface uses @@ -120,7 +126,188 @@ begin end; (* === run-time registration functions === *) -(*----------------------------------------------------------------------------*) +{$IFDEF DELPHI10UP}{$REGION 'TJvMail'}{$ENDIF} +{$IFDEF class_helper_present} +type + TJvMail_PSHelper = class helper for TJvMail + public + procedure Attachment_R(var T: TStrings); + procedure Attachment_W(const T: TStrings); + procedure BlindCopy_R(var T: TJvMailRecipients); + procedure BlindCopy_W(const T: TJvMailRecipients); + procedure Body_R(var T: TStrings); + procedure Body_W(const T: TStrings); + procedure CarbonCopy_R(var T: TJvMailRecipients); + procedure CarbonCopy_W(const T: TJvMailRecipients); + procedure LogonOptions_R(var T: TJvMailLogonOptions); + procedure LogonOptions_W(const T: TJvMailLogonOptions); + procedure LongMsgId_R(var T: Boolean); + procedure LongMsgId_W(const T: Boolean); + procedure Password_R(var T: string); + procedure Password_W(const T: string); + procedure ProfileName_R(var T: string); + procedure ProfileName_W(const T: string); + procedure ReadedMail_R(var T: TJvMailReadedData); + procedure ReadOptions_R(var T: TJvMailReadOptions); + procedure ReadOptions_W(const T: TJvMailReadOptions); + procedure Recipient_R(var T: TJvMailRecipients); + procedure Recipient_W(const T: TJvMailRecipients); + procedure SeedMessageID_R(var T: string); + procedure SeedMessageID_W(const T: string); + procedure SessionHandle_R(var T: THandle); + procedure SimpleMAPI_R(var T: TJclSimpleMapi); + procedure Subject_R(var T: string); + procedure Subject_W(const T: string); + procedure UserLogged_R(var T: Boolean); + end; + +procedure TJvMail_PSHelper.Subject_W(const T: string); +begin Self.Subject := T; end; + + +procedure TJvMail_PSHelper.Subject_R(var T: string); +begin T := Self.Subject; end; + + +procedure TJvMail_PSHelper.Recipient_W(const T: TJvMailRecipients); +begin Self.Recipient := T; end; + + +procedure TJvMail_PSHelper.Recipient_R(var T: TJvMailRecipients); +begin T := Self.Recipient; end; + + +procedure TJvMail_PSHelper.ReadOptions_W(const T: TJvMailReadOptions); +begin Self.ReadOptions := T; end; + + +procedure TJvMail_PSHelper.ReadOptions_R(var T: TJvMailReadOptions); +begin T := Self.ReadOptions; end; + + +procedure TJvMail_PSHelper.ProfileName_W(const T: string); +begin Self.ProfileName := T; end; + + +procedure TJvMail_PSHelper.ProfileName_R(var T: string); +begin T := Self.ProfileName; end; + + +procedure TJvMail_PSHelper.Password_W(const T: string); +begin Self.Password := T; end; + + +procedure TJvMail_PSHelper.Password_R(var T: string); +begin T := Self.Password; end; + + +procedure TJvMail_PSHelper.LongMsgId_W(const T: Boolean); +begin Self.LongMsgId := T; end; + + +procedure TJvMail_PSHelper.LongMsgId_R(var T: Boolean); +begin T := Self.LongMsgId; end; + + +procedure TJvMail_PSHelper.LogonOptions_W(const T: TJvMailLogonOptions); +begin Self.LogonOptions := T; end; + + +procedure TJvMail_PSHelper.LogonOptions_R(var T: TJvMailLogonOptions); +begin T := Self.LogonOptions; end; + + +procedure TJvMail_PSHelper.CarbonCopy_W(const T: TJvMailRecipients); +begin Self.CarbonCopy := T; end; + + +procedure TJvMail_PSHelper.CarbonCopy_R(var T: TJvMailRecipients); +begin T := Self.CarbonCopy; end; + + +procedure TJvMail_PSHelper.Body_W(const T: TStrings); +begin Self.Body := T; end; + + +procedure TJvMail_PSHelper.Body_R(var T: TStrings); +begin T := Self.Body; end; + + +procedure TJvMail_PSHelper.BlindCopy_W(const T: TJvMailRecipients); +begin Self.BlindCopy := T; end; + + +procedure TJvMail_PSHelper.BlindCopy_R(var T: TJvMailRecipients); +begin T := Self.BlindCopy; end; + + +procedure TJvMail_PSHelper.Attachment_W(const T: TStrings); +begin Self.Attachment := T; end; + + +procedure TJvMail_PSHelper.Attachment_R(var T: TStrings); +begin T := Self.Attachment; end; + + +procedure TJvMail_PSHelper.UserLogged_R(var T: Boolean); +begin T := Self.UserLogged; end; + + +procedure TJvMail_PSHelper.SimpleMAPI_R(var T: TJclSimpleMapi); +begin T := Self.SimpleMAPI; end; + + +procedure TJvMail_PSHelper.SessionHandle_R(var T: THandle); +begin T := Self.SessionHandle; end; + + +procedure TJvMail_PSHelper.SeedMessageID_W(const T: string); +begin Self.SeedMessageID := T; end; + + +procedure TJvMail_PSHelper.SeedMessageID_R(var T: string); +begin T := Self.SeedMessageID; end; + + +procedure TJvMail_PSHelper.ReadedMail_R(var T: TJvMailReadedData); +begin T := Self.ReadedMail; end; + +procedure RIRegister_TJvMail(CL: TPSRuntimeClassImporter); +begin + with CL.Add(TJvMail) do + begin + RegisterMethod(@TJvMail.Address, 'Address'); + RegisterMethod(@TJvMail.Clear, 'Clear'); + RegisterMethod(@TJvMail.ErrorCheck, 'ErrorCheck'); + RegisterMethod(@TJvMail.FindFirstMail, 'FindFirstMail'); + RegisterMethod(@TJvMail.FindNextMail, 'FindNextMail'); + RegisterMethod(@TJvMail.FreeSimpleMapi, 'FreeSimpleMapi'); + RegisterMethod(@TJvMail.LogOff, 'LogOff'); + RegisterMethod(@TJvMail.LogOn, 'LogOn'); + RegisterMethod(@TJvMail.ReadMail, 'ReadMail'); + RegisterMethod(@TJvMail.ResolveName, 'ResolveName'); + RegisterMethod(@TJvMail.SaveMail, 'SaveMail'); + RegisterMethod(@TJvMail.SendMail, 'SendMail'); + RegisterPropertyHelper(@TJvMail.ReadedMail_R,nil,'ReadedMail'); + RegisterPropertyHelper(@TJvMail.SeedMessageID_R,@TJvMail.SeedMessageID_W,'SeedMessageID'); + RegisterPropertyHelper(@TJvMail.SessionHandle_R,nil,'SessionHandle'); + RegisterPropertyHelper(@TJvMail.SimpleMAPI_R,nil,'SimpleMAPI'); + RegisterPropertyHelper(@TJvMail.UserLogged_R,nil,'UserLogged'); + RegisterPropertyHelper(@TJvMail.Attachment_R,@TJvMail.Attachment_W,'Attachment'); + RegisterPropertyHelper(@TJvMail.BlindCopy_R,@TJvMail.BlindCopy_W,'BlindCopy'); + RegisterPropertyHelper(@TJvMail.Body_R,@TJvMail.Body_W,'Body'); + RegisterPropertyHelper(@TJvMail.CarbonCopy_R,@TJvMail.CarbonCopy_W,'CarbonCopy'); + RegisterPropertyHelper(@TJvMail.LogonOptions_R,@TJvMail.LogonOptions_W,'LogonOptions'); + RegisterPropertyHelper(@TJvMail.LongMsgId_R,@TJvMail.LongMsgId_W,'LongMsgId'); + RegisterPropertyHelper(@TJvMail.Password_R,@TJvMail.Password_W,'Password'); + RegisterPropertyHelper(@TJvMail.ProfileName_R,@TJvMail.ProfileName_W,'ProfileName'); + RegisterPropertyHelper(@TJvMail.ReadOptions_R,@TJvMail.ReadOptions_W,'ReadOptions'); + RegisterPropertyHelper(@TJvMail.Recipient_R,@TJvMail.Recipient_W,'Recipient'); + RegisterPropertyHelper(@TJvMail.Subject_R,@TJvMail.Subject_W,'Subject'); + end; +end; + +{$ELSE} procedure TJvMailSubject_W(Self: TJvMail; const T: string); begin Self.Subject := T; end; @@ -232,43 +419,6 @@ begin T := Self.SeedMessageID; end; procedure TJvMailReadedMail_R(Self: TJvMail; var T: TJvMailReadedData); begin T := Self.ReadedMail; end; -(*----------------------------------------------------------------------------*) -procedure TJvMailRecipientsRecipientClass_R(Self: TJvMailRecipients; var T: DWORD); -begin T := Self.RecipientClass; end; - -(*----------------------------------------------------------------------------*) -procedure TJvMailRecipientsItems_W(Self: TJvMailRecipients; const T: TJvMailRecipient; const t1: Integer); -begin Self.Items[t1] := T; end; - -(*----------------------------------------------------------------------------*) -procedure TJvMailRecipientsItems_R(Self: TJvMailRecipients; var T: TJvMailRecipient; const t1: Integer); -begin T := Self.Items[t1]; end; - -(*----------------------------------------------------------------------------*) -procedure TJvMailRecipientValid_R(Self: TJvMailRecipient; var T: Boolean); -begin T := Self.Valid; end; - -(*----------------------------------------------------------------------------*) -procedure TJvMailRecipientName_W(Self: TJvMailRecipient; const T: string); -begin Self.Name := T; end; - -(*----------------------------------------------------------------------------*) -procedure TJvMailRecipientName_R(Self: TJvMailRecipient; var T: string); -begin T := Self.Name; end; - -(*----------------------------------------------------------------------------*) -procedure TJvMailRecipientAddress_W(Self: TJvMailRecipient; const T: string); -begin Self.Address := T; end; - -(*----------------------------------------------------------------------------*) -procedure TJvMailRecipientAddress_R(Self: TJvMailRecipient; var T: string); -begin T := Self.Address; end; - -(*----------------------------------------------------------------------------*) -procedure TJvMailRecipientAddressAndName_R(Self: TJvMailRecipient; var T: string); -begin T := Self.AddressAndName; end; - -(*----------------------------------------------------------------------------*) procedure RIRegister_TJvMail(CL: TPSRuntimeClassImporter); begin with CL.Add(TJvMail) do @@ -304,7 +454,55 @@ begin end; end; +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TJvMailRecipients'}{$ENDIF} +{$IFDEF class_helper_present} +type + TJvMailRecipients_PSHelper = class helper for TJvMailRecipients + public + procedure Items_R(var T: TJvMailRecipient; const t1: Integer); + procedure Items_W(const T: TJvMailRecipient; const t1: Integer); + procedure RecipientClass_R(var T: DWORD); + end; + +procedure TJvMailRecipients_PSHelper.RecipientClass_R(var T: DWORD); +begin T := Self.RecipientClass; end; + + +procedure TJvMailRecipients_PSHelper.Items_W(const T: TJvMailRecipient; const t1: Integer); +begin Self.Items[t1] := T; end; + + +procedure TJvMailRecipients_PSHelper.Items_R(var T: TJvMailRecipient; const t1: Integer); +begin T := Self.Items[t1]; end; + +procedure RIRegister_TJvMailRecipients(CL: TPSRuntimeClassImporter); +begin + with CL.Add(TJvMailRecipients) do + begin + RegisterConstructor(@TJvMailRecipients.Create, 'Create'); + RegisterMethod(@TJvMailRecipients.Add, 'Add'); + RegisterMethod(@TJvMailRecipients.AddRecipient, 'AddRecipient'); + RegisterPropertyHelper(@TJvMailRecipients.Items_R,@TJvMailRecipients.Items_W,'Items'); + RegisterPropertyHelper(@TJvMailRecipients.RecipientClass_R,nil,'RecipientClass'); + end; +end; + +{$ELSE} (*----------------------------------------------------------------------------*) +procedure TJvMailRecipientsRecipientClass_R(Self: TJvMailRecipients; var T: DWORD); +begin T := Self.RecipientClass; end; + +(*----------------------------------------------------------------------------*) +procedure TJvMailRecipientsItems_W(Self: TJvMailRecipients; const T: TJvMailRecipient; const t1: Integer); +begin Self.Items[t1] := T; end; + +(*----------------------------------------------------------------------------*) +procedure TJvMailRecipientsItems_R(Self: TJvMailRecipients; var T: TJvMailRecipient; const t1: Integer); +begin T := Self.Items[t1]; end; + procedure RIRegister_TJvMailRecipients(CL: TPSRuntimeClassImporter); begin with CL.Add(TJvMailRecipients) do @@ -317,7 +515,80 @@ begin end; end; +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TJvMailRecipient'}{$ENDIF} +{$IFDEF class_helper_present} +type + TJvMailRecipient_PSHelper = class helper for TJvMailRecipient + public + procedure Address_R(var T: string); + procedure Address_W(const T: string); + procedure Name_R(var T: string); + procedure Name_W(const T: string); + procedure Valid_R(var T: Boolean); + end; + +procedure TJvMailRecipient_PSHelper.Valid_R(var T: Boolean); +begin T := Self.Valid; end; + + +procedure TJvMailRecipient_PSHelper.Name_W(const T: string); +begin Self.Name := T; end; + + +procedure TJvMailRecipient_PSHelper.Name_R(var T: string); +begin T := Self.Name; end; + + +procedure TJvMailRecipient_PSHelper.Address_W(const T: string); +begin Self.Address := T; end; + + +procedure TJvMailRecipient_PSHelper.Address_R(var T: string); +begin T := Self.Address; end; + + +procedure TJvMailRecipientAddressAndName_R(Self: TJvMailRecipient; var T: string); +begin T := Self.AddressAndName; end; + +procedure RIRegister_TJvMailRecipient(CL: TPSRuntimeClassImporter); +begin + with CL.Add(TJvMailRecipient) do + begin + RegisterPropertyHelper(@TJvMailRecipient.AddressAndName_R,nil,'AddressAndName'); + RegisterPropertyHelper(@TJvMailRecipient.Address_R,@TJvMailRecipient.Address_W,'Address'); + RegisterPropertyHelper(@TJvMailRecipient.Name_R,@TJvMailRecipient.Name_W,'Name'); + RegisterPropertyHelper(@TJvMailRecipient.Valid_R,nil,'Valid'); + end; +end; + +{$ELSE} (*----------------------------------------------------------------------------*) +procedure TJvMailRecipientValid_R(Self: TJvMailRecipient; var T: Boolean); +begin T := Self.Valid; end; + +(*----------------------------------------------------------------------------*) +procedure TJvMailRecipientName_W(Self: TJvMailRecipient; const T: string); +begin Self.Name := T; end; + +(*----------------------------------------------------------------------------*) +procedure TJvMailRecipientName_R(Self: TJvMailRecipient; var T: string); +begin T := Self.Name; end; + +(*----------------------------------------------------------------------------*) +procedure TJvMailRecipientAddress_W(Self: TJvMailRecipient; const T: string); +begin Self.Address := T; end; + +(*----------------------------------------------------------------------------*) +procedure TJvMailRecipientAddress_R(Self: TJvMailRecipient; var T: string); +begin T := Self.Address; end; + +(*----------------------------------------------------------------------------*) +procedure TJvMailRecipientAddressAndName_R(Self: TJvMailRecipient; var T: string); +begin T := Self.AddressAndName; end; + procedure RIRegister_TJvMailRecipient(CL: TPSRuntimeClassImporter); begin with CL.Add(TJvMailRecipient) do @@ -329,6 +600,9 @@ begin end; end; +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + (*----------------------------------------------------------------------------*) procedure RIRegister_JvMail(CL: TPSRuntimeClassImporter); begin diff --git a/Source/ThirdParty/uPSI_Mask.pas b/Source/ThirdParty/uPSI_Mask.pas index 6b15f80..f9a6024 100644 --- a/Source/ThirdParty/uPSI_Mask.pas +++ b/Source/ThirdParty/uPSI_Mask.pas @@ -6,6 +6,13 @@ Source Code from Carlo Kok has been used to implement various sections of UnitParser. Components of ifps3 are used in the construction of UnitParser, code implementing the class wrapper is taken from Carlo Kok''s conv unility } + +{$IFDEF MSWINDOWS} +{$I ..\PascalScript.inc} +{$ELSE} +{$I ../PascalScript.inc} +{$ENDIF} + interface uses @@ -91,6 +98,51 @@ begin end; (* === run-time registration functions === *) +{$IFDEF DELPHI10UP}{$REGION 'TCustomMaskEdit'}{$ENDIF} +{$IFDEF class_helper_present} +type + TCustomMaskEdit_PSHelper = class helper for TCustomMaskEdit + public + procedure EditText_R(var T: string); + procedure EditText_W(const T: string); + procedure IsMasked_R(var T: Boolean); + procedure Text_R(var T: string); + procedure Text_W(const T: string); + end; + +(*----------------------------------------------------------------------------*) +procedure TCustomMaskEdit_PSHelper.Text_W(const T: string); +begin Self.Text := T; end; + +(*----------------------------------------------------------------------------*) +procedure TCustomMaskEdit_PSHelper.Text_R(var T: string); +begin T := Self.Text; end; + +(*----------------------------------------------------------------------------*) +procedure TCustomMaskEdit_PSHelper.EditText_W(const T: string); +begin Self.EditText := T; end; + +(*----------------------------------------------------------------------------*) +procedure TCustomMaskEdit_PSHelper.EditText_R(var T: string); +begin T := Self.EditText; end; + +(*----------------------------------------------------------------------------*) +procedure TCustomMaskEdit_PSHelper.IsMasked_R(var T: Boolean); +begin T := Self.IsMasked; end; + +procedure RIRegister_TCustomMaskEdit(CL: TPSRuntimeClassImporter); +begin + with CL.Add(TCustomMaskEdit) do + begin + RegisterVirtualMethod(@TCustomMaskEdit.ValidateEdit, 'ValidateEdit'); + RegisterMethod(@TCustomMaskEdit.GetTextLen, 'GetTextLen'); + RegisterPropertyHelper(@TCustomMaskEdit.IsMasked_R,nil,'IsMasked'); + RegisterPropertyHelper(@TCustomMaskEdit.EditText_R,@TCustomMaskEdit.EditText_W,'EditText'); + RegisterPropertyHelper(@TCustomMaskEdit.Text_R,@TCustomMaskEdit.Text_W,'Text'); + end; +end; + +{$ELSE} (*----------------------------------------------------------------------------*) procedure TCustomMaskEditText_W(Self: TCustomMaskEdit; const T: string); begin Self.Text := T; end; @@ -111,6 +163,22 @@ begin T := Self.EditText; end; procedure TCustomMaskEditIsMasked_R(Self: TCustomMaskEdit; var T: Boolean); begin T := Self.IsMasked; end; +procedure RIRegister_TCustomMaskEdit(CL: TPSRuntimeClassImporter); +begin + with CL.Add(TCustomMaskEdit) do + begin + RegisterVirtualMethod(@TCustomMaskEdit.ValidateEdit, 'ValidateEdit'); + RegisterMethod(@TCustomMaskEdit.GetTextLen, 'GetTextLen'); + RegisterPropertyHelper(@TCustomMaskEditIsMasked_R,nil,'IsMasked'); + RegisterPropertyHelper(@TCustomMaskEditEditText_R,@TCustomMaskEditEditText_W,'EditText'); + RegisterPropertyHelper(@TCustomMaskEditText_R,@TCustomMaskEditText_W,'Text'); + end; +end; + +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + + (*----------------------------------------------------------------------------*) procedure RIRegister_Mask_Routines(S: TPSExec); begin @@ -129,17 +197,6 @@ begin end; (*----------------------------------------------------------------------------*) -procedure RIRegister_TCustomMaskEdit(CL: TPSRuntimeClassImporter); -begin - with CL.Add(TCustomMaskEdit) do - begin - RegisterVirtualMethod(@TCustomMaskEdit.ValidateEdit, 'ValidateEdit'); - RegisterMethod(@TCustomMaskEdit.GetTextLen, 'GetTextLen'); - RegisterPropertyHelper(@TCustomMaskEditIsMasked_R,nil,'IsMasked'); - RegisterPropertyHelper(@TCustomMaskEditEditText_R,@TCustomMaskEditEditText_W,'EditText'); - RegisterPropertyHelper(@TCustomMaskEditText_R,@TCustomMaskEditText_W,'Text'); - end; -end; (*----------------------------------------------------------------------------*) procedure RIRegister_Mask(CL: TPSRuntimeClassImporter); diff --git a/Source/ThirdParty/uPSI_Registry.pas b/Source/ThirdParty/uPSI_Registry.pas index dceea45..6763366 100644 --- a/Source/ThirdParty/uPSI_Registry.pas +++ b/Source/ThirdParty/uPSI_Registry.pas @@ -7,6 +7,12 @@ UnitParser. Components of ifps3 are used in the construction of UnitParser, code implementing the class wrapper is taken from Carlo Kok''s conv unility } +{$IFDEF MSWINDOWS} +{$I ..\PascalScript.inc} +{$ELSE} +{$I ../PascalScript.inc} +{$ENDIF} + interface uses @@ -132,6 +138,38 @@ begin end; (* === run-time registration functions === *) +{$IFDEF DELPHI10UP}{$REGION 'TRegistryIniFile'}{$ENDIF} +{$IFDEF class_helper_present} +type + TRegistryIniFile_PSHelper = class helper for TRegistryIniFile + public + Function Create_P(CreateNewInstance: Boolean; const FileName : string):TObject; + Function CreateA_P(CreateNewInstance: Boolean; const FileName : string; AAccess : LongWord):TObject; + procedure RegIniFile_R(var T: TRegIniFile); + end; +(*----------------------------------------------------------------------------*) +procedure TRegistryIniFile_PSHelper.RegIniFile_R(var T: TRegIniFile); +begin T := Self.RegIniFile; end; + +(*----------------------------------------------------------------------------*) +Function TRegistryIniFile_PSHelper.CreateA_P(CreateNewInstance: Boolean; const FileName : string; AAccess : LongWord):TObject; +Begin Result := TRegistryIniFile.Create(FileName, AAccess); END; + +(*----------------------------------------------------------------------------*) +Function TRegistryIniFile_PSHelper.Create_P(CreateNewInstance: Boolean; const FileName : string):TObject; +Begin Result := TRegistryIniFile.Create(FileName); END; + +procedure RIRegister_TRegistryIniFile(CL: TPSRuntimeClassImporter); +begin + with CL.Add(TRegistryIniFile) do + begin + RegisterConstructor(@TRegistryIniFile.Create_P, 'Create'); + RegisterConstructor(@TRegistryIniFile.CreateA_P, 'CreateA'); + RegisterPropertyHelper(@TRegistryIniFile.RegIniFile_R,nil,'RegIniFile'); + end; +end; + +{$ELSE} (*----------------------------------------------------------------------------*) procedure TRegistryIniFileRegIniFile_R(Self: TRegistryIniFile; var T: TRegIniFile); begin T := Self.RegIniFile; end; @@ -144,6 +182,63 @@ Begin Result := TRegistryIniFile.Create(FileName, AAccess); END; Function TRegistryIniFileCreate_P(Self: TClass; CreateNewInstance: Boolean; const FileName : string):TObject; Begin Result := TRegistryIniFile.Create(FileName); END; +procedure RIRegister_TRegistryIniFile(CL: TPSRuntimeClassImporter); +begin + with CL.Add(TRegistryIniFile) do + begin + RegisterConstructor(@TRegistryIniFileCreate_P, 'Create'); + RegisterConstructor(@TRegistryIniFileCreateA_P, 'CreateA'); + RegisterPropertyHelper(@TRegistryIniFileRegIniFile_R,nil,'RegIniFile'); + end; +end; + +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TRegIniFile'}{$ENDIF} +{$IFDEF class_helper_present} +type + TRegIniFile_PSHelper = class helper for TRegIniFile + public + Function Create_P(CreateNewInstance: Boolean; const FileName : string):TObject; + Function CreateA_P(CreateNewInstance: Boolean; const FileName : string; AAccess : LongWord):TObject; + procedure FileName_R(var T: string); + end; + +(*----------------------------------------------------------------------------*) +procedure TRegIniFile_PSHelper.FileName_R(var T: string); +begin T := Self.FileName; end; + +(*----------------------------------------------------------------------------*) +Function TRegIniFile_PSHelper.CreateA_P(CreateNewInstance: Boolean; const FileName : string; AAccess : LongWord):TObject; +Begin Result := TRegIniFile.Create(FileName, AAccess); END; + +(*----------------------------------------------------------------------------*) +Function TRegIniFile_PSHelper.Create_P(CreateNewInstance: Boolean; const FileName : string):TObject; +Begin Result := TRegIniFile.Create(FileName); END; + +procedure RIRegister_TRegIniFile(CL: TPSRuntimeClassImporter); +begin + with CL.Add(TRegIniFile) do + begin + RegisterConstructor(@TRegIniFile.Create_P, 'Create'); + RegisterConstructor(@TRegIniFile.CreateA_P, 'CreateA'); + RegisterMethod(@TRegIniFile.ReadString, 'ReadString'); + RegisterMethod(@TRegIniFile.ReadInteger, 'ReadInteger'); + RegisterMethod(@TRegIniFile.WriteInteger, 'WriteInteger'); + RegisterMethod(@TRegIniFile.WriteString, 'WriteString'); + RegisterMethod(@TRegIniFile.ReadBool, 'ReadBool'); + RegisterMethod(@TRegIniFile.WriteBool, 'WriteBool'); + RegisterMethod(@TRegIniFile.ReadSection, 'ReadSection'); + RegisterMethod(@TRegIniFile.ReadSections, 'ReadSections'); + RegisterMethod(@TRegIniFile.ReadSectionValues, 'ReadSectionValues'); + RegisterMethod(@TRegIniFile.EraseSection, 'EraseSection'); + RegisterMethod(@TRegIniFile.DeleteKey, 'DeleteKey'); + RegisterPropertyHelper(@TRegIniFile.FileName_R,nil,'FileName'); + end; +end; + +{$ELSE} (*----------------------------------------------------------------------------*) procedure TRegIniFileFileName_R(Self: TRegIniFile; var T: string); begin T := Self.FileName; end; @@ -156,6 +251,143 @@ Begin Result := TRegIniFile.Create(FileName, AAccess); END; Function TRegIniFileCreate_P(Self: TClass; CreateNewInstance: Boolean; const FileName : string):TObject; Begin Result := TRegIniFile.Create(FileName); END; +procedure RIRegister_TRegIniFile(CL: TPSRuntimeClassImporter); +begin + with CL.Add(TRegIniFile) do + begin + RegisterConstructor(@TRegIniFileCreate_P, 'Create'); + RegisterConstructor(@TRegIniFileCreateA_P, 'CreateA'); + RegisterMethod(@TRegIniFile.ReadString, 'ReadString'); + RegisterMethod(@TRegIniFile.ReadInteger, 'ReadInteger'); + RegisterMethod(@TRegIniFile.WriteInteger, 'WriteInteger'); + RegisterMethod(@TRegIniFile.WriteString, 'WriteString'); + RegisterMethod(@TRegIniFile.ReadBool, 'ReadBool'); + RegisterMethod(@TRegIniFile.WriteBool, 'WriteBool'); + RegisterMethod(@TRegIniFile.ReadSection, 'ReadSection'); + RegisterMethod(@TRegIniFile.ReadSections, 'ReadSections'); + RegisterMethod(@TRegIniFile.ReadSectionValues, 'ReadSectionValues'); + RegisterMethod(@TRegIniFile.EraseSection, 'EraseSection'); + RegisterMethod(@TRegIniFile.DeleteKey, 'DeleteKey'); + RegisterPropertyHelper(@TRegIniFileFileName_R,nil,'FileName'); + end; +end; + +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TRegistry'}{$ENDIF} +{$IFDEF class_helper_present} +type + TRegistry_PSHelper = class helper for TRegistry + public + Function Create_P(CreateNewInstance: Boolean):TObject; + Function CreateA_P(CreateNewInstance: Boolean; AAccess : LongWord):TObject; + procedure Access_R(var T: LongWord); + procedure Access_W(const T: LongWord); + procedure CurrentKey_R(var T: HKEY); + procedure CurrentPath_R(var T: string); + procedure LazyWrite_R(var T: Boolean); + procedure LazyWrite_W(const T: Boolean); + procedure RootKey_R(var T: HKEY); + procedure RootKey_W(const T: HKEY); + end; + +(*----------------------------------------------------------------------------*) +procedure TRegistry_PSHelper.Access_W(const T: LongWord); +begin Self.Access := T; end; + +(*----------------------------------------------------------------------------*) +procedure TRegistry_PSHelper.Access_R(var T: LongWord); +begin T := Self.Access; end; + +(*----------------------------------------------------------------------------*) +procedure TRegistry_PSHelper.RootKey_W(const T: HKEY); +begin Self.RootKey := T; end; + +(*----------------------------------------------------------------------------*) +procedure TRegistry_PSHelper.RootKey_R(var T: HKEY); +begin T := Self.RootKey; end; + +(*----------------------------------------------------------------------------*) +procedure TRegistry_PSHelper.LazyWrite_W(const T: Boolean); +begin Self.LazyWrite := T; end; + +(*----------------------------------------------------------------------------*) +procedure TRegistry_PSHelper.LazyWrite_R(var T: Boolean); +begin T := Self.LazyWrite; end; + +(*----------------------------------------------------------------------------*) +procedure TRegistry_PSHelper.CurrentPath_R(var T: string); +begin T := Self.CurrentPath; end; + +(*----------------------------------------------------------------------------*) +procedure TRegistry_PSHelper.CurrentKey_R(var T: HKEY); +begin T := Self.CurrentKey; end; + +(*----------------------------------------------------------------------------*) +Function TRegistry_PSHelper.CreateA_P(CreateNewInstance: Boolean; AAccess : LongWord):TObject; +Begin Result := TRegistry.Create(AAccess); END; + +(*----------------------------------------------------------------------------*) +Function TRegistry_PSHelper.Create_P(CreateNewInstance: Boolean):TObject; +Begin Result := TRegistry.Create; END; + +(*----------------------------------------------------------------------------*) +procedure RIRegister_TRegistry(CL: TPSRuntimeClassImporter); +begin + with CL.Add(TRegistry) do + begin + RegisterConstructor(@TRegistry.CreateA_P, 'CreateA'); + RegisterConstructor(@TRegistry.Create_P, 'Create'); + RegisterMethod(@TRegistry.CloseKey, 'CloseKey'); + RegisterMethod(@TRegistry.CreateKey, 'CreateKey'); + RegisterMethod(@TRegistry.DeleteKey, 'DeleteKey'); + RegisterMethod(@TRegistry.DeleteValue, 'DeleteValue'); + RegisterMethod(@TRegistry.GetDataInfo, 'GetDataInfo'); + RegisterMethod(@TRegistry.GetDataSize, 'GetDataSize'); + RegisterMethod(@TRegistry.GetDataType, 'GetDataType'); + RegisterMethod(@TRegistry.GetKeyInfo, 'GetKeyInfo'); + RegisterMethod(@TRegistry.GetKeyNames, 'GetKeyNames'); + RegisterMethod(@TRegistry.GetValueNames, 'GetValueNames'); + RegisterMethod(@TRegistry.HasSubKeys, 'HasSubKeys'); + RegisterMethod(@TRegistry.KeyExists, 'KeyExists'); + RegisterMethod(@TRegistry.LoadKey, 'LoadKey'); + RegisterMethod(@TRegistry.MoveKey, 'MoveKey'); + RegisterMethod(@TRegistry.OpenKey, 'OpenKey'); + RegisterMethod(@TRegistry.OpenKeyReadOnly, 'OpenKeyReadOnly'); + RegisterMethod(@TRegistry.ReadCurrency, 'ReadCurrency'); + RegisterMethod(@TRegistry.ReadBool, 'ReadBool'); + RegisterMethod(@TRegistry.ReadDate, 'ReadDate'); + RegisterMethod(@TRegistry.ReadDateTime, 'ReadDateTime'); + RegisterMethod(@TRegistry.ReadFloat, 'ReadFloat'); + RegisterMethod(@TRegistry.ReadInteger, 'ReadInteger'); + RegisterMethod(@TRegistry.ReadString, 'ReadString'); + RegisterMethod(@TRegistry.ReadTime, 'ReadTime'); + RegisterMethod(@TRegistry.RegistryConnect, 'RegistryConnect'); + RegisterMethod(@TRegistry.RenameValue, 'RenameValue'); + RegisterMethod(@TRegistry.ReplaceKey, 'ReplaceKey'); + RegisterMethod(@TRegistry.RestoreKey, 'RestoreKey'); + RegisterMethod(@TRegistry.SaveKey, 'SaveKey'); + RegisterMethod(@TRegistry.UnLoadKey, 'UnLoadKey'); + RegisterMethod(@TRegistry.ValueExists, 'ValueExists'); + RegisterMethod(@TRegistry.WriteCurrency, 'WriteCurrency'); + RegisterMethod(@TRegistry.WriteBool, 'WriteBool'); + RegisterMethod(@TRegistry.WriteDate, 'WriteDate'); + RegisterMethod(@TRegistry.WriteDateTime, 'WriteDateTime'); + RegisterMethod(@TRegistry.WriteFloat, 'WriteFloat'); + RegisterMethod(@TRegistry.WriteInteger, 'WriteInteger'); + RegisterMethod(@TRegistry.WriteString, 'WriteString'); + RegisterMethod(@TRegistry.WriteExpandString, 'WriteExpandString'); + RegisterMethod(@TRegistry.WriteTime, 'WriteTime'); + RegisterPropertyHelper(@TRegistry.CurrentKey_R,nil,'CurrentKey'); + RegisterPropertyHelper(@TRegistry.CurrentPath_R,nil,'CurrentPath'); + RegisterPropertyHelper(@TRegistry.LazyWrite_R,@TRegistry.LazyWrite_W,'LazyWrite'); + RegisterPropertyHelper(@TRegistry.RootKey_R,@TRegistry.RootKey_W,'RootKey'); + RegisterPropertyHelper(@TRegistry.Access_R,@TRegistry.Access_W,'Access'); + end; +end; + +{$ELSE} (*----------------------------------------------------------------------------*) procedure TRegistryAccess_W(Self: TRegistry; const T: LongWord); begin Self.Access := T; end; @@ -196,39 +428,6 @@ Begin Result := TRegistry.Create(AAccess); END; Function TRegistryCreate_P(Self: TClass; CreateNewInstance: Boolean):TObject; Begin Result := TRegistry.Create; END; -(*----------------------------------------------------------------------------*) -procedure RIRegister_TRegistryIniFile(CL: TPSRuntimeClassImporter); -begin - with CL.Add(TRegistryIniFile) do - begin - RegisterConstructor(@TRegistryIniFileCreate_P, 'Create'); - RegisterConstructor(@TRegistryIniFileCreateA_P, 'CreateA'); - RegisterPropertyHelper(@TRegistryIniFileRegIniFile_R,nil,'RegIniFile'); - end; -end; - -(*----------------------------------------------------------------------------*) -procedure RIRegister_TRegIniFile(CL: TPSRuntimeClassImporter); -begin - with CL.Add(TRegIniFile) do - begin - RegisterConstructor(@TRegIniFileCreate_P, 'Create'); - RegisterConstructor(@TRegIniFileCreateA_P, 'CreateA'); - RegisterMethod(@TRegIniFile.ReadString, 'ReadString'); - RegisterMethod(@TRegIniFile.ReadInteger, 'ReadInteger'); - RegisterMethod(@TRegIniFile.WriteInteger, 'WriteInteger'); - RegisterMethod(@TRegIniFile.WriteString, 'WriteString'); - RegisterMethod(@TRegIniFile.ReadBool, 'ReadBool'); - RegisterMethod(@TRegIniFile.WriteBool, 'WriteBool'); - RegisterMethod(@TRegIniFile.ReadSection, 'ReadSection'); - RegisterMethod(@TRegIniFile.ReadSections, 'ReadSections'); - RegisterMethod(@TRegIniFile.ReadSectionValues, 'ReadSectionValues'); - RegisterMethod(@TRegIniFile.EraseSection, 'EraseSection'); - RegisterMethod(@TRegIniFile.DeleteKey, 'DeleteKey'); - RegisterPropertyHelper(@TRegIniFileFileName_R,nil,'FileName'); - end; -end; - (*----------------------------------------------------------------------------*) procedure RIRegister_TRegistry(CL: TPSRuntimeClassImporter); begin @@ -284,6 +483,10 @@ begin end; end; +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + + (*----------------------------------------------------------------------------*) procedure RIRegister_Registry(CL: TPSRuntimeClassImporter); begin diff --git a/Source/uPSPreProcessor.pas b/Source/uPSPreProcessor.pas index 557416d..5423069 100644 --- a/Source/uPSPreProcessor.pas +++ b/Source/uPSPreProcessor.pas @@ -716,11 +716,11 @@ var Stream: TMemoryStream; begin FAddedPosition := 0; - {$IFDEF FPC} + {$IFDEF FPC} FCurrentDefines.AddStrings(FDefines); - {$ELSE} + {$ELSE} FCurrentDefines.Assign(FDefines); - {$ENDIF} + {$ENDIF} Stream := TMemoryStream.Create; try IntPreProcess(0, '', FileName, Stream); @@ -798,4 +798,4 @@ begin else Result := TPSDefineState(FItems[FItems.Count -2]).DoWrite; end; -end. \ No newline at end of file +end. diff --git a/Source/uPSR_DB.pas b/Source/uPSR_DB.pas index b59ee20..a9d1241 100644 --- a/Source/uPSR_DB.pas +++ b/Source/uPSR_DB.pas @@ -61,6 +61,529 @@ procedure RIRegister_DB(CL: TPSRuntimeClassImporter); implementation Uses DB, {$IFDEF DELPHI6UP}{$IFNDEF FPC}FMTBcd, MaskUtils,{$ENDIF}{$ENDIF}Classes; +{$IFDEF DELPHI10UP}{$REGION 'TDataset'}{$ENDIF} +{$IFDEF class_helper_present} +type + TDataset_PSHelper = class helper for TDataset + public + procedure ONPOSTERROR_W( const T: TDATASETERROREVENT); + procedure ONPOSTERROR_R( var T: TDATASETERROREVENT); + procedure ONNEWRECORD_W( const T: TDATASETNOTIFYEVENT); + procedure ONNEWRECORD_R( var T: TDATASETNOTIFYEVENT); + procedure ONFILTERRECORD_W( const T: TFILTERRECORDEVENT); + procedure ONFILTERRECORD_R( var T: TFILTERRECORDEVENT); + procedure ONEDITERROR_W( const T: TDATASETERROREVENT); + procedure ONEDITERROR_R( var T: TDATASETERROREVENT); + procedure ONDELETEERROR_W( const T: TDATASETERROREVENT); + procedure ONDELETEERROR_R( var T: TDATASETERROREVENT); + procedure ONCALCFIELDS_W( const T: TDATASETNOTIFYEVENT); + procedure ONCALCFIELDS_R( var T: TDATASETNOTIFYEVENT); + {$IFNDEF FPC} + procedure AFTERREFRESH_W( const T: TDATASETNOTIFYEVENT); + procedure AFTERREFRESH_R( var T: TDATASETNOTIFYEVENT); + procedure BEFOREREFRESH_W( const T: TDATASETNOTIFYEVENT); + procedure BEFOREREFRESH_R( var T: TDATASETNOTIFYEVENT); + {$ENDIF} + procedure AFTERSCROLL_W( const T: TDATASETNOTIFYEVENT); + procedure AFTERSCROLL_R( var T: TDATASETNOTIFYEVENT); + procedure BEFORESCROLL_W( const T: TDATASETNOTIFYEVENT); + procedure BEFORESCROLL_R( var T: TDATASETNOTIFYEVENT); + procedure AFTERDELETE_W( const T: TDATASETNOTIFYEVENT); + procedure AFTERDELETE_R( var T: TDATASETNOTIFYEVENT); + procedure BEFOREDELETE_W( const T: TDATASETNOTIFYEVENT); + procedure BEFOREDELETE_R( var T: TDATASETNOTIFYEVENT); + procedure AFTERCANCEL_W( const T: TDATASETNOTIFYEVENT); + procedure AFTERCANCEL_R( var T: TDATASETNOTIFYEVENT); + procedure BEFORECANCEL_W( const T: TDATASETNOTIFYEVENT); + procedure BEFORECANCEL_R( var T: TDATASETNOTIFYEVENT); + procedure AFTERPOST_W( const T: TDATASETNOTIFYEVENT); + procedure AFTERPOST_R( var T: TDATASETNOTIFYEVENT); + procedure BEFOREPOST_W( const T: TDATASETNOTIFYEVENT); + procedure BEFOREPOST_R( var T: TDATASETNOTIFYEVENT); + procedure AFTEREDIT_W( const T: TDATASETNOTIFYEVENT); + procedure AFTEREDIT_R( var T: TDATASETNOTIFYEVENT); + procedure BEFOREEDIT_W( const T: TDATASETNOTIFYEVENT); + procedure BEFOREEDIT_R( var T: TDATASETNOTIFYEVENT); + procedure AFTERINSERT_W( const T: TDATASETNOTIFYEVENT); + procedure AFTERINSERT_R( var T: TDATASETNOTIFYEVENT); + procedure BEFOREINSERT_W( const T: TDATASETNOTIFYEVENT); + procedure BEFOREINSERT_R( var T: TDATASETNOTIFYEVENT); + procedure AFTERCLOSE_W( const T: TDATASETNOTIFYEVENT); + procedure AFTERCLOSE_R( var T: TDATASETNOTIFYEVENT); + procedure BEFORECLOSE_W( const T: TDATASETNOTIFYEVENT); + procedure BEFORECLOSE_R( var T: TDATASETNOTIFYEVENT); + procedure AFTEROPEN_W( const T: TDATASETNOTIFYEVENT); + procedure AFTEROPEN_R( var T: TDATASETNOTIFYEVENT); + procedure BEFOREOPEN_W( const T: TDATASETNOTIFYEVENT); + procedure BEFOREOPEN_R( var T: TDATASETNOTIFYEVENT); + procedure AUTOCALCFIELDS_W( const T: BOOLEAN); + procedure AUTOCALCFIELDS_R( var T: BOOLEAN); + procedure ACTIVE_W( const T: BOOLEAN); + procedure ACTIVE_R( var T: BOOLEAN); + procedure FILTEROPTIONS_W( const T: TFILTEROPTIONS); + procedure FILTEROPTIONS_R( var T: TFILTEROPTIONS); + procedure FILTERED_W( const T: BOOLEAN); + procedure FILTERED_R( var T: BOOLEAN); + procedure FILTER_W( const T: String); + procedure FILTER_R( var T: String); + procedure STATE_R( var T: TDATASETSTATE); + {$IFNDEF FPC} + procedure SPARSEARRAYS_W( const T: BOOLEAN); + procedure SPARSEARRAYS_R( var T: BOOLEAN); + {$ENDIF} + procedure RECORDSIZE_R( var T: WORD); + procedure RECNO_W( const T: INTEGER); + procedure RECNO_R( var T: INTEGER); + procedure RECORDCOUNT_R( var T: INTEGER); + {$IFNDEF FPC} + procedure OBJECTVIEW_W( const T: BOOLEAN); + procedure OBJECTVIEW_R( var T: BOOLEAN); + {$ENDIF} + procedure MODIFIED_R( var T: BOOLEAN); + {$IFDEF DELPHI6UP} + procedure ISUNIDIRECTIONAL_R( var T: BOOLEAN); + {$ENDIF} + procedure FOUND_R( var T: BOOLEAN); + procedure FIELDVALUES_W( const T: VARIANT; const t1: String); + procedure FIELDVALUES_R( var T: VARIANT; const t1: String); + procedure FIELDS_R( var T: TFIELDS); + {$IFNDEF FPC} + procedure FIELDLIST_R( var T: TFIELDLIST); + procedure FIELDDEFLIST_R( var T: TFIELDDEFLIST); + procedure FIELDDEFS_W( const T: TFIELDDEFS); + procedure FIELDDEFS_R( var T: TFIELDDEFS); + procedure BLOCKREADSIZE_W( const T: INTEGER); + procedure BLOCKREADSIZE_R( var T: INTEGER); + procedure DESIGNER_R( var T: TDATASETDESIGNER); + procedure DATASETFIELD_W( const T: TDATASETFIELD); + procedure DATASETFIELD_R( var T: TDATASETFIELD); + procedure AGGFIELDS_R( var T: TFIELDS); + {$ENDIF} + procedure FIELDCOUNT_R( var T: INTEGER); + procedure EOF_R( var T: BOOLEAN); + procedure DEFAULTFIELDS_R( var T: BOOLEAN); + procedure DATASOURCE_R( var T: TDATASOURCE); + procedure CANMODIFY_R( var T: BOOLEAN); + //procedure BOOKMARK_W( const T: TBOOKMARKSTR); + //procedure BOOKMARK_R( var T: TBOOKMARKSTR); + procedure BOF_R( var T: BOOLEAN); + + end; + +procedure TDataset_PSHelper.ONPOSTERROR_W( const T: TDATASETERROREVENT); +begin Self.ONPOSTERROR := T; end; + +procedure TDataset_PSHelper.ONPOSTERROR_R( var T: TDATASETERROREVENT); +begin T := Self.ONPOSTERROR; end; + +procedure TDataset_PSHelper.ONNEWRECORD_W( const T: TDATASETNOTIFYEVENT); +begin Self.ONNEWRECORD := T; end; + +procedure TDataset_PSHelper.ONNEWRECORD_R( var T: TDATASETNOTIFYEVENT); +begin T := Self.ONNEWRECORD; end; + +procedure TDataset_PSHelper.ONFILTERRECORD_W( const T: TFILTERRECORDEVENT); +begin Self.ONFILTERRECORD := T; end; + +procedure TDataset_PSHelper.ONFILTERRECORD_R( var T: TFILTERRECORDEVENT); +begin T := Self.ONFILTERRECORD; end; + +procedure TDataset_PSHelper.ONEDITERROR_W( const T: TDATASETERROREVENT); +begin Self.ONEDITERROR := T; end; + +procedure TDataset_PSHelper.ONEDITERROR_R( var T: TDATASETERROREVENT); +begin T := Self.ONEDITERROR; end; + +procedure TDataset_PSHelper.ONDELETEERROR_W( const T: TDATASETERROREVENT); +begin Self.ONDELETEERROR := T; end; + +procedure TDataset_PSHelper.ONDELETEERROR_R( var T: TDATASETERROREVENT); +begin T := Self.ONDELETEERROR; end; + +procedure TDataset_PSHelper.ONCALCFIELDS_W( const T: TDATASETNOTIFYEVENT); +begin Self.ONCALCFIELDS := T; end; + +procedure TDataset_PSHelper.ONCALCFIELDS_R( var T: TDATASETNOTIFYEVENT); +begin T := Self.ONCALCFIELDS; end; + +{$IFNDEF FPC} +procedure TDataset_PSHelper.AFTERREFRESH_W( const T: TDATASETNOTIFYEVENT); +begin Self.AFTERREFRESH := T; end; + +procedure TDataset_PSHelper.AFTERREFRESH_R( var T: TDATASETNOTIFYEVENT); +begin T := Self.AFTERREFRESH; end; + +procedure TDataset_PSHelper.BEFOREREFRESH_W( const T: TDATASETNOTIFYEVENT); +begin Self.BEFOREREFRESH := T; end; + +procedure TDataset_PSHelper.BEFOREREFRESH_R( var T: TDATASETNOTIFYEVENT); +begin T := Self.BEFOREREFRESH; end; + +{$ENDIF} + +procedure TDataset_PSHelper.AFTERSCROLL_W( const T: TDATASETNOTIFYEVENT); +begin Self.AFTERSCROLL := T; end; + +procedure TDataset_PSHelper.AFTERSCROLL_R( var T: TDATASETNOTIFYEVENT); +begin T := Self.AFTERSCROLL; end; + +procedure TDataset_PSHelper.BEFORESCROLL_W( const T: TDATASETNOTIFYEVENT); +begin Self.BEFORESCROLL := T; end; + +procedure TDataset_PSHelper.BEFORESCROLL_R( var T: TDATASETNOTIFYEVENT); +begin T := Self.BEFORESCROLL; end; + +procedure TDataset_PSHelper.AFTERDELETE_W( const T: TDATASETNOTIFYEVENT); +begin Self.AFTERDELETE := T; end; + +procedure TDataset_PSHelper.AFTERDELETE_R( var T: TDATASETNOTIFYEVENT); +begin T := Self.AFTERDELETE; end; + +procedure TDataset_PSHelper.BEFOREDELETE_W( const T: TDATASETNOTIFYEVENT); +begin Self.BEFOREDELETE := T; end; + +procedure TDataset_PSHelper.BEFOREDELETE_R( var T: TDATASETNOTIFYEVENT); +begin T := Self.BEFOREDELETE; end; + +procedure TDataset_PSHelper.AFTERCANCEL_W( const T: TDATASETNOTIFYEVENT); +begin Self.AFTERCANCEL := T; end; + +procedure TDataset_PSHelper.AFTERCANCEL_R( var T: TDATASETNOTIFYEVENT); +begin T := Self.AFTERCANCEL; end; + +procedure TDataset_PSHelper.BEFORECANCEL_W( const T: TDATASETNOTIFYEVENT); +begin Self.BEFORECANCEL := T; end; + +procedure TDataset_PSHelper.BEFORECANCEL_R( var T: TDATASETNOTIFYEVENT); +begin T := Self.BEFORECANCEL; end; + +procedure TDataset_PSHelper.AFTERPOST_W( const T: TDATASETNOTIFYEVENT); +begin Self.AFTERPOST := T; end; + +procedure TDataset_PSHelper.AFTERPOST_R( var T: TDATASETNOTIFYEVENT); +begin T := Self.AFTERPOST; end; + +procedure TDataset_PSHelper.BEFOREPOST_W( const T: TDATASETNOTIFYEVENT); +begin Self.BEFOREPOST := T; end; + +procedure TDataset_PSHelper.BEFOREPOST_R( var T: TDATASETNOTIFYEVENT); +begin T := Self.BEFOREPOST; end; + +procedure TDataset_PSHelper.AFTEREDIT_W( const T: TDATASETNOTIFYEVENT); +begin Self.AFTEREDIT := T; end; + +procedure TDataset_PSHelper.AFTEREDIT_R( var T: TDATASETNOTIFYEVENT); +begin T := Self.AFTEREDIT; end; + +procedure TDataset_PSHelper.BEFOREEDIT_W( const T: TDATASETNOTIFYEVENT); +begin Self.BEFOREEDIT := T; end; + +procedure TDataset_PSHelper.BEFOREEDIT_R( var T: TDATASETNOTIFYEVENT); +begin T := Self.BEFOREEDIT; end; + +procedure TDataset_PSHelper.AFTERINSERT_W( const T: TDATASETNOTIFYEVENT); +begin Self.AFTERINSERT := T; end; + +procedure TDataset_PSHelper.AFTERINSERT_R( var T: TDATASETNOTIFYEVENT); +begin T := Self.AFTERINSERT; end; + +procedure TDataset_PSHelper.BEFOREINSERT_W( const T: TDATASETNOTIFYEVENT); +begin Self.BEFOREINSERT := T; end; + +procedure TDataset_PSHelper.BEFOREINSERT_R( var T: TDATASETNOTIFYEVENT); +begin T := Self.BEFOREINSERT; end; + +procedure TDataset_PSHelper.AFTERCLOSE_W( const T: TDATASETNOTIFYEVENT); +begin Self.AFTERCLOSE := T; end; + +procedure TDataset_PSHelper.AFTERCLOSE_R( var T: TDATASETNOTIFYEVENT); +begin T := Self.AFTERCLOSE; end; + +procedure TDataset_PSHelper.BEFORECLOSE_W( const T: TDATASETNOTIFYEVENT); +begin Self.BEFORECLOSE := T; end; + +procedure TDataset_PSHelper.BEFORECLOSE_R( var T: TDATASETNOTIFYEVENT); +begin T := Self.BEFORECLOSE; end; + +procedure TDataset_PSHelper.AFTEROPEN_W( const T: TDATASETNOTIFYEVENT); +begin Self.AFTEROPEN := T; end; + +procedure TDataset_PSHelper.AFTEROPEN_R( var T: TDATASETNOTIFYEVENT); +begin T := Self.AFTEROPEN; end; + +procedure TDataset_PSHelper.BEFOREOPEN_W( const T: TDATASETNOTIFYEVENT); +begin Self.BEFOREOPEN := T; end; + +procedure TDataset_PSHelper.BEFOREOPEN_R( var T: TDATASETNOTIFYEVENT); +begin T := Self.BEFOREOPEN; end; + +procedure TDataset_PSHelper.AUTOCALCFIELDS_W( const T: BOOLEAN); +begin Self.AUTOCALCFIELDS := T; end; + +procedure TDataset_PSHelper.AUTOCALCFIELDS_R( var T: BOOLEAN); +begin T := Self.AUTOCALCFIELDS; end; + +procedure TDataset_PSHelper.ACTIVE_W( const T: BOOLEAN); +begin Self.ACTIVE := T; end; + +procedure TDataset_PSHelper.ACTIVE_R( var T: BOOLEAN); +begin T := Self.ACTIVE; end; + +procedure TDataset_PSHelper.FILTEROPTIONS_W( const T: TFILTEROPTIONS); +begin Self.FILTEROPTIONS := T; end; + +procedure TDataset_PSHelper.FILTEROPTIONS_R( var T: TFILTEROPTIONS); +begin T := Self.FILTEROPTIONS; end; + +procedure TDataset_PSHelper.FILTERED_W( const T: BOOLEAN); +begin Self.FILTERED := T; end; + +procedure TDataset_PSHelper.FILTERED_R( var T: BOOLEAN); +begin T := Self.FILTERED; end; + +procedure TDataset_PSHelper.FILTER_W( const T: String); +begin Self.FILTER := T; end; + +procedure TDataset_PSHelper.FILTER_R( var T: String); +begin T := Self.FILTER; end; + +procedure TDataset_PSHelper.STATE_R( var T: TDATASETSTATE); +begin T := Self.STATE; end; + +{$IFNDEF FPC} +procedure TDataset_PSHelper.SPARSEARRAYS_W( const T: BOOLEAN); +begin Self.SPARSEARRAYS := T; end; + +procedure TDataset_PSHelper.SPARSEARRAYS_R( var T: BOOLEAN); +begin T := Self.SPARSEARRAYS; end; +{$ENDIF} + +procedure TDataset_PSHelper.RECORDSIZE_R( var T: WORD); +begin T := Self.RECORDSIZE; end; + +procedure TDataset_PSHelper.RECNO_W( const T: INTEGER); +begin Self.RECNO := T; end; + +procedure TDataset_PSHelper.RECNO_R( var T: INTEGER); +begin T := Self.RECNO; end; + +procedure TDataset_PSHelper.RECORDCOUNT_R( var T: INTEGER); +begin T := Self.RECORDCOUNT; end; + +{$IFNDEF FPC} +procedure TDataset_PSHelper.OBJECTVIEW_W( const T: BOOLEAN); +begin Self.OBJECTVIEW := T; end; + +procedure TDataset_PSHelper.OBJECTVIEW_R( var T: BOOLEAN); +begin T := Self.OBJECTVIEW; end; +{$ENDIF} + +procedure TDataset_PSHelper.MODIFIED_R( var T: BOOLEAN); +begin T := Self.MODIFIED; end; + +{$IFDEF DELPHI6UP} +procedure TDataset_PSHelper.ISUNIDIRECTIONAL_R( var T: BOOLEAN); +begin T := Self.ISUNIDIRECTIONAL; end; +{$ENDIF} + +procedure TDataset_PSHelper.FOUND_R( var T: BOOLEAN); +begin T := Self.FOUND; end; + +procedure TDataset_PSHelper.FIELDVALUES_W( const T: VARIANT; const t1: String); +begin Self.FIELDVALUES[t1] := T; end; + +procedure TDataset_PSHelper.FIELDVALUES_R( var T: VARIANT; const t1: String); +begin T := Self.FIELDVALUES[t1]; end; + +procedure TDataset_PSHelper.FIELDS_R( var T: TFIELDS); +begin T := Self.FIELDS; end; + +{$IFNDEF FPC} + +procedure TDataset_PSHelper.FIELDLIST_R( var T: TFIELDLIST); +begin T := Self.FIELDLIST; end; + + +procedure TDataset_PSHelper.FIELDDEFLIST_R( var T: TFIELDDEFLIST); +begin T := Self.FIELDDEFLIST; end; + +procedure TDataset_PSHelper.FIELDDEFS_W( const T: TFIELDDEFS); +begin Self.FIELDDEFS := T; end; + +procedure TDataset_PSHelper.FIELDDEFS_R( var T: TFIELDDEFS); +begin T := Self.FIELDDEFS; end; + +procedure TDataset_PSHelper.BLOCKREADSIZE_W( const T: INTEGER); +begin Self.BLOCKREADSIZE := T; end; + +procedure TDataset_PSHelper.BLOCKREADSIZE_R( var T: INTEGER); +begin T := Self.BLOCKREADSIZE; end; + +procedure TDataset_PSHelper.DESIGNER_R( var T: TDATASETDESIGNER); +begin T := Self.DESIGNER; end; + + +procedure TDataset_PSHelper.DATASETFIELD_W( const T: TDATASETFIELD); +begin Self.DATASETFIELD := T; end; + + + +procedure TDataset_PSHelper.DATASETFIELD_R( var T: TDATASETFIELD); +begin T := Self.DATASETFIELD; end; + + +procedure TDataset_PSHelper.AGGFIELDS_R( var T: TFIELDS); +begin T := Self.AGGFIELDS; end; + + + +{$ENDIF} + +procedure TDataset_PSHelper.FIELDCOUNT_R( var T: INTEGER); +begin T := Self.FIELDCOUNT; end; + + +procedure TDataset_PSHelper.EOF_R( var T: BOOLEAN); +begin T := Self.EOF; end; + +procedure TDataset_PSHelper.DEFAULTFIELDS_R( var T: BOOLEAN); +begin T := Self.DEFAULTFIELDS; end; + +procedure TDataset_PSHelper.DATASOURCE_R( var T: TDATASOURCE); +begin T := Self.DATASOURCE; end; + + + +procedure TDataset_PSHelper.CANMODIFY_R( var T: BOOLEAN); +begin T := Self.CANMODIFY; end; + +//procedure TDataset_PSHelper.BOOKMARK_W( const T: TBOOKMARKSTR); +//begin Self.BOOKMARK := T; end; + +//procedure TDataset_PSHelper.BOOKMARK_R( var T: TBOOKMARKSTR); +//begin T := Self.BOOKMARK; end; + +procedure TDataset_PSHelper.BOF_R( var T: BOOLEAN); +begin T := Self.BOF; end; + +procedure RIRegisterTDATASET(Cl: TPSRuntimeClassImporter); +Begin +with Cl.Add(TDATASET) do + begin + RegisterMethod(@TDataset.ACTIVEBUFFER, 'ActiveBuffer'); + RegisterMethod(@TDataset.APPEND, 'Append'); + RegisterMethod(@TDataset.APPENDRECORD, 'AppendRecord'); +// RegisterVirtualMethod(@TDataset.BOOKMARKVALID, 'BookmarkValid'); + RegisterVirtualMethod(@TDataset.CANCEL, 'Cancel'); + RegisterMethod(@TDataset.CHECKBROWSEMODE, 'CheckBrowseMode'); + RegisterMethod(@TDataset.CLEARFIELDS, 'ClearFields'); + RegisterMethod(@TDataset.CLOSE, 'Close'); + RegisterMethod(@TDataset.CONTROLSDISABLED, 'ControlsDisabled'); +// RegisterVirtualMethod(@TDataset.COMPAREBOOKMARKS, 'CompareBookmarks'); + RegisterVirtualMethod(@TDataset.CREATEBLOBSTREAM, 'CreateBlobStream'); + RegisterMethod(@TDataset.CURSORPOSCHANGED, 'CursorPosChanged'); + RegisterMethod(@TDataset.DELETE, 'Delete'); + RegisterMethod(@TDataset.DISABLECONTROLS, 'DisableControls'); + RegisterMethod(@TDataset.EDIT, 'Edit'); + RegisterMethod(@TDataset.ENABLECONTROLS, 'EnableControls'); + RegisterMethod(@TDataset.FIELDBYNAME, 'FieldByName'); + RegisterMethod(@TDataset.FINDFIELD, 'FindField'); + RegisterMethod(@TDataset.FINDFIRST, 'FindFirst'); + RegisterMethod(@TDataset.FINDLAST, 'FindLast'); + RegisterMethod(@TDataset.FINDNEXT, 'FindNext'); + RegisterMethod(@TDataset.FINDPRIOR, 'FindPrior'); + RegisterMethod(@TDataset.FIRST, 'First'); +// RegisterVirtualMethod(@TDataset.FREEBOOKMARK, 'FreeBookmark'); +// RegisterVirtualMethod(@TDataset.GETBOOKMARK, 'GetBookmark'); + RegisterVirtualMethod(@TDataset.GETCURRENTRECORD, 'GetCurrentRecord'); +// RegisterVirtualMethod(@TDataset.GETDETAILDATASETS, 'GetDetailDataSets'); +// RegisterVirtualMethod(@TDataset.GETDETAILLINKFIELDS, 'GetDetailLinkFields'); +// RegisterVirtualMethod(@TDataset.GETBLOBFIELDDATA, 'GetBlobFieldData'); +// RegisterMethod(@TDataset.GETFIELDLIST, 'GetFieldList'); + RegisterMethod(@TDataset.GETFIELDNAMES, 'GetFieldNames'); +// RegisterMethod(@TDataset.GOTOBOOKMARK, 'GotoBookmark'); + RegisterMethod(@TDataset.INSERT, 'Insert'); + RegisterMethod(@TDataset.INSERTRECORD, 'InsertRecord'); + RegisterMethod(@TDataset.ISEMPTY, 'IsEmpty'); + RegisterMethod(@TDataset.ISLINKEDTO, 'IsLinkedTo'); + RegisterVirtualMethod(@TDataset.ISSEQUENCED, 'IsSequenced'); + RegisterMethod(@TDataset.LAST, 'Last'); + RegisterVirtualMethod(@TDataset.LOCATE, 'Locate'); + RegisterVirtualMethod(@TDataset.LOOKUP, 'Lookup'); + RegisterMethod(@TDataset.MOVEBY, 'MoveBy'); + RegisterMethod(@TDataset.NEXT, 'Next'); + RegisterMethod(@TDataset.OPEN, 'Open'); + RegisterVirtualMethod(@TDataset.POST, 'Post'); + RegisterMethod(@TDataset.PRIOR, 'Prior'); + RegisterMethod(@TDataset.REFRESH, 'Refresh'); +// RegisterVirtualMethod(@TDataset.RESYNC, 'Resync'); + RegisterMethod(@TDataset.SETFIELDS, 'SetFields'); + RegisterVirtualMethod(@TDataset.TRANSLATE, 'Translate'); + RegisterMethod(@TDataset.UPDATECURSORPOS, 'UpdateCursorPos'); + RegisterMethod(@TDataset.UPDATERECORD, 'UpdateRecord'); + RegisterVirtualMethod(@TDataset.UPDATESTATUS, 'UpdateStatus'); + RegisterPropertyHelper(@TDataset.BOF_R,nil,'BOF'); +// RegisterPropertyHelper(@TDataset.BOOKMARK_R,@TDataset.BOOKMARK_W,'Bookmark'); + RegisterPropertyHelper(@TDataset.CANMODIFY_R,nil,'CanModify'); + RegisterPropertyHelper(@TDataset.DATASOURCE_R,nil,'DataSource'); + RegisterPropertyHelper(@TDataset.DEFAULTFIELDS_R,nil,'DefaultFields'); + RegisterPropertyHelper(@TDataset.EOF_R,nil,'EOF'); + RegisterPropertyHelper(@TDataset.FIELDCOUNT_R,nil,'FieldCount'); + RegisterPropertyHelper(@TDataset.FIELDS_R,nil,'Fields'); + RegisterPropertyHelper(@TDataset.FIELDVALUES_R,@TDataset.FIELDVALUES_W,'FieldValues'); + RegisterPropertyHelper(@TDataset.FOUND_R,nil,'Found'); +{$IFDEF DELPHI6UP} + RegisterPropertyHelper(@TDataset.ISUNIDIRECTIONAL_R,nil,'IsUnidirectional'); +{$ENDIF} + RegisterPropertyHelper(@TDataset.MODIFIED_R,nil,'Modified'); + RegisterPropertyHelper(@TDataset.RECORDCOUNT_R,nil,'RecordCount'); + RegisterPropertyHelper(@TDataset.RECNO_R,@TDataset.RECNO_W,'RecNo'); + RegisterPropertyHelper(@TDataset.RECORDSIZE_R,nil,'RecordSize'); + RegisterPropertyHelper(@TDataset.STATE_R,nil,'State'); + RegisterPropertyHelper(@TDataset.FILTER_R,@TDataset.FILTER_W,'Filter'); + RegisterPropertyHelper(@TDataset.FILTERED_R,@TDataset.FILTERED_W,'Filtered'); + RegisterPropertyHelper(@TDataset.FILTEROPTIONS_R,@TDataset.FILTEROPTIONS_W,'FilterOptions'); + RegisterPropertyHelper(@TDataset.ACTIVE_R,@TDataset.ACTIVE_W,'Active'); + RegisterPropertyHelper(@TDataset.AUTOCALCFIELDS_R,@TDataset.AUTOCALCFIELDS_W,'AutoCalcFields'); + RegisterPropertyHelper(@TDataset.BEFOREOPEN_R,@TDataset.BEFOREOPEN_W,'BeforeOpen'); + RegisterPropertyHelper(@TDataset.AFTEROPEN_R,@TDataset.AFTEROPEN_W,'AfterOpen'); + RegisterPropertyHelper(@TDataset.BEFORECLOSE_R,@TDataset.BEFORECLOSE_W,'BeforeClose'); + RegisterPropertyHelper(@TDataset.AFTERCLOSE_R,@TDataset.AFTERCLOSE_W,'AfterClose'); + RegisterPropertyHelper(@TDataset.BEFOREINSERT_R,@TDataset.BEFOREINSERT_W,'BeforeInsert'); + RegisterPropertyHelper(@TDataset.AFTERINSERT_R,@TDataset.AFTERINSERT_W,'AfterInsert'); + RegisterPropertyHelper(@TDataset.BEFOREEDIT_R,@TDataset.BEFOREEDIT_W,'BeforeEdit'); + RegisterPropertyHelper(@TDataset.AFTEREDIT_R,@TDataset.AFTEREDIT_W,'AfterEdit'); + RegisterPropertyHelper(@TDataset.BEFOREPOST_R,@TDataset.BEFOREPOST_W,'BeforePost'); + RegisterPropertyHelper(@TDataset.AFTERPOST_R,@TDataset.AFTERPOST_W,'AfterPost'); + RegisterPropertyHelper(@TDataset.BEFORECANCEL_R,@TDataset.BEFORECANCEL_W,'BeforeCancel'); + RegisterPropertyHelper(@TDataset.AFTERCANCEL_R,@TDataset.AFTERCANCEL_W,'AfterCancel'); + RegisterPropertyHelper(@TDataset.BEFOREDELETE_R,@TDataset.BEFOREDELETE_W,'BeforeDelete'); + RegisterPropertyHelper(@TDataset.AFTERDELETE_R,@TDataset.AFTERDELETE_W,'AfterDelete'); + RegisterPropertyHelper(@TDataset.BEFORESCROLL_R,@TDataset.BEFORESCROLL_W,'BeforeScroll'); + RegisterPropertyHelper(@TDataset.AFTERSCROLL_R,@TDataset.AFTERSCROLL_W,'AfterScroll'); + {$IFNDEF FPC} + RegisterPropertyHelper(@TDataset.FIELDLIST_R,nil,'FieldList'); + RegisterPropertyHelper(@TDataset.DESIGNER_R,nil,'Designer'); + RegisterPropertyHelper(@TDataset.BLOCKREADSIZE_R,@TDataset.BLOCKREADSIZE_W,'BlockReadSize'); + RegisterPropertyHelper(@TDataset.BEFOREREFRESH_R,@TDataset.BEFOREREFRESH_W,'BeforeRefresh'); + RegisterPropertyHelper(@TDataset.AFTERREFRESH_R,@TDataset.AFTERREFRESH_W,'AfterRefresh'); + RegisterPropertyHelper(@TDataset.AGGFIELDS_R,nil,'AggFields'); + RegisterPropertyHelper(@TDataset.DATASETFIELD_R,@TDataset.DATASETFIELD_W,'DataSetField'); + RegisterPropertyHelper(@TDataset.OBJECTVIEW_R,@TDataset.OBJECTVIEW_W,'ObjectView'); + RegisterPropertyHelper(@TDataset.SPARSEARRAYS_R,@TDataset.SPARSEARRAYS_W,'SparseArrays'); + RegisterPropertyHelper(@TDataset.FIELDDEFS_R,@TDataset.FIELDDEFS_W,'FieldDefs'); + RegisterPropertyHelper(@TDataset.FIELDDEFLIST_R,nil,'FieldDefList'); + + {$ENDIF} + RegisterEventPropertyHelper(@TDataset.ONCALCFIELDS_R,@TDataset.ONCALCFIELDS_W,'OnCalcFields'); + RegisterEventPropertyHelper(@TDataset.ONDELETEERROR_R,@TDataset.ONDELETEERROR_W,'OnDeleteError'); + RegisterEventPropertyHelper(@TDataset.ONEDITERROR_R,@TDataset.ONEDITERROR_W,'OnEditError'); + RegisterEventPropertyHelper(@TDataset.ONFILTERRECORD_R,@TDataset.ONFILTERRECORD_W,'OnFilterRecord'); + RegisterEventPropertyHelper(@TDataset.ONNEWRECORD_R,@TDataset.ONNEWRECORD_W,'OnNewRecord'); + RegisterEventPropertyHelper(@TDataset.ONPOSTERROR_R,@TDataset.ONPOSTERROR_W,'OnPostError'); + end; +end; +{$ELSE} procedure TDATASETONPOSTERROR_W(Self: TDATASET; const T: TDATASETERROREVENT); begin Self.ONPOSTERROR := T; end; @@ -357,6 +880,167 @@ begin T := Self.CANMODIFY; end; procedure TDATASETBOF_R(Self: TDATASET; var T: BOOLEAN); begin T := Self.BOF; end; +procedure RIRegisterTDATASET(Cl: TPSRuntimeClassImporter); +Begin +with Cl.Add(TDATASET) do + begin + RegisterMethod(@TDATASET.ACTIVEBUFFER, 'ActiveBuffer'); + RegisterMethod(@TDATASET.APPEND, 'Append'); + RegisterMethod(@TDATASET.APPENDRECORD, 'AppendRecord'); +// RegisterVirtualMethod(@TDATASET.BOOKMARKVALID, 'BookmarkValid'); + RegisterVirtualMethod(@TDATASET.CANCEL, 'Cancel'); + RegisterMethod(@TDATASET.CHECKBROWSEMODE, 'CheckBrowseMode'); + RegisterMethod(@TDATASET.CLEARFIELDS, 'ClearFields'); + RegisterMethod(@TDATASET.CLOSE, 'Close'); + RegisterMethod(@TDATASET.CONTROLSDISABLED, 'ControlsDisabled'); +// RegisterVirtualMethod(@TDATASET.COMPAREBOOKMARKS, 'CompareBookmarks'); + RegisterVirtualMethod(@TDATASET.CREATEBLOBSTREAM, 'CreateBlobStream'); + RegisterMethod(@TDATASET.CURSORPOSCHANGED, 'CursorPosChanged'); + RegisterMethod(@TDATASET.DELETE, 'Delete'); + RegisterMethod(@TDATASET.DISABLECONTROLS, 'DisableControls'); + RegisterMethod(@TDATASET.EDIT, 'Edit'); + RegisterMethod(@TDATASET.ENABLECONTROLS, 'EnableControls'); + RegisterMethod(@TDATASET.FIELDBYNAME, 'FieldByName'); + RegisterMethod(@TDATASET.FINDFIELD, 'FindField'); + RegisterMethod(@TDATASET.FINDFIRST, 'FindFirst'); + RegisterMethod(@TDATASET.FINDLAST, 'FindLast'); + RegisterMethod(@TDATASET.FINDNEXT, 'FindNext'); + RegisterMethod(@TDATASET.FINDPRIOR, 'FindPrior'); + RegisterMethod(@TDATASET.FIRST, 'First'); +// RegisterVirtualMethod(@TDATASET.FREEBOOKMARK, 'FreeBookmark'); +// RegisterVirtualMethod(@TDATASET.GETBOOKMARK, 'GetBookmark'); + RegisterVirtualMethod(@TDATASET.GETCURRENTRECORD, 'GetCurrentRecord'); +// RegisterVirtualMethod(@TDATASET.GETDETAILDATASETS, 'GetDetailDataSets'); +// RegisterVirtualMethod(@TDATASET.GETDETAILLINKFIELDS, 'GetDetailLinkFields'); +// RegisterVirtualMethod(@TDATASET.GETBLOBFIELDDATA, 'GetBlobFieldData'); +// RegisterMethod(@TDATASET.GETFIELDLIST, 'GetFieldList'); + RegisterMethod(@TDATASET.GETFIELDNAMES, 'GetFieldNames'); +// RegisterMethod(@TDATASET.GOTOBOOKMARK, 'GotoBookmark'); + RegisterMethod(@TDATASET.INSERT, 'Insert'); + RegisterMethod(@TDATASET.INSERTRECORD, 'InsertRecord'); + RegisterMethod(@TDATASET.ISEMPTY, 'IsEmpty'); + RegisterMethod(@TDATASET.ISLINKEDTO, 'IsLinkedTo'); + RegisterVirtualMethod(@TDATASET.ISSEQUENCED, 'IsSequenced'); + RegisterMethod(@TDATASET.LAST, 'Last'); + RegisterVirtualMethod(@TDATASET.LOCATE, 'Locate'); + RegisterVirtualMethod(@TDATASET.LOOKUP, 'Lookup'); + RegisterMethod(@TDATASET.MOVEBY, 'MoveBy'); + RegisterMethod(@TDATASET.NEXT, 'Next'); + RegisterMethod(@TDATASET.OPEN, 'Open'); + RegisterVirtualMethod(@TDATASET.POST, 'Post'); + RegisterMethod(@TDATASET.PRIOR, 'Prior'); + RegisterMethod(@TDATASET.REFRESH, 'Refresh'); +// RegisterVirtualMethod(@TDATASET.RESYNC, 'Resync'); + RegisterMethod(@TDATASET.SETFIELDS, 'SetFields'); + RegisterVirtualMethod(@TDATASET.TRANSLATE, 'Translate'); + RegisterMethod(@TDATASET.UPDATECURSORPOS, 'UpdateCursorPos'); + RegisterMethod(@TDATASET.UPDATERECORD, 'UpdateRecord'); + RegisterVirtualMethod(@TDATASET.UPDATESTATUS, 'UpdateStatus'); + RegisterPropertyHelper(@TDATASETBOF_R,nil,'BOF'); +// RegisterPropertyHelper(@TDATASETBOOKMARK_R,@TDATASETBOOKMARK_W,'Bookmark'); + RegisterPropertyHelper(@TDATASETCANMODIFY_R,nil,'CanModify'); + RegisterPropertyHelper(@TDATASETDATASOURCE_R,nil,'DataSource'); + RegisterPropertyHelper(@TDATASETDEFAULTFIELDS_R,nil,'DefaultFields'); + RegisterPropertyHelper(@TDATASETEOF_R,nil,'EOF'); + RegisterPropertyHelper(@TDATASETFIELDCOUNT_R,nil,'FieldCount'); + RegisterPropertyHelper(@TDATASETFIELDS_R,nil,'Fields'); + RegisterPropertyHelper(@TDATASETFIELDVALUES_R,@TDATASETFIELDVALUES_W,'FieldValues'); + RegisterPropertyHelper(@TDATASETFOUND_R,nil,'Found'); +{$IFDEF DELPHI6UP} + RegisterPropertyHelper(@TDATASETISUNIDIRECTIONAL_R,nil,'IsUnidirectional'); +{$ENDIF} + RegisterPropertyHelper(@TDATASETMODIFIED_R,nil,'Modified'); + RegisterPropertyHelper(@TDATASETRECORDCOUNT_R,nil,'RecordCount'); + RegisterPropertyHelper(@TDATASETRECNO_R,@TDATASETRECNO_W,'RecNo'); + RegisterPropertyHelper(@TDATASETRECORDSIZE_R,nil,'RecordSize'); + RegisterPropertyHelper(@TDATASETSTATE_R,nil,'State'); + RegisterPropertyHelper(@TDATASETFILTER_R,@TDATASETFILTER_W,'Filter'); + RegisterPropertyHelper(@TDATASETFILTERED_R,@TDATASETFILTERED_W,'Filtered'); + RegisterPropertyHelper(@TDATASETFILTEROPTIONS_R,@TDATASETFILTEROPTIONS_W,'FilterOptions'); + RegisterPropertyHelper(@TDATASETACTIVE_R,@TDATASETACTIVE_W,'Active'); + RegisterPropertyHelper(@TDATASETAUTOCALCFIELDS_R,@TDATASETAUTOCALCFIELDS_W,'AutoCalcFields'); + RegisterPropertyHelper(@TDATASETBEFOREOPEN_R,@TDATASETBEFOREOPEN_W,'BeforeOpen'); + RegisterPropertyHelper(@TDATASETAFTEROPEN_R,@TDATASETAFTEROPEN_W,'AfterOpen'); + RegisterPropertyHelper(@TDATASETBEFORECLOSE_R,@TDATASETBEFORECLOSE_W,'BeforeClose'); + RegisterPropertyHelper(@TDATASETAFTERCLOSE_R,@TDATASETAFTERCLOSE_W,'AfterClose'); + RegisterPropertyHelper(@TDATASETBEFOREINSERT_R,@TDATASETBEFOREINSERT_W,'BeforeInsert'); + RegisterPropertyHelper(@TDATASETAFTERINSERT_R,@TDATASETAFTERINSERT_W,'AfterInsert'); + RegisterPropertyHelper(@TDATASETBEFOREEDIT_R,@TDATASETBEFOREEDIT_W,'BeforeEdit'); + RegisterPropertyHelper(@TDATASETAFTEREDIT_R,@TDATASETAFTEREDIT_W,'AfterEdit'); + RegisterPropertyHelper(@TDATASETBEFOREPOST_R,@TDATASETBEFOREPOST_W,'BeforePost'); + RegisterPropertyHelper(@TDATASETAFTERPOST_R,@TDATASETAFTERPOST_W,'AfterPost'); + RegisterPropertyHelper(@TDATASETBEFORECANCEL_R,@TDATASETBEFORECANCEL_W,'BeforeCancel'); + RegisterPropertyHelper(@TDATASETAFTERCANCEL_R,@TDATASETAFTERCANCEL_W,'AfterCancel'); + RegisterPropertyHelper(@TDATASETBEFOREDELETE_R,@TDATASETBEFOREDELETE_W,'BeforeDelete'); + RegisterPropertyHelper(@TDATASETAFTERDELETE_R,@TDATASETAFTERDELETE_W,'AfterDelete'); + RegisterPropertyHelper(@TDATASETBEFORESCROLL_R,@TDATASETBEFORESCROLL_W,'BeforeScroll'); + RegisterPropertyHelper(@TDATASETAFTERSCROLL_R,@TDATASETAFTERSCROLL_W,'AfterScroll'); + {$IFNDEF FPC} + RegisterPropertyHelper(@TDATASETFIELDLIST_R,nil,'FieldList'); + RegisterPropertyHelper(@TDATASETDESIGNER_R,nil,'Designer'); + RegisterPropertyHelper(@TDATASETBLOCKREADSIZE_R,@TDATASETBLOCKREADSIZE_W,'BlockReadSize'); + RegisterPropertyHelper(@TDATASETBEFOREREFRESH_R,@TDATASETBEFOREREFRESH_W,'BeforeRefresh'); + RegisterPropertyHelper(@TDATASETAFTERREFRESH_R,@TDATASETAFTERREFRESH_W,'AfterRefresh'); + RegisterPropertyHelper(@TDATASETAGGFIELDS_R,nil,'AggFields'); + RegisterPropertyHelper(@TDATASETDATASETFIELD_R,@TDATASETDATASETFIELD_W,'DataSetField'); + RegisterPropertyHelper(@TDATASETOBJECTVIEW_R,@TDATASETOBJECTVIEW_W,'ObjectView'); + RegisterPropertyHelper(@TDATASETSPARSEARRAYS_R,@TDATASETSPARSEARRAYS_W,'SparseArrays'); + RegisterPropertyHelper(@TDATASETFIELDDEFS_R,@TDATASETFIELDDEFS_W,'FieldDefs'); + RegisterPropertyHelper(@TDATASETFIELDDEFLIST_R,nil,'FieldDefList'); + + {$ENDIF} + RegisterEventPropertyHelper(@TDATASETONCALCFIELDS_R,@TDATASETONCALCFIELDS_W,'OnCalcFields'); + RegisterEventPropertyHelper(@TDATASETONDELETEERROR_R,@TDATASETONDELETEERROR_W,'OnDeleteError'); + RegisterEventPropertyHelper(@TDATASETONEDITERROR_R,@TDATASETONEDITERROR_W,'OnEditError'); + RegisterEventPropertyHelper(@TDATASETONFILTERRECORD_R,@TDATASETONFILTERRECORD_W,'OnFilterRecord'); + RegisterEventPropertyHelper(@TDATASETONNEWRECORD_R,@TDATASETONNEWRECORD_W,'OnNewRecord'); + RegisterEventPropertyHelper(@TDATASETONPOSTERROR_R,@TDATASETONPOSTERROR_W,'OnPostError'); + end; +end; +{$ENDIF} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TParams'}{$ENDIF} +{$IFDEF class_helper_present} +type + TParams_PSHelper = class helper for TParams + public + procedure PARAMVALUES_W(const T: VARIANT; const t1: String); + procedure PARAMVALUES_R(var T: VARIANT; const t1: String); + procedure ITEMS_W(const T: TPARAM; const t1: INTEGER); + procedure ITEMS_R(var T: TPARAM; const t1: INTEGER); + end; + +procedure TParams_PSHelper.PARAMVALUES_W(const T: VARIANT; const t1: String); +begin Self.PARAMVALUES[t1] := T; end; + +procedure TParams_PSHelper.PARAMVALUES_R(var T: VARIANT; const t1: String); +begin T := Self.PARAMVALUES[t1]; end; + +procedure TParams_PSHelper.ITEMS_W(const T: TPARAM; const t1: INTEGER); +begin Self.ITEMS[t1] := T; end; + +procedure TParams_PSHelper.ITEMS_R(var T: TPARAM; const t1: INTEGER); +begin T := Self.ITEMS[t1]; end; + +procedure RIRegisterTPARAMS(Cl: TPSRuntimeClassImporter); +Begin + with Cl.Add(TParams) do begin + // RegisterMethod(@TParams.ASSIGNVALUES, 'AssignValues'); + RegisterMethod(@TParams.ADDPARAM, 'AddParam'); + RegisterMethod(@TParams.REMOVEPARAM, 'RemoveParam'); + RegisterMethod(@TParams.CREATEPARAM, 'CreateParam'); + RegisterMethod(@TParams.GETPARAMLIST, 'GetParamList'); + RegisterMethod(@TParams.ISEQUAL, 'IsEqual'); + RegisterMethod(@TParams.PARSESQL, 'ParseSQL'); + RegisterMethod(@TParams.PARAMBYNAME, 'ParamByName'); + RegisterMethod(@TParams.FINDPARAM, 'FindParam'); + RegisterPropertyHelper(@TParams.ITEMS_R,@TParams.ITEMS_W,'Items'); + RegisterPropertyHelper(@TParams.PARAMVALUES_R,@TParams.PARAMVALUES_W,'ParamValues'); + end; +end; + +{$ELSE} procedure TPARAMSPARAMVALUES_W(Self: TPARAMS; const T: VARIANT; const t1: String); begin Self.PARAMVALUES[t1] := T; end; @@ -369,6 +1053,296 @@ begin Self.ITEMS[t1] := T; end; procedure TPARAMSITEMS_R(Self: TPARAMS; var T: TPARAM; const t1: INTEGER); begin T := Self.ITEMS[t1]; end; +procedure RIRegisterTPARAMS(Cl: TPSRuntimeClassImporter); +Begin +with Cl.Add(TPARAMS) do + begin +// RegisterMethod(@TPARAMS.ASSIGNVALUES, 'AssignValues'); + RegisterMethod(@TPARAMS.ADDPARAM, 'AddParam'); + RegisterMethod(@TPARAMS.REMOVEPARAM, 'RemoveParam'); + RegisterMethod(@TPARAMS.CREATEPARAM, 'CreateParam'); + RegisterMethod(@TPARAMS.GETPARAMLIST, 'GetParamList'); + RegisterMethod(@TPARAMS.ISEQUAL, 'IsEqual'); + RegisterMethod(@TPARAMS.PARSESQL, 'ParseSQL'); + RegisterMethod(@TPARAMS.PARAMBYNAME, 'ParamByName'); + RegisterMethod(@TPARAMS.FINDPARAM, 'FindParam'); + RegisterPropertyHelper(@TPARAMSITEMS_R,@TPARAMSITEMS_W,'Items'); + RegisterPropertyHelper(@TPARAMSPARAMVALUES_R,@TPARAMSPARAMVALUES_W,'ParamValues'); + end; +end; + +{$ENDIF} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TParam'}{$ENDIF} +{$IFDEF class_helper_present} +type + TParam_PSHelper = class helper for TParam + public + procedure VALUE_W( const T: VARIANT); + procedure VALUE_R( var T: VARIANT); + {$IFDEF DELPHI6UP} + procedure SIZE_W( const T: INTEGER); + procedure SIZE_R( var T: INTEGER); + {$ENDIF} + procedure PARAMTYPE_W( const T: TPARAMTYPE); + procedure PARAMTYPE_R( var T: TPARAMTYPE); + procedure NAME_W( const T: String); + procedure NAME_R( var T: String); + {$IFDEF DELPHI6UP} + procedure NUMERICSCALE_W( const T: INTEGER); + procedure NUMERICSCALE_R( var T: INTEGER); + {$ENDIF} + {$IFDEF DELPHI6UP} + procedure PRECISION_W( const T: INTEGER); + procedure PRECISION_R( var T: INTEGER); + {$ENDIF} + procedure DATATYPE_W( const T: TFIELDTYPE); + procedure DATATYPE_R( var T: TFIELDTYPE); + procedure TEXT_W( const T: String); + procedure TEXT_R( var T: String); + procedure NATIVESTR_W( const T: String); + procedure NATIVESTR_R( var T: String); + procedure ISNULL_R( var T: BOOLEAN); + procedure BOUND_W( const T: BOOLEAN); + procedure BOUND_R( var T: BOOLEAN); + procedure ASWORD_W( const T: LONGINT); + procedure ASWORD_R( var T: LONGINT); + procedure ASTIME_W( const T: TDATETIME); + procedure ASTIME_R( var T: TDATETIME); + procedure ASSTRING_W( const T: String); + procedure ASSTRING_R( var T: String); + procedure ASMEMO_W( const T: String); + procedure ASMEMO_R( var T: String); + procedure ASSMALLINT_W( const T: LONGINT); + procedure ASSMALLINT_R( var T: LONGINT); + procedure ASINTEGER_W( const T: LONGINT); + procedure ASINTEGER_R( var T: LONGINT); + procedure ASFLOAT_W( const T: DOUBLE); + procedure ASFLOAT_R( var T: DOUBLE); + procedure ASDATETIME_W( const T: TDATETIME); + procedure ASDATETIME_R( var T: TDATETIME); + procedure ASDATE_W( const T: TDATETIME); + procedure ASDATE_R( var T: TDATETIME); + procedure ASCURRENCY_W( const T: CURRENCY); + procedure ASCURRENCY_R( var T: CURRENCY); + procedure ASBOOLEAN_W( const T: BOOLEAN); + procedure ASBOOLEAN_R( var T: BOOLEAN); + procedure ASBLOB_W( const T: TBLOBDATA); + procedure ASBLOB_R( var T: TBLOBDATA); + {$IFNDEF FPC} + {$IFDEF DELPHI6UP} + procedure ASFMTBCD_W( const T: TBCD); + procedure ASFMTBCD_R( var T: TBCD); + {$ENDIF} + procedure ASBCD_W( const T: CURRENCY); + procedure ASBCD_R( var T: CURRENCY); + {$ENDIF} + end; + +procedure TPARAM_PSHelper.VALUE_W( const T: VARIANT); +begin Self.VALUE := T; end; + +procedure TPARAM_PSHelper.VALUE_R( var T: VARIANT); +begin T := Self.VALUE; end; + + +{$IFDEF DELPHI6UP} +procedure TPARAM_PSHelper.SIZE_W( const T: INTEGER); +begin Self.SIZE := T; end; + +procedure TPARAM_PSHelper.SIZE_R( var T: INTEGER); +begin T := Self.SIZE; end; +{$ENDIF} + +procedure TPARAM_PSHelper.PARAMTYPE_W( const T: TPARAMTYPE); +begin Self.PARAMTYPE := T; end; + +procedure TPARAM_PSHelper.PARAMTYPE_R( var T: TPARAMTYPE); +begin T := Self.PARAMTYPE; end; + +procedure TPARAM_PSHelper.NAME_W( const T: String); +begin Self.NAME := T; end; + +procedure TPARAM_PSHelper.NAME_R( var T: String); +begin T := Self.NAME; end; + +{$IFDEF DELPHI6UP} +procedure TPARAM_PSHelper.NUMERICSCALE_W( const T: INTEGER); +begin Self.NUMERICSCALE := T; end; + +procedure TPARAM_PSHelper.NUMERICSCALE_R( var T: INTEGER); +begin T := Self.NUMERICSCALE; end; +{$ENDIF} +{$IFDEF DELPHI6UP} + +procedure TPARAM_PSHelper.PRECISION_W( const T: INTEGER); +begin Self.PRECISION := T; end; + +procedure TPARAM_PSHelper.PRECISION_R( var T: INTEGER); +begin T := Self.PRECISION; end; +{$ENDIF} +procedure TPARAM_PSHelper.DATATYPE_W( const T: TFIELDTYPE); +begin Self.DATATYPE := T; end; + +procedure TPARAM_PSHelper.DATATYPE_R( var T: TFIELDTYPE); +begin T := Self.DATATYPE; end; + +procedure TPARAM_PSHelper.TEXT_W( const T: String); +begin Self.TEXT := T; end; + +procedure TPARAM_PSHelper.TEXT_R( var T: String); +begin T := Self.TEXT; end; + +procedure TPARAM_PSHelper.NATIVESTR_W( const T: String); +begin Self.NATIVESTR := T; end; + +procedure TPARAM_PSHelper.NATIVESTR_R( var T: String); +begin T := Self.NATIVESTR; end; + +procedure TPARAM_PSHelper.ISNULL_R( var T: BOOLEAN); +begin T := Self.ISNULL; end; + +procedure TPARAM_PSHelper.BOUND_W( const T: BOOLEAN); +begin Self.BOUND := T; end; + +procedure TPARAM_PSHelper.BOUND_R( var T: BOOLEAN); +begin T := Self.BOUND; end; + +procedure TPARAM_PSHelper.ASWORD_W( const T: LONGINT); +begin Self.ASWORD := T; end; + +procedure TPARAM_PSHelper.ASWORD_R( var T: LONGINT); +begin T := Self.ASWORD; end; + +procedure TPARAM_PSHelper.ASTIME_W( const T: TDATETIME); +begin Self.ASTIME := T; end; + +procedure TPARAM_PSHelper.ASTIME_R( var T: TDATETIME); +begin T := Self.ASTIME; end; + +procedure TPARAM_PSHelper.ASSTRING_W( const T: String); +begin Self.ASSTRING := T; end; + +procedure TPARAM_PSHelper.ASSTRING_R( var T: String); +begin T := Self.ASSTRING; end; + +procedure TPARAM_PSHelper.ASMEMO_W( const T: String); +begin Self.ASMEMO := T; end; + +procedure TPARAM_PSHelper.ASMEMO_R( var T: String); +begin T := Self.ASMEMO; end; + +procedure TPARAM_PSHelper.ASSMALLINT_W( const T: LONGINT); +begin Self.ASSMALLINT := T; end; + +procedure TPARAM_PSHelper.ASSMALLINT_R( var T: LONGINT); +begin T := Self.ASSMALLINT; end; + +procedure TPARAM_PSHelper.ASINTEGER_W( const T: LONGINT); +begin Self.ASINTEGER := T; end; + +procedure TPARAM_PSHelper.ASINTEGER_R( var T: LONGINT); +begin T := Self.ASINTEGER; end; + +procedure TPARAM_PSHelper.ASFLOAT_W( const T: DOUBLE); +begin Self.ASFLOAT := T; end; + +procedure TPARAM_PSHelper.ASFLOAT_R( var T: DOUBLE); +begin T := Self.ASFLOAT; end; + +procedure TPARAM_PSHelper.ASDATETIME_W( const T: TDATETIME); +begin Self.ASDATETIME := T; end; + +procedure TPARAM_PSHelper.ASDATETIME_R( var T: TDATETIME); +begin T := Self.ASDATETIME; end; + +procedure TPARAM_PSHelper.ASDATE_W( const T: TDATETIME); +begin Self.ASDATE := T; end; + +procedure TPARAM_PSHelper.ASDATE_R( var T: TDATETIME); +begin T := Self.ASDATE; end; + +procedure TPARAM_PSHelper.ASCURRENCY_W( const T: CURRENCY); +begin Self.ASCURRENCY := T; end; + +procedure TPARAM_PSHelper.ASCURRENCY_R( var T: CURRENCY); +begin T := Self.ASCURRENCY; end; + +procedure TPARAM_PSHelper.ASBOOLEAN_W( const T: BOOLEAN); +begin Self.ASBOOLEAN := T; end; + +procedure TPARAM_PSHelper.ASBOOLEAN_R( var T: BOOLEAN); +begin T := Self.ASBOOLEAN; end; + +procedure TPARAM_PSHelper.ASBLOB_W( const T: TBLOBDATA); +begin Self.ASBLOB := T; end; + +procedure TPARAM_PSHelper.ASBLOB_R( var T: TBLOBDATA); +begin T := Self.ASBLOB; end; + +{$IFNDEF FPC} + +{$IFDEF DELPHI6UP} +procedure TPARAM_PSHelper.ASFMTBCD_W( const T: TBCD); +begin Self.ASFMTBCD := T; end; + +procedure TPARAM_PSHelper.ASFMTBCD_R( var T: TBCD); +begin T := Self.ASFMTBCD; end; +{$ENDIF} +procedure TPARAM_PSHelper.ASBCD_W( const T: CURRENCY); +begin Self.ASBCD := T; end; + +procedure TPARAM_PSHelper.ASBCD_R( var T: CURRENCY); +begin T := Self.ASBCD; end; +{$ENDIF} +procedure RIRegisterTPARAM(Cl: TPSRuntimeClassImporter); +Begin + with Cl.Add(TPARAM) do begin + RegisterMethod(@TParam.ASSIGNFIELD, 'AssignField'); + RegisterMethod(@TParam.ASSIGNFIELDVALUE, 'AssignFieldValue'); + RegisterMethod(@TParam.CLEAR, 'Clear'); + // RegisterMethod(@TParam.GETDATA, 'GetData'); + RegisterMethod(@TParam.GETDATASIZE, 'GetDataSize'); + RegisterMethod(@TParam.LOADFROMFILE, 'LoadFromFile'); + RegisterMethod(@TParam.LOADFROMSTREAM, 'LoadFromStream'); + // RegisterMethod(@TParam.SETBLOBDATA, 'SetBlobData'); + // RegisterMethod(@TParam.SETDATA, 'SetData'); + {$IFNDEF FPC} + RegisterPropertyHelper(@TParam.ASBCD_R,@TParam.ASBCD_W,'AsBCD'); + {$IFDEF DELPHI6UP} + RegisterPropertyHelper(@TParam.ASFMTBCD_R,@TParam.ASFMTBCD_W,'AsFMTBCD'); + {$ENDIF} + {$ENDIF} + RegisterPropertyHelper(@TParam.ASBLOB_R,@TParam.ASBLOB_W,'AsBlob'); + RegisterPropertyHelper(@TParam.ASBOOLEAN_R,@TParam.ASBOOLEAN_W,'AsBoolean'); + RegisterPropertyHelper(@TParam.ASCURRENCY_R,@TParam.ASCURRENCY_W,'AsCurrency'); + RegisterPropertyHelper(@TParam.ASDATE_R,@TParam.ASDATE_W,'AsDate'); + RegisterPropertyHelper(@TParam.ASDATETIME_R,@TParam.ASDATETIME_W,'AsDateTime'); + RegisterPropertyHelper(@TParam.ASFLOAT_R,@TParam.ASFLOAT_W,'AsFloat'); + RegisterPropertyHelper(@TParam.ASINTEGER_R,@TParam.ASINTEGER_W,'AsInteger'); + RegisterPropertyHelper(@TParam.ASSMALLINT_R,@TParam.ASSMALLINT_W,'AsSmallInt'); + RegisterPropertyHelper(@TParam.ASMEMO_R,@TParam.ASMEMO_W,'AsMemo'); + RegisterPropertyHelper(@TParam.ASSTRING_R,@TParam.ASSTRING_W,'AsString'); + RegisterPropertyHelper(@TParam.ASTIME_R,@TParam.ASTIME_W,'AsTime'); + RegisterPropertyHelper(@TParam.ASWORD_R,@TParam.ASWORD_W,'AsWord'); + RegisterPropertyHelper(@TParam.BOUND_R,@TParam.BOUND_W,'Bound'); + RegisterPropertyHelper(@TParam.ISNULL_R,nil,'IsNull'); + RegisterPropertyHelper(@TParam.NATIVESTR_R,@TParam.NATIVESTR_W,'NativeStr'); + RegisterPropertyHelper(@TParam.TEXT_R,@TParam.TEXT_W,'Text'); + RegisterPropertyHelper(@TParam.DATATYPE_R,@TParam.DATATYPE_W,'DataType'); + {$IFDEF DELPHI6UP} + RegisterPropertyHelper(@TParam.PRECISION_R,@TParam.PRECISION_W,'Precision'); + RegisterPropertyHelper(@TParam.NUMERICSCALE_R,@TParam.NUMERICSCALE_W,'NumericScale'); + RegisterPropertyHelper(@TParam.SIZE_R,@TParam.SIZE_W,'Size'); + {$ENDIF} + RegisterPropertyHelper(@TParam.NAME_R,@TParam.NAME_W,'Name'); + RegisterPropertyHelper(@TParam.PARAMTYPE_R,@TParam.PARAMTYPE_W,'ParamType'); + RegisterPropertyHelper(@TParam.VALUE_R,@TParam.VALUE_W,'Value'); + end; +end; + +{$ELSE} procedure TPARAMVALUE_W(Self: TPARAM; const T: VARIANT); begin Self.VALUE := T; end; @@ -524,14 +1498,135 @@ begin Self.ASBCD := T; end; procedure TPARAMASBCD_R(Self: TPARAM; var T: CURRENCY); begin T := Self.ASBCD; end; +{$ENDIF} +procedure RIRegisterTPARAM(Cl: TPSRuntimeClassImporter); +Begin +with Cl.Add(TPARAM) do + begin + RegisterMethod(@TPARAM.ASSIGNFIELD, 'AssignField'); + RegisterMethod(@TPARAM.ASSIGNFIELDVALUE, 'AssignFieldValue'); + RegisterMethod(@TPARAM.CLEAR, 'Clear'); +// RegisterMethod(@TPARAM.GETDATA, 'GetData'); + RegisterMethod(@TPARAM.GETDATASIZE, 'GetDataSize'); + RegisterMethod(@TPARAM.LOADFROMFILE, 'LoadFromFile'); + RegisterMethod(@TPARAM.LOADFROMSTREAM, 'LoadFromStream'); +// RegisterMethod(@TPARAM.SETBLOBDATA, 'SetBlobData'); +// RegisterMethod(@TPARAM.SETDATA, 'SetData'); + {$IFNDEF FPC} + RegisterPropertyHelper(@TPARAMASBCD_R,@TPARAMASBCD_W,'AsBCD'); +{$IFDEF DELPHI6UP} + RegisterPropertyHelper(@TPARAMASFMTBCD_R,@TPARAMASFMTBCD_W,'AsFMTBCD'); +{$ENDIF} + {$ENDIF} + RegisterPropertyHelper(@TPARAMASBLOB_R,@TPARAMASBLOB_W,'AsBlob'); + RegisterPropertyHelper(@TPARAMASBOOLEAN_R,@TPARAMASBOOLEAN_W,'AsBoolean'); + RegisterPropertyHelper(@TPARAMASCURRENCY_R,@TPARAMASCURRENCY_W,'AsCurrency'); + RegisterPropertyHelper(@TPARAMASDATE_R,@TPARAMASDATE_W,'AsDate'); + RegisterPropertyHelper(@TPARAMASDATETIME_R,@TPARAMASDATETIME_W,'AsDateTime'); + RegisterPropertyHelper(@TPARAMASFLOAT_R,@TPARAMASFLOAT_W,'AsFloat'); + RegisterPropertyHelper(@TPARAMASINTEGER_R,@TPARAMASINTEGER_W,'AsInteger'); + RegisterPropertyHelper(@TPARAMASSMALLINT_R,@TPARAMASSMALLINT_W,'AsSmallInt'); + RegisterPropertyHelper(@TPARAMASMEMO_R,@TPARAMASMEMO_W,'AsMemo'); + RegisterPropertyHelper(@TPARAMASSTRING_R,@TPARAMASSTRING_W,'AsString'); + RegisterPropertyHelper(@TPARAMASTIME_R,@TPARAMASTIME_W,'AsTime'); + RegisterPropertyHelper(@TPARAMASWORD_R,@TPARAMASWORD_W,'AsWord'); + RegisterPropertyHelper(@TPARAMBOUND_R,@TPARAMBOUND_W,'Bound'); + RegisterPropertyHelper(@TPARAMISNULL_R,nil,'IsNull'); + RegisterPropertyHelper(@TPARAMNATIVESTR_R,@TPARAMNATIVESTR_W,'NativeStr'); + RegisterPropertyHelper(@TPARAMTEXT_R,@TPARAMTEXT_W,'Text'); + RegisterPropertyHelper(@TPARAMDATATYPE_R,@TPARAMDATATYPE_W,'DataType'); +{$IFDEF DELPHI6UP} + RegisterPropertyHelper(@TPARAMPRECISION_R,@TPARAMPRECISION_W,'Precision'); + RegisterPropertyHelper(@TPARAMNUMERICSCALE_R,@TPARAMNUMERICSCALE_W,'NumericScale'); + RegisterPropertyHelper(@TPARAMSIZE_R,@TPARAMSIZE_W,'Size'); +{$ENDIF} + RegisterPropertyHelper(@TPARAMNAME_R,@TPARAMNAME_W,'Name'); + RegisterPropertyHelper(@TPARAMPARAMTYPE_R,@TPARAMPARAMTYPE_W,'ParamType'); + RegisterPropertyHelper(@TPARAMVALUE_R,@TPARAMVALUE_W,'Value'); + end; +end; -procedure TREFERENCEFIELDREFERENCETABLENAME_W(Self: TREFERENCEFIELD; const T: String); +{$ENDIF} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TReferenceField'}{$ENDIF} +{$IFDEF class_helper_present} + +{$IFNDEF FPC} +type + TReferenceField_PSHelper = class helper for TReferenceField + public + procedure REFERENCETABLENAME_W(const T: String); + procedure REFERENCETABLENAME_R(var T: String); + end; + +procedure TReferenceField_PSHelper.REFERENCETABLENAME_W(const T: String); begin Self.REFERENCETABLENAME := T; end; -procedure TREFERENCEFIELDREFERENCETABLENAME_R(Self: TREFERENCEFIELD; var T: String); +procedure TReferenceField_PSHelper.REFERENCETABLENAME_R(var T: String); begin T := Self.REFERENCETABLENAME; end; +procedure RIRegisterTREFERENCEFIELD(Cl: TPSRuntimeClassImporter); +Begin +with Cl.Add(TReferenceField) do + begin + RegisterPropertyHelper(@TReferenceField.REFERENCETABLENAME_R,@TReferenceField.REFERENCETABLENAME_W,'ReferenceTableName'); + end; +end; +{$ENDIF} + +{$ELSE} + +{$IFNDEF FPC} +procedure TREFERENCEFIELDREFERENCETABLENAME_W(Self: TReferenceField; const T: String); +begin Self.REFERENCETABLENAME := T; end; + +procedure TREFERENCEFIELDREFERENCETABLENAME_R(Self: TReferenceField; var T: String); +begin T := Self.REFERENCETABLENAME; end; + +procedure RIRegisterTREFERENCEFIELD(Cl: TPSRuntimeClassImporter); +Begin +with Cl.Add(TREFERENCEFIELD) do + begin + RegisterPropertyHelper(@TREFERENCEFIELDREFERENCETABLENAME_R,@TREFERENCEFIELDREFERENCETABLENAME_W,'ReferenceTableName'); + end; +end; +{$ENDIF} +{$ENDIF} + +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TDatasetField'}{$ENDIF} +{$IFDEF class_helper_present} +{$IFNDEF FPC} +type + TDatasetField_PSHelper = class helper for TDatasetField + public + procedure INCLUDEOBJECTFIELD_W(const T: BOOLEAN); + procedure INCLUDEOBJECTFIELD_R(var T: BOOLEAN); + procedure NESTEDDATASET_R(var T: TDATASET); + end; +procedure TDatasetField_PSHelper.INCLUDEOBJECTFIELD_W(const T: BOOLEAN); +begin Self.INCLUDEOBJECTFIELD := T; end; + +procedure TDatasetField_PSHelper.INCLUDEOBJECTFIELD_R(var T: BOOLEAN); +begin T := Self.INCLUDEOBJECTFIELD; end; + +procedure TDatasetField_PSHelper.NESTEDDATASET_R(var T: TDATASET); +begin T := Self.NESTEDDATASET; end; + +procedure RIRegisterTDATASETFIELD(Cl: TPSRuntimeClassImporter); +Begin + with Cl.Add(TDataSetField) do begin + RegisterPropertyHelper(@TDataSetField.NESTEDDATASET_R,nil,'NestedDataSet'); + RegisterPropertyHelper(@TDataSetField.INCLUDEOBJECTFIELD_R,@TDataSetField.INCLUDEOBJECTFIELD_W,'IncludeObjectField'); + end; +end; + +{$ENDIF} +{$ELSE} +{$IFNDEF FPC} procedure TDATASETFIELDINCLUDEOBJECTFIELD_W(Self: TDATASETFIELD; const T: BOOLEAN); begin Self.INCLUDEOBJECTFIELD := T; end; @@ -541,6 +1636,66 @@ begin T := Self.INCLUDEOBJECTFIELD; end; procedure TDATASETFIELDNESTEDDATASET_R(Self: TDATASETFIELD; var T: TDATASET); begin T := Self.NESTEDDATASET; end; +procedure RIRegisterTDATASETFIELD(Cl: TPSRuntimeClassImporter); +Begin +with Cl.Add(TDATASETFIELD) do + begin + RegisterPropertyHelper(@TDATASETFIELDNESTEDDATASET_R,nil,'NestedDataSet'); + RegisterPropertyHelper(@TDATASETFIELDINCLUDEOBJECTFIELD_R,@TDATASETFIELDINCLUDEOBJECTFIELD_W,'IncludeObjectField'); + end; +end; + +{$ENDIF} +{$ENDIF} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TObjectField'}{$ENDIF} +{$IFNDEF FPC} +{$IFDEF class_helper_present} +type + TObjectField_PSHelper = class helper for TObjectField + public + procedure OBJECTTYPE_W(const T: String); + procedure OBJECTTYPE_R(var T: String); + procedure UNNAMED_R(var T: BOOLEAN); + procedure FIELDVALUES_W(const T: VARIANT; const t1: INTEGER); + procedure FIELDVALUES_R(var T: VARIANT; const t1: INTEGER); + procedure FIELDS_R(var T: TFIELDS); + procedure FIELDCOUNT_R(var T: INTEGER); + end; +procedure TObjectField_PSHelper.OBJECTTYPE_W(const T: String); +begin Self.OBJECTTYPE := T; end; + +procedure TObjectField_PSHelper.OBJECTTYPE_R(var T: String); +begin T := Self.OBJECTTYPE; end; + +procedure TObjectField_PSHelper.UNNAMED_R(var T: BOOLEAN); +begin T := Self.UNNAMED; end; + +procedure TObjectField_PSHelper.FIELDVALUES_W(const T: VARIANT; const t1: INTEGER); +begin Self.FIELDVALUES[t1] := T; end; + +procedure TObjectField_PSHelper.FIELDVALUES_R(var T: VARIANT; const t1: INTEGER); +begin T := Self.FIELDVALUES[t1]; end; + +procedure TObjectField_PSHelper.FIELDS_R(var T: TFIELDS); +begin T := Self.FIELDS; end; + +procedure TObjectField_PSHelper.FIELDCOUNT_R(var T: INTEGER); +begin T := Self.FIELDCOUNT; end; + +procedure RIRegisterTOBJECTFIELD(Cl: TPSRuntimeClassImporter); +Begin +with Cl.Add(TObjectField) do + begin + RegisterPropertyHelper(@TObjectField.FIELDCOUNT_R,nil,'FieldCount'); + RegisterPropertyHelper(@TObjectField.FIELDS_R,nil,'Fields'); + RegisterPropertyHelper(@TObjectField.FIELDVALUES_R,@TObjectField.FIELDVALUES_W,'FieldValues'); + RegisterPropertyHelper(@TObjectField.UNNAMED_R,nil,'UnNamed'); + RegisterPropertyHelper(@TObjectField.OBJECTTYPE_R,@TObjectField.OBJECTTYPE_W,'ObjectType'); + end; +end; +{$ELSE} procedure TOBJECTFIELDOBJECTTYPE_W(Self: TOBJECTFIELD; const T: String); begin Self.OBJECTTYPE := T; end; @@ -561,9 +1716,120 @@ begin T := Self.FIELDS; end; procedure TOBJECTFIELDFIELDCOUNT_R(Self: TOBJECTFIELD; var T: INTEGER); begin T := Self.FIELDCOUNT; end; + +procedure RIRegisterTOBJECTFIELD(Cl: TPSRuntimeClassImporter); +Begin +with Cl.Add(TOBJECTFIELD) do + begin + RegisterPropertyHelper(@TOBJECTFIELDFIELDCOUNT_R,nil,'FieldCount'); + RegisterPropertyHelper(@TOBJECTFIELDFIELDS_R,nil,'Fields'); + RegisterPropertyHelper(@TOBJECTFIELDFIELDVALUES_R,@TOBJECTFIELDFIELDVALUES_W,'FieldValues'); + RegisterPropertyHelper(@TOBJECTFIELDUNNAMED_R,nil,'UnNamed'); + RegisterPropertyHelper(@TOBJECTFIELDOBJECTTYPE_R,@TOBJECTFIELDOBJECTTYPE_W,'ObjectType'); + end; +end; +{$ENDIF} +{$ENDIF} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TBlobField'}{$ENDIF} +{$IFDEF class_helper_present} +type + TBlobField_PSHelper = class helper for TBlobField + public + {$IFNDEF FPC} + {$IFDEF DELPHI6UP} + procedure GRAPHICHEADER_W(const T: BOOLEAN); + procedure GRAPHICHEADER_R(var T: BOOLEAN); + {$ENDIF} + {$ENDIF} + procedure BLOBTYPE_W(const T: TBLOBTYPE); + procedure BLOBTYPE_R(var T: TBLOBTYPE); + procedure TRANSLITERATE_W(const T: BOOLEAN); + procedure TRANSLITERATE_R(var T: BOOLEAN); + procedure VALUE_W(const T: String); + procedure VALUE_R(var T: String); + procedure MODIFIED_W(const T: BOOLEAN); + procedure MODIFIED_R(var T: BOOLEAN); + procedure BLOBSIZE_R(var T: INTEGER); + end; + +{$IFNDEF FPC} +{$IFDEF DELPHI6UP} +procedure TBlobField_PSHelper.GRAPHICHEADER_W(const T: BOOLEAN); +begin Self.GRAPHICHEADER := T; end; + +procedure TBlobField_PSHelper.GRAPHICHEADER_R(var T: BOOLEAN); +begin T := Self.GRAPHICHEADER; end; +{$ENDIF} {$ENDIF} +procedure TBlobField_PSHelper.BLOBTYPE_W(const T: TBLOBTYPE); +begin Self.BLOBTYPE := T; end; +procedure TBlobField_PSHelper.BLOBTYPE_R(var T: TBLOBTYPE); +begin T := Self.BLOBTYPE; end; + +procedure TBlobField_PSHelper.TRANSLITERATE_W(const T: BOOLEAN); +begin Self.TRANSLITERATE := T; end; + +procedure TBlobField_PSHelper.TRANSLITERATE_R(var T: BOOLEAN); +begin T := Self.TRANSLITERATE; end; + +procedure TBlobField_PSHelper.VALUE_W(const T: String); +{$IFDEF DELPHI2009UP} +var + b: TBytes; +begin + setLEngth(b, Length(T)); + Move(T[1], b[0], Length(T)); + self.Value := b; + {$ELSE} +begin + Self.VALUE := T; + {$ENDIF} +end; + +procedure TBlobField_PSHelper.VALUE_R(var T: String); +begin +{$IFDEF DELPHI2009UP} + SetLength(t, Length(SElf.Value)); + Move(Self.Value[0], t[1], LEngth(T)); +{$ELSE} + T := Self.VALUE; +{$ENDIF} +end; + +procedure TBlobField_PSHelper.MODIFIED_W(const T: BOOLEAN); +begin Self.MODIFIED := T; end; + +procedure TBlobField_PSHelper.MODIFIED_R(var T: BOOLEAN); +begin T := Self.MODIFIED; end; + +procedure TBlobField_PSHelper.BLOBSIZE_R(var T: INTEGER); +begin T := Self.BLOBSIZE; end; + +procedure RIRegisterTBLOBFIELD(Cl: TPSRuntimeClassImporter); +Begin +with Cl.Add(TBLOBFIELD) do + begin + RegisterMethod(@TBlobField.LOADFROMFILE, 'LoadFromFile'); + RegisterMethod(@TBlobField.LOADFROMSTREAM, 'LoadFromStream'); + RegisterMethod(@TBlobField.SAVETOFILE, 'SaveToFile'); + RegisterMethod(@TBlobField.SAVETOSTREAM, 'SaveToStream'); + RegisterPropertyHelper(@TBlobField.BLOBSIZE_R,nil,'BlobSize'); + RegisterPropertyHelper(@TBlobField.MODIFIED_R,@TBlobField.MODIFIED_W,'Modified'); + RegisterPropertyHelper(@TBlobField.VALUE_R,@TBlobField.VALUE_W,'Value'); + RegisterPropertyHelper(@TBlobField.TRANSLITERATE_R,@TBlobField.TRANSLITERATE_W,'Transliterate'); + RegisterPropertyHelper(@TBlobField.BLOBTYPE_R,@TBlobField.BLOBTYPE_W,'BlobType'); +{$IFNDEF FPC} +{$IFDEF DELPHI6UP} + RegisterPropertyHelper(@TBlobField.GRAPHICHEADER_R,@TBlobField.GRAPHICHEADER_W,'GraphicHeader'); +{$ENDIF} +{$ENDIF} + end; +end; +{$ELSE} {$IFNDEF FPC} {$IFDEF DELPHI6UP} procedure TBLOBFIELDGRAPHICHEADER_W(Self: TBLOBFIELD; const T: BOOLEAN); @@ -619,8 +1885,91 @@ begin T := Self.MODIFIED; end; procedure TBLOBFIELDBLOBSIZE_R(Self: TBLOBFIELD; var T: INTEGER); begin T := Self.BLOBSIZE; end; +procedure RIRegisterTBLOBFIELD(Cl: TPSRuntimeClassImporter); +Begin +with Cl.Add(TBLOBFIELD) do + begin + RegisterMethod(@TBLOBFIELD.LOADFROMFILE, 'LoadFromFile'); + RegisterMethod(@TBLOBFIELD.LOADFROMSTREAM, 'LoadFromStream'); + RegisterMethod(@TBLOBFIELD.SAVETOFILE, 'SaveToFile'); + RegisterMethod(@TBLOBFIELD.SAVETOSTREAM, 'SaveToStream'); + RegisterPropertyHelper(@TBLOBFIELDBLOBSIZE_R,nil,'BlobSize'); + RegisterPropertyHelper(@TBLOBFIELDMODIFIED_R,@TBLOBFIELDMODIFIED_W,'Modified'); + RegisterPropertyHelper(@TBLOBFIELDVALUE_R,@TBLOBFIELDVALUE_W,'Value'); + RegisterPropertyHelper(@TBLOBFIELDTRANSLITERATE_R,@TBLOBFIELDTRANSLITERATE_W,'Transliterate'); + RegisterPropertyHelper(@TBLOBFIELDBLOBTYPE_R,@TBLOBFIELDBLOBTYPE_W,'BlobType'); {$IFNDEF FPC} {$IFDEF DELPHI6UP} + RegisterPropertyHelper(@TBLOBFIELDGRAPHICHEADER_R,@TBLOBFIELDGRAPHICHEADER_W,'GraphicHeader'); +{$ENDIF} +{$ENDIF} + end; +end; +{$ENDIF} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TFMTBCDField'}{$ENDIF} +{$IFNDEF FPC}{$IFDEF DELPHI6UP} +{$IFDEF class_helper_present} +type + TFMTBCDField_PSHelper = class helper for TFMTBCDField + public + procedure PRECISION_W(const T: INTEGER); + procedure PRECISION_R(var T: INTEGER); + procedure MINVALUE_W(const T: String); + procedure MINVALUE_R(var T: String); + procedure MAXVALUE_W(const T: String); + procedure MAXVALUE_R(var T: String); + procedure CURRENCY_W(const T: BOOLEAN); + procedure CURRENCY_R(var T: BOOLEAN); + procedure VALUE_W(const T: TBCD); + procedure VALUE_R(var T: TBCD); + end; + +procedure TFMTBCDField_PSHelper.PRECISION_W(const T: INTEGER); +begin Self.PRECISION := T; end; + +procedure TFMTBCDField_PSHelper.PRECISION_R(var T: INTEGER); +begin T := Self.PRECISION; end; + +procedure TFMTBCDField_PSHelper.MINVALUE_W(const T: String); +begin Self.MINVALUE := T; end; + +procedure TFMTBCDField_PSHelper.MINVALUE_R(var T: String); +begin T := Self.MINVALUE; end; + +procedure TFMTBCDField_PSHelper.MAXVALUE_W(const T: String); +begin Self.MAXVALUE := T; end; + +procedure TFMTBCDField_PSHelper.MAXVALUE_R(var T: String); +begin T := Self.MAXVALUE; end; + +procedure TFMTBCDField_PSHelper.CURRENCY_W(const T: BOOLEAN); +begin Self.CURRENCY := T; end; + +procedure TFMTBCDField_PSHelper.CURRENCY_R(var T: BOOLEAN); +begin T := Self.CURRENCY; end; + +procedure TFMTBCDField_PSHelper.VALUE_W(const T: TBCD); +begin Self.VALUE := T; end; + +procedure TFMTBCDField_PSHelper.VALUE_R(var T: TBCD); +begin T := Self.VALUE; end; + +procedure RIRegisterTFMTBCDFIELD(Cl: TPSRuntimeClassImporter); +Begin +with Cl.Add(TFMTBCDFIELD) do + begin + RegisterPropertyHelper(@TFMTBCDField.VALUE_R,@TFMTBCDField.VALUE_W,'Value'); + RegisterPropertyHelper(@TFMTBCDField.CURRENCY_R,@TFMTBCDField.CURRENCY_W,'Currency'); + RegisterPropertyHelper(@TFMTBCDField.MAXVALUE_R,@TFMTBCDField.MAXVALUE_W,'MaxValue'); + RegisterPropertyHelper(@TFMTBCDField.MINVALUE_R,@TFMTBCDField.MINVALUE_W,'MinValue'); + RegisterPropertyHelper(@TFMTBCDField.PRECISION_R,@TFMTBCDField.PRECISION_W,'Precision'); + end; +end; + +{$ELSE} + procedure TFMTBCDFIELDPRECISION_W(Self: TFMTBCDFIELD; const T: INTEGER); begin Self.PRECISION := T; end; @@ -650,9 +1999,84 @@ begin Self.VALUE := T; end; procedure TFMTBCDFIELDVALUE_R(Self: TFMTBCDFIELD; var T: TBCD); begin T := Self.VALUE; end; -{$ENDIF} -procedure TBCDFIELDPRECISION_W(Self: TBCDFIELD; const T: INTEGER); +procedure RIRegisterTFMTBCDFIELD(Cl: TPSRuntimeClassImporter); +Begin +with Cl.Add(TFMTBCDFIELD) do + begin + RegisterPropertyHelper(@TFMTBCDFIELDVALUE_R,@TFMTBCDFIELDVALUE_W,'Value'); + RegisterPropertyHelper(@TFMTBCDFIELDCURRENCY_R,@TFMTBCDFIELDCURRENCY_W,'Currency'); + RegisterPropertyHelper(@TFMTBCDFIELDMAXVALUE_R,@TFMTBCDFIELDMAXVALUE_W,'MaxValue'); + RegisterPropertyHelper(@TFMTBCDFIELDMINVALUE_R,@TFMTBCDFIELDMINVALUE_W,'MinValue'); + RegisterPropertyHelper(@TFMTBCDFIELDPRECISION_R,@TFMTBCDFIELDPRECISION_W,'Precision'); + end; +end; + +{$ENDIF} +{$ENDIF}{$ENDIF} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TBCDField'}{$ENDIF} +{$IFNDEF FPC} +{$IFDEF class_helper_present} +type + TBCDField_PSHelper = class helper for TBCDField + public + procedure PRECISION_W(const T: INTEGER); + procedure PRECISION_R(var T: INTEGER); + procedure MINVALUE_W(const T: CURRENCY); + procedure MINVALUE_R(var T: CURRENCY); + procedure MAXVALUE_W(const T: CURRENCY); + procedure MAXVALUE_R(var T: CURRENCY); + procedure CURRENCY_W(const T: BOOLEAN); + procedure CURRENCY_R(var T: BOOLEAN); + procedure VALUE_W(const T: CURRENCY); + procedure VALUE_R(var T: CURRENCY); + end; + +procedure TBCDField_PSHelper.PRECISION_W(const T: INTEGER); +begin Self.PRECISION := T; end; + +procedure TBCDField_PSHelper.PRECISION_R(var T: INTEGER); +begin T := Self.PRECISION; end; + +procedure TBCDField_PSHelper.MINVALUE_W(const T: CURRENCY); +begin Self.MINVALUE := T; end; + +procedure TBCDField_PSHelper.MINVALUE_R(var T: CURRENCY); +begin T := Self.MINVALUE; end; + +procedure TBCDField_PSHelper.MAXVALUE_W(const T: CURRENCY); +begin Self.MAXVALUE := T; end; + +procedure TBCDField_PSHelper.MAXVALUE_R(var T: CURRENCY); +begin T := Self.MAXVALUE; end; + +procedure TBCDField_PSHelper.CURRENCY_W(const T: BOOLEAN); +begin Self.CURRENCY := T; end; + +procedure TBCDField_PSHelper.CURRENCY_R(var T: BOOLEAN); +begin T := Self.CURRENCY; end; + +procedure TBCDField_PSHelper.VALUE_W(const T: CURRENCY); +begin Self.VALUE := T; end; + +procedure TBCDField_PSHelper.VALUE_R(var T: CURRENCY); +begin T := Self.VALUE; end; + +procedure RIRegisterTBCDFIELD(Cl: TPSRuntimeClassImporter); +Begin +with Cl.Add(TBCDFIELD) do + begin + RegisterPropertyHelper(@TBCDField.VALUE_R,@TBCDField.VALUE_W,'Value'); + RegisterPropertyHelper(@TBCDField.CURRENCY_R,@TBCDField.CURRENCY_W,'Currency'); + RegisterPropertyHelper(@TBCDField.MAXVALUE_R,@TBCDField.MAXVALUE_W,'MaxValue'); + RegisterPropertyHelper(@TBCDField.MINVALUE_R,@TBCDField.MINVALUE_W,'MinValue'); + RegisterPropertyHelper(@TBCDField.PRECISION_R,@TBCDField.PRECISION_W,'Precision'); + end; +end; +{$ELSE} +procedure TBCDFIELDPRECISION_W(Self: TBCDField; const T: INTEGER); begin Self.PRECISION := T; end; procedure TBCDFIELDPRECISION_R(Self: TBCDFIELD; var T: INTEGER); @@ -681,10 +2105,54 @@ begin Self.VALUE := T; end; procedure TBCDFIELDVALUE_R(Self: TBCDFIELD; var T: CURRENCY); begin T := Self.VALUE; end; -{$ENDIF} +procedure RIRegisterTBCDFIELD(Cl: TPSRuntimeClassImporter); +Begin + with Cl.Add(TBCDFIELD) do begin + RegisterPropertyHelper(@TBCDFIELDVALUE_R,@TBCDFIELDVALUE_W,'Value'); + RegisterPropertyHelper(@TBCDFIELDCURRENCY_R,@TBCDFIELDCURRENCY_W,'Currency'); + RegisterPropertyHelper(@TBCDFIELDMAXVALUE_R,@TBCDFIELDMAXVALUE_W,'MaxValue'); + RegisterPropertyHelper(@TBCDFIELDMINVALUE_R,@TBCDFIELDMINVALUE_W,'MinValue'); + RegisterPropertyHelper(@TBCDFIELDPRECISION_R,@TBCDFIELDPRECISION_W,'Precision'); + end; +end; +{$ENDIF class_helper_present} +{$ENDIF FPC} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} -procedure TDATETIMEFIELDDISPLAYFORMAT_W(Self: TDATETIMEFIELD; const T: String); +{$IFDEF DELPHI10UP}{$REGION 'TDateTimeField'}{$ENDIF} +{$IFDEF class_helper_present} +type + TDateTimeField_PSHelper = class helper for TDateTimeField + public + procedure DISPLAYFORMAT_W(const T: String); + procedure DISPLAYFORMAT_R(var T: String); + procedure VALUE_W(const T: TDATETIME); + procedure VALUE_R(var T: TDATETIME); + end; + +procedure TDateTimeField_PSHelper.DISPLAYFORMAT_W(const T: String); +begin Self.DISPLAYFORMAT := T; end; + +procedure TDateTimeField_PSHelper.DISPLAYFORMAT_R(var T: String); +begin T := Self.DISPLAYFORMAT; end; + +procedure TDateTimeField_PSHelper.VALUE_W(const T: TDATETIME); +begin Self.VALUE := T; end; + +procedure TDateTimeField_PSHelper.VALUE_R(var T: TDATETIME); +begin T := Self.VALUE; end; + +procedure RIRegisterTDATETIMEFIELD(Cl: TPSRuntimeClassImporter); +Begin +with Cl.Add(TDateTimeField) do + begin + RegisterPropertyHelper(@TDateTimeField.VALUE_R,@TDateTimeField.VALUE_W,'Value'); + RegisterPropertyHelper(@TDateTimeField.DISPLAYFORMAT_R,@TDateTimeField.DISPLAYFORMAT_W,'DisplayFormat'); + end; +end; +{$ELSE} +procedure TDATETIMEFIELDDISPLAYFORMAT_W(Self: TDateTimeField; const T: String); begin Self.DISPLAYFORMAT := T; end; procedure TDATETIMEFIELDDISPLAYFORMAT_R(Self: TDATETIMEFIELD; var T: String); @@ -696,7 +2164,50 @@ begin Self.VALUE := T; end; procedure TDATETIMEFIELDVALUE_R(Self: TDATETIMEFIELD; var T: TDATETIME); begin T := Self.VALUE; end; -procedure TBOOLEANFIELDDISPLAYVALUES_W(Self: TBOOLEANFIELD; const T: String); +procedure RIRegisterTDATETIMEFIELD(Cl: TPSRuntimeClassImporter); +Begin +with Cl.Add(TDATETIMEFIELD) do + begin + RegisterPropertyHelper(@TDATETIMEFIELDVALUE_R,@TDATETIMEFIELDVALUE_W,'Value'); + RegisterPropertyHelper(@TDATETIMEFIELDDISPLAYFORMAT_R,@TDATETIMEFIELDDISPLAYFORMAT_W,'DisplayFormat'); + end; +end; +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TBooleanField'}{$ENDIF} +{$IFDEF class_helper_present} +type + TBooleanField_PSHelper = class helper for TBooleanField + public + procedure DISPLAYVALUES_W(const T: String); + procedure DISPLAYVALUES_R(var T: String); + procedure VALUE_W(const T: BOOLEAN); + procedure VALUE_R(var T: BOOLEAN); + end; + +procedure TBooleanField_PSHelper.DISPLAYVALUES_W(const T: String); +begin Self.DISPLAYVALUES := T; end; + +procedure TBooleanField_PSHelper.DISPLAYVALUES_R(var T: String); +begin T := Self.DISPLAYVALUES; end; + +procedure TBooleanField_PSHelper.VALUE_W(const T: BOOLEAN); +begin Self.VALUE := T; end; + +procedure TBooleanField_PSHelper.VALUE_R(var T: BOOLEAN); +begin T := Self.VALUE; end; + +procedure RIRegisterTBOOLEANFIELD(Cl: TPSRuntimeClassImporter); +Begin +with Cl.Add(TBooleanField) do + begin + RegisterPropertyHelper(@TBooleanField.VALUE_R,@TBooleanField.VALUE_W,'Value'); + RegisterPropertyHelper(@TBooleanField.DISPLAYVALUES_R,@TBooleanField.DISPLAYVALUES_W,'DisplayValues'); + end; +end; +{$ELSE} +procedure TBOOLEANFIELDDISPLAYVALUES_W(Self: TBooleanField; const T: String); begin Self.DISPLAYVALUES := T; end; procedure TBOOLEANFIELDDISPLAYVALUES_R(Self: TBOOLEANFIELD; var T: String); @@ -708,7 +2219,83 @@ begin Self.VALUE := T; end; procedure TBOOLEANFIELDVALUE_R(Self: TBOOLEANFIELD; var T: BOOLEAN); begin T := Self.VALUE; end; -procedure TFLOATFIELDPRECISION_W(Self: TFLOATFIELD; const T: INTEGER); +procedure RIRegisterTBOOLEANFIELD(Cl: TPSRuntimeClassImporter); +Begin +with Cl.Add(TBOOLEANFIELD) do + begin + RegisterPropertyHelper(@TBOOLEANFIELDVALUE_R,@TBOOLEANFIELDVALUE_W,'Value'); + RegisterPropertyHelper(@TBOOLEANFIELDDISPLAYVALUES_R,@TBOOLEANFIELDDISPLAYVALUES_W,'DisplayValues'); + end; +end; +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TFloatField'}{$ENDIF} +{$IFDEF class_helper_present} +type + TFloatField_PSHelper = class helper for TFloatField + public + procedure PRECISION_W(const T: INTEGER); + procedure PRECISION_R(var T: INTEGER); + procedure MINVALUE_W(const T: DOUBLE); + procedure MINVALUE_R(var T: DOUBLE); + procedure MAXVALUE_W(const T: DOUBLE); + procedure MAXVALUE_R(var T: DOUBLE); + {$IFNDEF FPC} + procedure CURRENCY_W(const T: BOOLEAN); + procedure CURRENCY_R(var T: BOOLEAN); + {$ENDIF} + procedure VALUE_W(const T: DOUBLE); + procedure VALUE_R(var T: DOUBLE); + end; + +procedure TFloatField_PSHelper.PRECISION_W(const T: INTEGER); +begin Self.PRECISION := T; end; + +procedure TFloatField_PSHelper.PRECISION_R(var T: INTEGER); +begin T := Self.PRECISION; end; + +procedure TFloatField_PSHelper.MINVALUE_W(const T: DOUBLE); +begin Self.MINVALUE := T; end; + +procedure TFloatField_PSHelper.MINVALUE_R(var T: DOUBLE); +begin T := Self.MINVALUE; end; + +procedure TFloatField_PSHelper.MAXVALUE_W(const T: DOUBLE); +begin Self.MAXVALUE := T; end; + +procedure TFloatField_PSHelper.MAXVALUE_R(var T: DOUBLE); +begin T := Self.MAXVALUE; end; + +{$IFNDEF FPC} +procedure TFloatField_PSHelper.CURRENCY_W(const T: BOOLEAN); +begin Self.CURRENCY := T; end; + +procedure TFloatField_PSHelper.CURRENCY_R(var T: BOOLEAN); +begin T := Self.CURRENCY; end; +{$ENDIF} + +procedure TFloatField_PSHelper.VALUE_W(const T: DOUBLE); +begin Self.VALUE := T; end; + +procedure TFloatField_PSHelper.VALUE_R(var T: DOUBLE); +begin T := Self.VALUE; end; + +procedure RIRegisterTFLOATFIELD(Cl: TPSRuntimeClassImporter); +Begin + with Cl.Add(TFloatField) do + begin + {$IFNDEF FPC} + RegisterPropertyHelper(@TFloatField.CURRENCY_R,@TFloatField.CURRENCY_W,'Currency'); + {$ENDIF} + RegisterPropertyHelper(@TFloatField.VALUE_R,@TFloatField.VALUE_W,'Value'); + RegisterPropertyHelper(@TFloatField.MAXVALUE_R,@TFloatField.MAXVALUE_W,'MaxValue'); + RegisterPropertyHelper(@TFloatField.MINVALUE_R,@TFloatField.MINVALUE_W,'MinValue'); + RegisterPropertyHelper(@TFloatField.PRECISION_R,@TFloatField.PRECISION_W,'Precision'); + end; +end; +{$ELSE} +procedure TFLOATFIELDPRECISION_W(Self: TFloatField; const T: INTEGER); begin Self.PRECISION := T; end; procedure TFLOATFIELDPRECISION_R(Self: TFLOATFIELD; var T: INTEGER); @@ -740,7 +2327,73 @@ begin Self.VALUE := T; end; procedure TFLOATFIELDVALUE_R(Self: TFLOATFIELD; var T: DOUBLE); begin T := Self.VALUE; end; -procedure TLARGEINTFIELDMINVALUE_W(Self: TLARGEINTFIELD; const T: LARGEINT); +procedure RIRegisterTFLOATFIELD(Cl: TPSRuntimeClassImporter); +Begin +with Cl.Add(TFLOATFIELD) do + begin + {$IFNDEF FPC} + RegisterPropertyHelper(@TFLOATFIELDCURRENCY_R,@TFLOATFIELDCURRENCY_W,'Currency'); + {$ENDIF} + RegisterPropertyHelper(@TFLOATFIELDVALUE_R,@TFLOATFIELDVALUE_W,'Value'); + RegisterPropertyHelper(@TFLOATFIELDMAXVALUE_R,@TFLOATFIELDMAXVALUE_W,'MaxValue'); + RegisterPropertyHelper(@TFLOATFIELDMINVALUE_R,@TFLOATFIELDMINVALUE_W,'MinValue'); + RegisterPropertyHelper(@TFLOATFIELDPRECISION_R,@TFLOATFIELDPRECISION_W,'Precision'); + end; +end; +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TLargeintField'}{$ENDIF} +{$IFDEF class_helper_present} +type + TLargeintField_PSHelper = class helper for TLargeintField + public + procedure MINVALUE_W(const T: LARGEINT); + procedure MINVALUE_R(var T: LARGEINT); + procedure MAXVALUE_W(const T: LARGEINT); + procedure MAXVALUE_R(var T: LARGEINT); + procedure VALUE_W(const T: LARGEINT); + procedure VALUE_R(var T: LARGEINT); + procedure ASLARGEINT_W(const T: LARGEINT); + procedure ASLARGEINT_R(var T: LARGEINT); + end; + +procedure TLargeintField_PSHelper.MINVALUE_W(const T: LARGEINT); +begin Self.MINVALUE := T; end; + +procedure TLargeintField_PSHelper.MINVALUE_R(var T: LARGEINT); +begin T := Self.MINVALUE; end; + +procedure TLargeintField_PSHelper.MAXVALUE_W(const T: LARGEINT); +begin Self.MAXVALUE := T; end; + +procedure TLargeintField_PSHelper.MAXVALUE_R(var T: LARGEINT); +begin T := Self.MAXVALUE; end; + +procedure TLargeintField_PSHelper.VALUE_W(const T: LARGEINT); +begin Self.VALUE := T; end; + +procedure TLargeintField_PSHelper.VALUE_R(var T: LARGEINT); +begin T := Self.VALUE; end; + +procedure TLargeintField_PSHelper.ASLARGEINT_W(const T: LARGEINT); +begin Self.ASLARGEINT := T; end; + +procedure TLargeintField_PSHelper.ASLARGEINT_R(var T: LARGEINT); +begin T := Self.ASLARGEINT; end; + +procedure RIRegisterTLARGEINTFIELD(Cl: TPSRuntimeClassImporter); +Begin + with Cl.Add(TLargeintField) do + begin + RegisterPropertyHelper(@TLargeintField.ASLARGEINT_R,@TLargeintField.ASLARGEINT_W,'AsLargeInt'); + RegisterPropertyHelper(@TLargeintField.VALUE_R,@TLargeintField.VALUE_W,'Value'); + RegisterPropertyHelper(@TLargeintField.MAXVALUE_R,@TLargeintField.MAXVALUE_W,'MaxValue'); + RegisterPropertyHelper(@TLargeintField.MINVALUE_R,@TLargeintField.MINVALUE_W,'MinValue'); + end; +end; +{$ELSE} +procedure TLARGEINTFIELDMINVALUE_W(Self: TLargeintField; const T: LARGEINT); begin Self.MINVALUE := T; end; procedure TLARGEINTFIELDMINVALUE_R(Self: TLARGEINTFIELD; var T: LARGEINT); @@ -764,7 +2417,60 @@ begin Self.ASLARGEINT := T; end; procedure TLARGEINTFIELDASLARGEINT_R(Self: TLARGEINTFIELD; var T: LARGEINT); begin T := Self.ASLARGEINT; end; -procedure TINTEGERFIELDMINVALUE_W(Self: TINTEGERFIELD; const T: LONGINT); +procedure RIRegisterTLARGEINTFIELD(Cl: TPSRuntimeClassImporter); +Begin +with Cl.Add(TLARGEINTFIELD) do + begin + RegisterPropertyHelper(@TLARGEINTFIELDASLARGEINT_R,@TLARGEINTFIELDASLARGEINT_W,'AsLargeInt'); + RegisterPropertyHelper(@TLARGEINTFIELDVALUE_R,@TLARGEINTFIELDVALUE_W,'Value'); + RegisterPropertyHelper(@TLARGEINTFIELDMAXVALUE_R,@TLARGEINTFIELDMAXVALUE_W,'MaxValue'); + RegisterPropertyHelper(@TLARGEINTFIELDMINVALUE_R,@TLARGEINTFIELDMINVALUE_W,'MinValue'); + end; +end; +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TIntegerField'}{$ENDIF} +{$IFDEF class_helper_present} +type + TIntegerField_PSHelper = class helper for TIntegerField + public + procedure MINVALUE_W(const T: LONGINT); + procedure MINVALUE_R(var T: LONGINT); + procedure MAXVALUE_W(const T: LONGINT); + procedure MAXVALUE_R(var T: LONGINT); + procedure VALUE_W(const T: LONGINT); + procedure VALUE_R(var T: LONGINT); + end; + +procedure TIntegerField_PSHelper.MINVALUE_W(const T: LONGINT); +begin Self.MINVALUE := T; end; + +procedure TIntegerField_PSHelper.MINVALUE_R(var T: LONGINT); +begin T := Self.MINVALUE; end; + +procedure TIntegerField_PSHelper.MAXVALUE_W(const T: LONGINT); +begin Self.MAXVALUE := T; end; + +procedure TIntegerField_PSHelper.MAXVALUE_R(var T: LONGINT); +begin T := Self.MAXVALUE; end; + +procedure TIntegerField_PSHelper.VALUE_W(const T: LONGINT); +begin Self.VALUE := T; end; + +procedure TIntegerField_PSHelper.VALUE_R(var T: LONGINT); +begin T := Self.VALUE; end; + +procedure RIRegisterTINTEGERFIELD(Cl: TPSRuntimeClassImporter); +Begin + with Cl.Add(TIntegerField) do begin + RegisterPropertyHelper(@TIntegerField.VALUE_R,@TIntegerField.VALUE_W,'Value'); + RegisterPropertyHelper(@TIntegerField.MAXVALUE_R,@TIntegerField.MAXVALUE_W,'MaxValue'); + RegisterPropertyHelper(@TIntegerField.MINVALUE_R,@TIntegerField.MINVALUE_W,'MinValue'); + end; +end; +{$ELSE} +procedure TINTEGERFIELDMINVALUE_W(Self: TIntegerField; const T: LONGINT); begin Self.MINVALUE := T; end; procedure TINTEGERFIELDMINVALUE_R(Self: TINTEGERFIELD; var T: LONGINT); @@ -782,7 +2488,50 @@ begin Self.VALUE := T; end; procedure TINTEGERFIELDVALUE_R(Self: TINTEGERFIELD; var T: LONGINT); begin T := Self.VALUE; end; -procedure TNUMERICFIELDEDITFORMAT_W(Self: TNUMERICFIELD; const T: String); +procedure RIRegisterTINTEGERFIELD(Cl: TPSRuntimeClassImporter); +Begin +with Cl.Add(TINTEGERFIELD) do + begin + RegisterPropertyHelper(@TINTEGERFIELDVALUE_R,@TINTEGERFIELDVALUE_W,'Value'); + RegisterPropertyHelper(@TINTEGERFIELDMAXVALUE_R,@TINTEGERFIELDMAXVALUE_W,'MaxValue'); + RegisterPropertyHelper(@TINTEGERFIELDMINVALUE_R,@TINTEGERFIELDMINVALUE_W,'MinValue'); + end; +end; +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TNumericField'}{$ENDIF} +{$IFDEF class_helper_present} +type + TNumericField_PSHelper = class helper for TNumericField + public + procedure EDITFORMAT_W(const T: String); + procedure EDITFORMAT_R(var T: String); + procedure DISPLAYFORMAT_W(const T: String); + procedure DISPLAYFORMAT_R(var T: String); + end; + +procedure TNumericField_PSHelper.EDITFORMAT_W(const T: String); +begin Self.EDITFORMAT := T; end; + +procedure TNumericField_PSHelper.EDITFORMAT_R(var T: String); +begin T := Self.EDITFORMAT; end; + +procedure TNumericField_PSHelper.DISPLAYFORMAT_W(const T: String); +begin Self.DISPLAYFORMAT := T; end; + +procedure TNumericField_PSHelper.DISPLAYFORMAT_R(var T: String); +begin T := Self.DISPLAYFORMAT; end; + +procedure RIRegisterTNUMERICFIELD(Cl: TPSRuntimeClassImporter); +Begin + with Cl.Add(TNumericField) do begin + RegisterPropertyHelper(@TNumericField.DISPLAYFORMAT_R,@TNumericField.DISPLAYFORMAT_W,'DisplayFormat'); + RegisterPropertyHelper(@TNumericField.EDITFORMAT_R,@TNumericField.EDITFORMAT_W,'EditFormat'); + end; +end; +{$ELSE} +procedure TNUMERICFIELDEDITFORMAT_W(Self: TNumericField; const T: String); begin Self.EDITFORMAT := T; end; procedure TNUMERICFIELDEDITFORMAT_R(Self: TNUMERICFIELD; var T: String); @@ -794,14 +2543,106 @@ begin Self.DISPLAYFORMAT := T; end; procedure TNUMERICFIELDDISPLAYFORMAT_R(Self: TNUMERICFIELD; var T: String); begin T := Self.DISPLAYFORMAT; end; +procedure RIRegisterTNUMERICFIELD(Cl: TPSRuntimeClassImporter); +Begin +with Cl.Add(TNUMERICFIELD) do + begin + RegisterPropertyHelper(@TNUMERICFIELDDISPLAYFORMAT_R,@TNUMERICFIELDDISPLAYFORMAT_W,'DisplayFormat'); + RegisterPropertyHelper(@TNUMERICFIELDEDITFORMAT_R,@TNUMERICFIELDEDITFORMAT_W,'EditFormat'); + end; +end; +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TWideStringField'}{$ENDIF} {$IFNDEF FPC} -procedure TWIDESTRINGFIELDVALUE_W(Self: TWIDESTRINGFIELD; const T: WIDESTRING); +{$IFDEF class_helper_present} +type + TWideStringField_PSHelper = class helper for TWideStringField + public + procedure VALUE_W(const T: WIDESTRING); + procedure VALUE_R(var T: WIDESTRING); + end; + +procedure TWideStringField_PSHelper.VALUE_W(const T: WIDESTRING); +begin Self.VALUE := T; end; + +procedure TWideStringField_PSHelper.VALUE_R(var T: WIDESTRING); +begin T := Self.VALUE; end; + +procedure RIRegisterTWIDESTRINGFIELD(Cl: TPSRuntimeClassImporter); +Begin +with Cl.Add(TWideStringField) do + begin + RegisterPropertyHelper(@TWideStringField.VALUE_R,@TWideStringField.VALUE_W,'Value'); + end; +end; +{$ELSE} +procedure TWIDESTRINGFIELDVALUE_W(Self: TWideStringField; const T: WIDESTRING); begin Self.VALUE := T; end; procedure TWIDESTRINGFIELDVALUE_R(Self: TWIDESTRINGFIELD; var T: WIDESTRING); begin T := Self.VALUE; end; -procedure TSTRINGFIELDTRANSLITERATE_W(Self: TSTRINGFIELD; const T: BOOLEAN); +procedure RIRegisterTWIDESTRINGFIELD(Cl: TPSRuntimeClassImporter); +Begin +with Cl.Add(TWIDESTRINGFIELD) do + begin + RegisterPropertyHelper(@TWIDESTRINGFIELDVALUE_R,@TWIDESTRINGFIELDVALUE_W,'Value'); + end; +end; +{$ENDIF class_helper_present} +{$ENDIF FPC} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TStringField'}{$ENDIF} +{$IFDEF class_helper_present} +type + TStringField_PSHelper = class helper for TStringField + public + {$IFNDEF FPC} + procedure TRANSLITERATE_W(const T: BOOLEAN); + procedure TRANSLITERATE_R(var T: BOOLEAN); + procedure FIXEDCHAR_W(const T: BOOLEAN); + procedure FIXEDCHAR_R(var T: BOOLEAN); + {$ENDIF} + procedure VALUE_W(const T: String); + procedure VALUE_R(var T: String); + end; + +{$IFNDEF FPC} +procedure TStringField_PSHelper.TRANSLITERATE_W(const T: BOOLEAN); +begin Self.TRANSLITERATE := T; end; + +procedure TStringField_PSHelper.TRANSLITERATE_R(var T: BOOLEAN); +begin T := Self.TRANSLITERATE; end; + +procedure TStringField_PSHelper.FIXEDCHAR_W(const T: BOOLEAN); +begin Self.FIXEDCHAR := T; end; + +procedure TStringField_PSHelper.FIXEDCHAR_R(var T: BOOLEAN); +begin T := Self.FIXEDCHAR; end; +{$ENDIF} + +procedure TStringField_PSHelper.VALUE_W(const T: String); +begin Self.VALUE := T; end; + +procedure TStringField_PSHelper.VALUE_R(var T: String); +begin T := Self.VALUE; end; + +procedure RIRegisterTSTRINGFIELD(Cl: TPSRuntimeClassImporter); +begin + with Cl.Add(TStringField) do begin + RegisterPropertyHelper(@TStringField.VALUE_R,@TStringField.VALUE_W,'Value'); + {$IFNDEF FPC} + RegisterPropertyHelper(@TStringField.FIXEDCHAR_R,@TStringField.FIXEDCHAR_W,'FixedChar'); + RegisterPropertyHelper(@TStringField.TRANSLITERATE_R,@TStringField.TRANSLITERATE_W,'Transliterate'); + {$ENDIF} + end; +end; +{$ELSE} +{$IFNDEF FPC} +procedure TSTRINGFIELDTRANSLITERATE_W(Self: TStringField; const T: BOOLEAN); begin Self.TRANSLITERATE := T; end; procedure TSTRINGFIELDTRANSLITERATE_R(Self: TSTRINGFIELD; var T: BOOLEAN); @@ -821,7 +2662,543 @@ begin Self.VALUE := T; end; procedure TSTRINGFIELDVALUE_R(Self: TSTRINGFIELD; var T: String); begin T := Self.VALUE; end; -procedure TFIELDONVALIDATE_W(Self: TFIELD; const T: TFIELDNOTIFYEVENT); +procedure RIRegisterTSTRINGFIELD(Cl: TPSRuntimeClassImporter); +Begin +with Cl.Add(TSTRINGFIELD) do + begin + RegisterPropertyHelper(@TSTRINGFIELDVALUE_R,@TSTRINGFIELDVALUE_W,'Value'); + {$IFNDEF FPC} + RegisterPropertyHelper(@TSTRINGFIELDFIXEDCHAR_R,@TSTRINGFIELDFIXEDCHAR_W,'FixedChar'); + RegisterPropertyHelper(@TSTRINGFIELDTRANSLITERATE_R,@TSTRINGFIELDTRANSLITERATE_W,'Transliterate'); + {$ENDIF} + end; +end; +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TField'}{$ENDIF} +{$IFDEF class_helper_present} +type + TField_PSHelper = class helper for TField + public + procedure ONVALIDATE_W(const T: TFIELDNOTIFYEVENT); + procedure ONVALIDATE_R(var T: TFIELDNOTIFYEVENT); + procedure ONSETTEXT_W(const T: TFIELDSETTEXTEVENT); + procedure ONSETTEXT_R(var T: TFIELDSETTEXTEVENT); + procedure ONGETTEXT_W(const T: TFIELDGETTEXTEVENT); + procedure ONGETTEXT_R(var T: TFIELDGETTEXTEVENT); + procedure ONCHANGE_W(const T: TFIELDNOTIFYEVENT); + procedure ONCHANGE_R(var T: TFIELDNOTIFYEVENT); + procedure VISIBLE_W(const T: BOOLEAN); + procedure VISIBLE_R(var T: BOOLEAN); + procedure REQUIRED_W(const T: BOOLEAN); + procedure REQUIRED_R(var T: BOOLEAN); + procedure READONLY_W(const T: BOOLEAN); + procedure READONLY_R(var T: BOOLEAN); + procedure PROVIDERFLAGS_W(const T: TPROVIDERFLAGS); + procedure PROVIDERFLAGS_R(var T: TPROVIDERFLAGS); + procedure ORIGIN_W(const T: String); + procedure ORIGIN_R(var T: String); + procedure LOOKUPCACHE_W(const T: BOOLEAN); + procedure LOOKUPCACHE_R(var T: BOOLEAN); + procedure KEYFIELDS_W(const T: String); + procedure KEYFIELDS_R(var T: String); + procedure LOOKUPRESULTFIELD_W(const T: String); + procedure LOOKUPRESULTFIELD_R(var T: String); + procedure LOOKUPKEYFIELDS_W(const T: String); + procedure LOOKUPKEYFIELDS_R(var T: String); + procedure LOOKUPDATASET_W(const T: TDATASET); + procedure LOOKUPDATASET_R(var T: TDATASET); + procedure IMPORTEDCONSTRAINT_W(const T: String); + procedure IMPORTEDCONSTRAINT_R(var T: String); + procedure INDEX_W(const T: INTEGER); + procedure INDEX_R(var T: INTEGER); + procedure HASCONSTRAINTS_R(var T: BOOLEAN); + procedure FIELDNAME_W(const T: String); + procedure FIELDNAME_R(var T: String); + procedure FIELDKIND_W(const T: TFIELDKIND); + procedure FIELDKIND_R(var T: TFIELDKIND); + procedure DISPLAYWIDTH_W(const T: INTEGER); + procedure DISPLAYWIDTH_R(var T: INTEGER); + procedure DISPLAYLABEL_W(const T: String); + procedure DISPLAYLABEL_R(var T: String); + procedure DEFAULTEXPRESSION_W(const T: String); + procedure DEFAULTEXPRESSION_R(var T: String); + procedure CONSTRAINTERRORMESSAGE_W(const T: String); + procedure CONSTRAINTERRORMESSAGE_R(var T: String); + procedure CUSTOMCONSTRAINT_W(const T: String); + procedure CUSTOMCONSTRAINT_R(var T: String); + {$IFNDEF FPC} + procedure AUTOGENERATEVALUE_W(const T: TAUTOREFRESHFLAG); + procedure AUTOGENERATEVALUE_R(var T: TAUTOREFRESHFLAG); + procedure VALIDCHARS_W(const T: TFIELDCHARS); + procedure VALIDCHARS_R(var T: TFIELDCHARS); + procedure PARENTFIELD_W(const T: TOBJECTFIELD); + procedure PARENTFIELD_R(var T: TOBJECTFIELD); + {$ENDIF} + procedure ALIGNMENT_W(const T: TALIGNMENT); + procedure ALIGNMENT_R(var T: TALIGNMENT); + procedure VALUE_W(const T: VARIANT); + procedure VALUE_R(var T: VARIANT); + procedure TEXT_W(const T: String); + procedure TEXT_R(var T: String); + procedure SIZE_W(const T: INTEGER); + procedure SIZE_R(var T: INTEGER); + procedure OLDVALUE_R(var T: VARIANT); + procedure OFFSET_R(var T: INTEGER); + procedure NEWVALUE_W(const T: VARIANT); + procedure NEWVALUE_R(var T: VARIANT); + procedure LOOKUPLIST_R(var T: TLOOKUPLIST); + {$IFNDEF FPC} + procedure LOOKUP_W(const T: BOOLEAN); + procedure LOOKUP_R(var T: BOOLEAN); + procedure FULLNAME_R(var T: String); + procedure EDITMASKPTR_R(var T: String); + procedure EDITMASK_W(const T: String); + procedure EDITMASK_R(var T: String); + {$ENDIF} + procedure ISNULL_R(var T: BOOLEAN); + procedure ISINDEXFIELD_R(var T: BOOLEAN); + procedure FIELDNO_R(var T: INTEGER); + procedure DISPLAYTEXT_R(var T: String); + procedure DISPLAYNAME_R(var T: String); + procedure DATATYPE_R(var T: TFIELDTYPE); + procedure DATASIZE_R(var T: INTEGER); + procedure DATASET_W(const T: TDATASET); + procedure DATASET_R(var T: TDATASET); + procedure CURVALUE_R(var T: VARIANT); + procedure CANMODIFY_R(var T: BOOLEAN); + procedure CALCULATED_W(const T: BOOLEAN); + procedure CALCULATED_R(var T: BOOLEAN); + procedure ATTRIBUTESET_W(const T: String); + procedure ATTRIBUTESET_R(var T: String); + procedure ASVARIANT_W(const T: VARIANT); + procedure ASVARIANT_R(var T: VARIANT); + procedure ASSTRING_W(const T: String); + procedure ASSTRING_R(var T: String); + procedure ASINTEGER_W(const T: LONGINT); + procedure ASINTEGER_R(var T: LONGINT); + procedure ASFLOAT_W(const T: DOUBLE); + procedure ASFLOAT_R(var T: DOUBLE); + procedure ASDATETIME_W(const T: TDATETIME); + procedure ASDATETIME_R(var T: TDATETIME); + procedure ASCURRENCY_W(const T: CURRENCY); + procedure ASCURRENCY_R(var T: CURRENCY); + procedure ASBOOLEAN_W(const T: BOOLEAN); + procedure ASBOOLEAN_R(var T: BOOLEAN); + {$IFNDEF FPC} + {$IFDEF DELPHI6UP} + procedure ASBCD_W(const T: TBCD); + procedure ASBCD_R(var T: TBCD); + {$ENDIF} + {$ENDIF} + end; + +procedure TField_PSHelper.ONVALIDATE_W(const T: TFIELDNOTIFYEVENT); +begin Self.ONVALIDATE := T; end; + +procedure TField_PSHelper.ONVALIDATE_R(var T: TFIELDNOTIFYEVENT); +begin T := Self.ONVALIDATE; end; + +procedure TField_PSHelper.ONSETTEXT_W(const T: TFIELDSETTEXTEVENT); +begin Self.ONSETTEXT := T; end; + +procedure TField_PSHelper.ONSETTEXT_R(var T: TFIELDSETTEXTEVENT); +begin T := Self.ONSETTEXT; end; + +procedure TField_PSHelper.ONGETTEXT_W(const T: TFIELDGETTEXTEVENT); +begin Self.ONGETTEXT := T; end; + +procedure TField_PSHelper.ONGETTEXT_R(var T: TFIELDGETTEXTEVENT); +begin T := Self.ONGETTEXT; end; + +procedure TField_PSHelper.ONCHANGE_W(const T: TFIELDNOTIFYEVENT); +begin Self.ONCHANGE := T; end; + +procedure TField_PSHelper.ONCHANGE_R(var T: TFIELDNOTIFYEVENT); +begin T := Self.ONCHANGE; end; + +procedure TField_PSHelper.VISIBLE_W(const T: BOOLEAN); +begin Self.VISIBLE := T; end; + +procedure TField_PSHelper.VISIBLE_R(var T: BOOLEAN); +begin T := Self.VISIBLE; end; + +procedure TField_PSHelper.REQUIRED_W(const T: BOOLEAN); +begin Self.REQUIRED := T; end; + +procedure TField_PSHelper.REQUIRED_R(var T: BOOLEAN); +begin T := Self.REQUIRED; end; + +procedure TField_PSHelper.READONLY_W(const T: BOOLEAN); +begin Self.READONLY := T; end; + +procedure TField_PSHelper.READONLY_R(var T: BOOLEAN); +begin T := Self.READONLY; end; + +procedure TField_PSHelper.PROVIDERFLAGS_W(const T: TPROVIDERFLAGS); +begin Self.PROVIDERFLAGS := T; end; + +procedure TField_PSHelper.PROVIDERFLAGS_R(var T: TPROVIDERFLAGS); +begin T := Self.PROVIDERFLAGS; end; + +procedure TField_PSHelper.ORIGIN_W(const T: String); +begin Self.ORIGIN := T; end; + +procedure TField_PSHelper.ORIGIN_R(var T: String); +begin T := Self.ORIGIN; end; + +procedure TField_PSHelper.LOOKUPCACHE_W(const T: BOOLEAN); +begin Self.LOOKUPCACHE := T; end; + +procedure TField_PSHelper.LOOKUPCACHE_R(var T: BOOLEAN); +begin T := Self.LOOKUPCACHE; end; + +procedure TField_PSHelper.KEYFIELDS_W(const T: String); +begin Self.KEYFIELDS := T; end; + +procedure TField_PSHelper.KEYFIELDS_R(var T: String); +begin T := Self.KEYFIELDS; end; + +procedure TField_PSHelper.LOOKUPRESULTFIELD_W(const T: String); +begin Self.LOOKUPRESULTFIELD := T; end; + +procedure TField_PSHelper.LOOKUPRESULTFIELD_R(var T: String); +begin T := Self.LOOKUPRESULTFIELD; end; + +procedure TField_PSHelper.LOOKUPKEYFIELDS_W(const T: String); +begin Self.LOOKUPKEYFIELDS := T; end; + +procedure TField_PSHelper.LOOKUPKEYFIELDS_R(var T: String); +begin T := Self.LOOKUPKEYFIELDS; end; + +procedure TField_PSHelper.LOOKUPDATASET_W(const T: TDATASET); +begin Self.LOOKUPDATASET := T; end; + +procedure TField_PSHelper.LOOKUPDATASET_R(var T: TDATASET); +begin T := Self.LOOKUPDATASET; end; + +procedure TField_PSHelper.IMPORTEDCONSTRAINT_W(const T: String); +begin Self.IMPORTEDCONSTRAINT := T; end; + +procedure TField_PSHelper.IMPORTEDCONSTRAINT_R(var T: String); +begin T := Self.IMPORTEDCONSTRAINT; end; + +procedure TField_PSHelper.INDEX_W(const T: INTEGER); +begin Self.INDEX := T; end; + +procedure TField_PSHelper.INDEX_R(var T: INTEGER); +begin T := Self.INDEX; end; + +procedure TField_PSHelper.HASCONSTRAINTS_R(var T: BOOLEAN); +begin T := Self.HASCONSTRAINTS; end; + +procedure TField_PSHelper.FIELDNAME_W(const T: String); +begin Self.FIELDNAME := T; end; + +procedure TField_PSHelper.FIELDNAME_R(var T: String); +begin T := Self.FIELDNAME; end; + +procedure TField_PSHelper.FIELDKIND_W(const T: TFIELDKIND); +begin Self.FIELDKIND := T; end; + +procedure TField_PSHelper.FIELDKIND_R(var T: TFIELDKIND); +begin T := Self.FIELDKIND; end; + +procedure TField_PSHelper.DISPLAYWIDTH_W(const T: INTEGER); +begin Self.DISPLAYWIDTH := T; end; + +procedure TField_PSHelper.DISPLAYWIDTH_R(var T: INTEGER); +begin T := Self.DISPLAYWIDTH; end; + +procedure TField_PSHelper.DISPLAYLABEL_W(const T: String); +begin Self.DISPLAYLABEL := T; end; + +procedure TField_PSHelper.DISPLAYLABEL_R(var T: String); +begin T := Self.DISPLAYLABEL; end; + +procedure TField_PSHelper.DEFAULTEXPRESSION_W(const T: String); +begin Self.DEFAULTEXPRESSION := T; end; + +procedure TField_PSHelper.DEFAULTEXPRESSION_R(var T: String); +begin T := Self.DEFAULTEXPRESSION; end; + +procedure TField_PSHelper.CONSTRAINTERRORMESSAGE_W(const T: String); +begin Self.CONSTRAINTERRORMESSAGE := T; end; + +procedure TField_PSHelper.CONSTRAINTERRORMESSAGE_R(var T: String); +begin T := Self.CONSTRAINTERRORMESSAGE; end; + +procedure TField_PSHelper.CUSTOMCONSTRAINT_W(const T: String); +begin Self.CUSTOMCONSTRAINT := T; end; + +procedure TField_PSHelper.CUSTOMCONSTRAINT_R(var T: String); +begin T := Self.CUSTOMCONSTRAINT; end; + +{$IFNDEF FPC} +procedure TField_PSHelper.AUTOGENERATEVALUE_W(const T: TAUTOREFRESHFLAG); +begin Self.AUTOGENERATEVALUE := T; end; + +procedure TField_PSHelper.AUTOGENERATEVALUE_R(var T: TAUTOREFRESHFLAG); +begin T := Self.AUTOGENERATEVALUE; end; + +procedure TField_PSHelper.VALIDCHARS_W(const T: TFIELDCHARS); +begin Self.VALIDCHARS := T; end; + +procedure TField_PSHelper.VALIDCHARS_R(var T: TFIELDCHARS); +begin T := Self.VALIDCHARS; end; + +procedure TField_PSHelper.PARENTFIELD_W(const T: TOBJECTFIELD); +begin Self.PARENTFIELD := T; end; + +procedure TField_PSHelper.PARENTFIELD_R(var T: TOBJECTFIELD); +begin T := Self.PARENTFIELD; end; +{$ENDIF} + +procedure TField_PSHelper.ALIGNMENT_W(const T: TALIGNMENT); +begin Self.ALIGNMENT := T; end; + +procedure TField_PSHelper.ALIGNMENT_R(var T: TALIGNMENT); +begin T := Self.ALIGNMENT; end; + +procedure TField_PSHelper.VALUE_W(const T: VARIANT); +begin Self.VALUE := T; end; + +procedure TField_PSHelper.VALUE_R(var T: VARIANT); +begin T := Self.VALUE; end; + +procedure TField_PSHelper.TEXT_W(const T: String); +begin Self.TEXT := T; end; + +procedure TField_PSHelper.TEXT_R(var T: String); +begin T := Self.TEXT; end; + +procedure TField_PSHelper.SIZE_W(const T: INTEGER); +begin Self.SIZE := T; end; + +procedure TField_PSHelper.SIZE_R(var T: INTEGER); +begin T := Self.SIZE; end; + +procedure TField_PSHelper.OLDVALUE_R(var T: VARIANT); +begin T := Self.OLDVALUE; end; + +procedure TField_PSHelper.OFFSET_R(var T: INTEGER); +begin T := Self.OFFSET; end; + +procedure TField_PSHelper.NEWVALUE_W(const T: VARIANT); +begin Self.NEWVALUE := T; end; + +procedure TField_PSHelper.NEWVALUE_R(var T: VARIANT); +begin T := Self.NEWVALUE; end; + +procedure TField_PSHelper.LOOKUPLIST_R(var T: TLOOKUPLIST); +begin T := Self.LOOKUPLIST; end; + +{$IFNDEF FPC} +procedure TField_PSHelper.LOOKUP_W(const T: BOOLEAN); +begin Self.LOOKUP := T; end; + +procedure TField_PSHelper.LOOKUP_R(var T: BOOLEAN); +begin T := Self.LOOKUP; end; + +procedure TField_PSHelper.FULLNAME_R(var T: String); +begin T := Self.FULLNAME; end; + + +procedure TField_PSHelper.EDITMASKPTR_R(var T: String); +begin T := Self.EDITMASKPTR; end; + +procedure TField_PSHelper.EDITMASK_W(const T: String); +begin Self.EDITMASK := T; end; + +procedure TField_PSHelper.EDITMASK_R(var T: String); +begin T := Self.EDITMASK; end; + +{$ENDIF} + +procedure TField_PSHelper.ISNULL_R(var T: BOOLEAN); +begin T := Self.ISNULL; end; + +procedure TField_PSHelper.ISINDEXFIELD_R(var T: BOOLEAN); +begin T := Self.ISINDEXFIELD; end; + +procedure TField_PSHelper.FIELDNO_R(var T: INTEGER); +begin T := Self.FIELDNO; end; + + + +procedure TField_PSHelper.DISPLAYTEXT_R(var T: String); +begin T := Self.DISPLAYTEXT; end; + +procedure TField_PSHelper.DISPLAYNAME_R(var T: String); +begin T := Self.DISPLAYNAME; end; + +procedure TField_PSHelper.DATATYPE_R(var T: TFIELDTYPE); +begin T := Self.DATATYPE; end; + +procedure TField_PSHelper.DATASIZE_R(var T: INTEGER); +begin T := Self.DATASIZE; end; + +procedure TField_PSHelper.DATASET_W(const T: TDATASET); +begin Self.DATASET := T; end; + +procedure TField_PSHelper.DATASET_R(var T: TDATASET); +begin T := Self.DATASET; end; + +procedure TField_PSHelper.CURVALUE_R(var T: VARIANT); +begin T := Self.CURVALUE; end; + +procedure TField_PSHelper.CANMODIFY_R(var T: BOOLEAN); +begin T := Self.CANMODIFY; end; + +procedure TField_PSHelper.CALCULATED_W(const T: BOOLEAN); +begin Self.CALCULATED := T; end; + +procedure TField_PSHelper.CALCULATED_R(var T: BOOLEAN); +begin T := Self.CALCULATED; end; + +procedure TField_PSHelper.ATTRIBUTESET_W(const T: String); +begin Self.ATTRIBUTESET := T; end; + +procedure TField_PSHelper.ATTRIBUTESET_R(var T: String); +begin T := Self.ATTRIBUTESET; end; + +procedure TField_PSHelper.ASVARIANT_W(const T: VARIANT); +begin Self.ASVARIANT := T; end; + +procedure TField_PSHelper.ASVARIANT_R(var T: VARIANT); +begin T := Self.ASVARIANT; end; + +procedure TField_PSHelper.ASSTRING_W(const T: String); +begin Self.ASSTRING := T; end; + +procedure TField_PSHelper.ASSTRING_R(var T: String); +begin T := Self.ASSTRING; end; + +procedure TField_PSHelper.ASINTEGER_W(const T: LONGINT); +begin Self.ASINTEGER := T; end; + +procedure TField_PSHelper.ASINTEGER_R(var T: LONGINT); +begin T := Self.ASINTEGER; end; + +procedure TField_PSHelper.ASFLOAT_W(const T: DOUBLE); +begin Self.ASFLOAT := T; end; + +procedure TField_PSHelper.ASFLOAT_R(var T: DOUBLE); +begin T := Self.ASFLOAT; end; + +procedure TField_PSHelper.ASDATETIME_W(const T: TDATETIME); +begin Self.ASDATETIME := T; end; + +procedure TField_PSHelper.ASDATETIME_R(var T: TDATETIME); +begin T := Self.ASDATETIME; end; + +procedure TField_PSHelper.ASCURRENCY_W(const T: CURRENCY); +begin Self.ASCURRENCY := T; end; + +procedure TField_PSHelper.ASCURRENCY_R(var T: CURRENCY); +begin T := Self.ASCURRENCY; end; + +procedure TField_PSHelper.ASBOOLEAN_W(const T: BOOLEAN); +begin Self.ASBOOLEAN := T; end; + +procedure TField_PSHelper.ASBOOLEAN_R(var T: BOOLEAN); +begin T := Self.ASBOOLEAN; end; + +{$IFNDEF FPC} +{$IFDEF DELPHI6UP} +procedure TField_PSHelper.ASBCD_W(const T: TBCD); +begin Self.ASBCD := T; end; + +procedure TField_PSHelper.ASBCD_R(var T: TBCD); +begin T := Self.ASBCD; end; +{$ENDIF} +{$ENDIF} + +procedure RIRegisterTFIELD(Cl: TPSRuntimeClassImporter); +Begin + with Cl.Add(TFIELD) do begin + RegisterMethod(@TField.ASSIGNVALUE, 'AssignValue'); + RegisterVirtualMethod(@TField.CLEAR, 'Clear'); + RegisterMethod(@TField.FOCUSCONTROL, 'FocusControl'); + // RegisterMethod(@TField.GETDATA, 'GetData'); + RegisterVirtualMethod(@TField.ISVALIDCHAR, 'IsValidChar'); + RegisterMethod(@TField.REFRESHLOOKUPLIST, 'RefreshLookupList'); + // RegisterMethod(@TField.SETDATA, 'SetData'); + RegisterVirtualMethod(@TField.SETFIELDTYPE, 'SetFieldType'); + // RegisterMethod(@TField.VALIDATE, 'Validate'); + {$IFNDEF FPC} + + RegisterPropertyHelper(@TField.EDITMASK_R,@TField.EDITMASK_W,'EditMask'); + RegisterPropertyHelper(@TField.EDITMASKPTR_R,nil,'EditMaskPtr'); + RegisterPropertyHelper(@TField.EDITMASK_R,@TField.EDITMASK_W,'EditMask'); + RegisterPropertyHelper(@TField.EDITMASKPTR_R,nil,'EditMaskPtr'); + RegisterPropertyHelper(@TField.FULLNAME_R,nil,'FullName'); + RegisterPropertyHelper(@TField.LOOKUP_R,@TField.LOOKUP_W,'Lookup'); + RegisterPropertyHelper(@TField.PARENTFIELD_R,@TField.PARENTFIELD_W,'ParentField'); + RegisterPropertyHelper(@TField.VALIDCHARS_R,@TField.VALIDCHARS_W,'ValidChars'); + RegisterPropertyHelper(@TField.AUTOGENERATEVALUE_R,@TField.AUTOGENERATEVALUE_W,'AutoGenerateValue'); + + {$IFDEF DELPHI6UP} + RegisterPropertyHelper(@TField.ASBCD_R,@TField.ASBCD_W,'AsBCD'); + {$ENDIF} + {$ENDIF} + RegisterPropertyHelper(@TField.ASBOOLEAN_R,@TField.ASBOOLEAN_W,'AsBoolean'); + RegisterPropertyHelper(@TField.ASCURRENCY_R,@TField.ASCURRENCY_W,'AsCurrency'); + RegisterPropertyHelper(@TField.ASDATETIME_R,@TField.ASDATETIME_W,'AsDateTime'); + RegisterPropertyHelper(@TField.ASFLOAT_R,@TField.ASFLOAT_W,'AsFloat'); + RegisterPropertyHelper(@TField.ASINTEGER_R,@TField.ASINTEGER_W,'AsInteger'); + RegisterPropertyHelper(@TField.ASSTRING_R,@TField.ASSTRING_W,'AsString'); + RegisterPropertyHelper(@TField.ASVARIANT_R,@TField.ASVARIANT_W,'AsVariant'); + RegisterPropertyHelper(@TField.ATTRIBUTESET_R,@TField.ATTRIBUTESET_W,'AttributeSet'); + RegisterPropertyHelper(@TField.CALCULATED_R,@TField.CALCULATED_W,'Calculated'); + RegisterPropertyHelper(@TField.CANMODIFY_R,nil,'CanModify'); + RegisterPropertyHelper(@TField.CURVALUE_R,nil,'CurValue'); + RegisterPropertyHelper(@TField.DATASET_R,@TField.DATASET_W,'Dataset'); + RegisterPropertyHelper(@TField.DATASIZE_R,nil,'DataSize'); + RegisterPropertyHelper(@TField.DATATYPE_R,nil,'DataType'); + RegisterPropertyHelper(@TField.DISPLAYNAME_R,nil,'DisplayName'); + RegisterPropertyHelper(@TField.DISPLAYTEXT_R,nil,'DisplayText'); + RegisterPropertyHelper(@TField.FIELDNO_R,nil,'FieldNo'); + RegisterPropertyHelper(@TField.ISINDEXFIELD_R,nil,'IsIndexField'); + RegisterPropertyHelper(@TField.ISNULL_R,nil,'IsNull'); + RegisterPropertyHelper(@TField.LOOKUPLIST_R,nil,'LookupList'); + RegisterPropertyHelper(@TField.NEWVALUE_R,@TField.NEWVALUE_W,'NewValue'); + RegisterPropertyHelper(@TField.OFFSET_R,nil,'Offset'); + RegisterPropertyHelper(@TField.OLDVALUE_R,nil,'OldValue'); + RegisterPropertyHelper(@TField.SIZE_R,@TField.SIZE_W,'Size'); + RegisterPropertyHelper(@TField.TEXT_R,@TField.TEXT_W,'Text'); + RegisterPropertyHelper(@TField.VALUE_R,@TField.VALUE_W,'Value'); + RegisterPropertyHelper(@TField.ALIGNMENT_R,@TField.ALIGNMENT_W,'Alignment'); + RegisterPropertyHelper(@TField.CUSTOMCONSTRAINT_R,@TField.CUSTOMCONSTRAINT_W,'CustomConstraint'); + RegisterPropertyHelper(@TField.CONSTRAINTERRORMESSAGE_R,@TField.CONSTRAINTERRORMESSAGE_W,'ConstraintErrorMessage'); + RegisterPropertyHelper(@TField.DEFAULTEXPRESSION_R,@TField.DEFAULTEXPRESSION_W,'DefaultExpression'); + RegisterPropertyHelper(@TField.DISPLAYLABEL_R,@TField.DISPLAYLABEL_W,'DisplayLabel'); + RegisterPropertyHelper(@TField.DISPLAYWIDTH_R,@TField.DISPLAYWIDTH_W,'DisplayWidth'); + RegisterPropertyHelper(@TField.FIELDKIND_R,@TField.FIELDKIND_W,'FieldKind'); + RegisterPropertyHelper(@TField.FIELDNAME_R,@TField.FIELDNAME_W,'FieldName'); + RegisterPropertyHelper(@TField.HASCONSTRAINTS_R,nil,'HasConstraints'); + RegisterPropertyHelper(@TField.INDEX_R,@TField.INDEX_W,'Index'); + RegisterPropertyHelper(@TField.IMPORTEDCONSTRAINT_R,@TField.IMPORTEDCONSTRAINT_W,'ImportedConstraint'); + RegisterPropertyHelper(@TField.LOOKUPDATASET_R,@TField.LOOKUPDATASET_W,'LookupDataSet'); + RegisterPropertyHelper(@TField.LOOKUPKEYFIELDS_R,@TField.LOOKUPKEYFIELDS_W,'LookupKeyFields'); + RegisterPropertyHelper(@TField.LOOKUPRESULTFIELD_R,@TField.LOOKUPRESULTFIELD_W,'LookupResultField'); + RegisterPropertyHelper(@TField.KEYFIELDS_R,@TField.KEYFIELDS_W,'KeyFields'); + RegisterPropertyHelper(@TField.LOOKUPCACHE_R,@TField.LOOKUPCACHE_W,'LookupCache'); + RegisterPropertyHelper(@TField.ORIGIN_R,@TField.ORIGIN_W,'Origin'); + RegisterPropertyHelper(@TField.PROVIDERFLAGS_R,@TField.PROVIDERFLAGS_W,'ProviderFlags'); + RegisterPropertyHelper(@TField.READONLY_R,@TField.READONLY_W,'ReadOnly'); + RegisterPropertyHelper(@TField.REQUIRED_R,@TField.REQUIRED_W,'Required'); + RegisterPropertyHelper(@TField.VISIBLE_R,@TField.VISIBLE_W,'Visible'); + RegisterEventPropertyHelper(@TField.ONCHANGE_R,@TField.ONCHANGE_W,'OnChange'); + RegisterEventPropertyHelper(@TField.ONGETTEXT_R,@TField.ONGETTEXT_W,'OnGetText'); + RegisterEventPropertyHelper(@TField.ONSETTEXT_R,@TField.ONSETTEXT_W,'OnSetText'); + RegisterEventPropertyHelper(@TField.ONVALIDATE_R,@TField.ONVALIDATE_W,'OnValidate'); + end; +end; + +{$ELSE} +procedure TFIELDONVALIDATE_W(Self: TField; const T: TFIELDNOTIFYEVENT); begin Self.ONVALIDATE := T; end; procedure TFIELDONVALIDATE_R(Self: TFIELD; var T: TFIELDNOTIFYEVENT); @@ -1144,636 +3521,7 @@ begin Self.ASBCD := T; end; procedure TFIELDASBCD_R(Self: TFIELD; var T: TBCD); begin T := Self.ASBCD; end; {$ENDIF} - -procedure TFIELDLISTFIELDS_R(Self: TFIELDLIST; var T: TFIELD; const t1: INTEGER); -begin T := Self.FIELDS[t1]; end; - -procedure TFIELDDEFLISTFIELDDEFS_R(Self: TFIELDDEFLIST; var T: TFIELDDEF; const t1: INTEGER); -begin T := Self.FIELDDEFS[t1]; end; - -procedure TFLATLISTDATASET_R(Self: TFLATLIST; var T: TDATASET); -begin T := Self.DATASET; end; - -procedure TINDEXDEFGROUPINGLEVEL_W(Self: TINDEXDEF; const T: INTEGER); -begin Self.GROUPINGLEVEL := T; end; - -procedure TINDEXDEFGROUPINGLEVEL_R(Self: TINDEXDEF; var T: INTEGER); -begin T := Self.GROUPINGLEVEL; end; - - - {$ENDIF} - -procedure TFIELDSFIELDS_W(Self: TFIELDS; const T: TFIELD; const t1: INTEGER); -begin Self.FIELDS[t1] := T; end; - -procedure TFIELDSFIELDS_R(Self: TFIELDS; var T: TFIELD; const t1: INTEGER); -begin T := Self.FIELDS[t1]; end; - -procedure TFIELDSDATASET_R(Self: TFIELDS; var T: TDATASET); -begin T := Self.DATASET; end; - -procedure TFIELDSCOUNT_R(Self: TFIELDS; var T: INTEGER); -begin T := Self.COUNT; end; - -procedure TINDEXDEFSITEMS_W(Self: TINDEXDEFS; const T: TINDEXDEF; const t1: INTEGER); -begin Self.ITEMS[t1] := T; end; - -procedure TINDEXDEFSITEMS_R(Self: TINDEXDEFS; var T: TINDEXDEF; const t1: INTEGER); -begin T := Self.ITEMS[t1]; end; - -procedure TINDEXDEFSOURCE_W(Self: TINDEXDEF; const T: String); -begin Self.SOURCE := T; end; - -procedure TINDEXDEFSOURCE_R(Self: TINDEXDEF; var T: String); -begin T := Self.SOURCE; end; - -procedure TINDEXDEFOPTIONS_W(Self: TINDEXDEF; const T: TINDEXOPTIONS); -begin Self.OPTIONS := T; end; - -procedure TINDEXDEFOPTIONS_R(Self: TINDEXDEF; var T: TINDEXOPTIONS); -begin T := Self.OPTIONS; end; - -procedure TINDEXDEFFIELDS_W(Self: TINDEXDEF; const T: String); -begin Self.FIELDS := T; end; - -procedure TINDEXDEFFIELDS_R(Self: TINDEXDEF; var T: String); -begin T := Self.FIELDS; end; - -procedure TINDEXDEFEXPRESSION_W(Self: TINDEXDEF; const T: String); -begin {$IFNDEF FPC}Self.EXPRESSION := T; {$ENDIF}end; - -procedure TINDEXDEFEXPRESSION_R(Self: TINDEXDEF; var T: String); -begin T := Self.EXPRESSION; end; - -{$IFNDEF FPC} -procedure TINDEXDEFDESCFIELDS_W(Self: TINDEXDEF; const T: String); -begin Self.DESCFIELDS := T; end; - -procedure TINDEXDEFDESCFIELDS_R(Self: TINDEXDEF; var T: String); -begin T := Self.DESCFIELDS; end; - -procedure TINDEXDEFCASEINSFIELDS_W(Self: TINDEXDEF; const T: String); -begin Self.CASEINSFIELDS := T; end; - -procedure TINDEXDEFCASEINSFIELDS_R(Self: TINDEXDEF; var T: String); -begin T := Self.CASEINSFIELDS; end; - - -procedure TINDEXDEFFIELDEXPRESSION_R(Self: TINDEXDEF; var T: String); -begin T := Self.FIELDEXPRESSION; end; - -procedure TFIELDDEFSPARENTDEF_R(Self: TFIELDDEFS; var T: TFIELDDEF); -begin T := Self.PARENTDEF; end; - -{$ENDIF} - -procedure TFIELDDEFSITEMS_W(Self: TFIELDDEFS; const T: TFIELDDEF; const t1: INTEGER); -begin Self.ITEMS[t1] := T; end; - -procedure TFIELDDEFSITEMS_R(Self: TFIELDDEFS; var T: TFIELDDEF; const t1: INTEGER); -begin T := Self.ITEMS[t1]; end; - -procedure TFIELDDEFSHIDDENFIELDS_W(Self: TFIELDDEFS; const T: BOOLEAN); -begin Self.HIDDENFIELDS := T; end; - -procedure TFIELDDEFSHIDDENFIELDS_R(Self: TFIELDDEFS; var T: BOOLEAN); -begin T := Self.HIDDENFIELDS; end; - -procedure TFIELDDEFSIZE_W(Self: TFIELDDEF; const T: INTEGER); -begin Self.SIZE := T; end; - -procedure TFIELDDEFSIZE_R(Self: TFIELDDEF; var T: INTEGER); -begin T := Self.SIZE; end; - -procedure TFIELDDEFPRECISION_W(Self: TFIELDDEF; const T: INTEGER); -begin Self.PRECISION := T; end; - -procedure TFIELDDEFPRECISION_R(Self: TFIELDDEF; var T: INTEGER); -begin T := Self.PRECISION; end; - -procedure TFIELDDEFDATATYPE_W(Self: TFIELDDEF; const T: TFIELDTYPE); -begin Self.DATATYPE := T; end; - -procedure TFIELDDEFDATATYPE_R(Self: TFIELDDEF; var T: TFIELDTYPE); -begin T := Self.DATATYPE; end; - -{$IFNDEF FPC} -procedure TFIELDDEFCHILDDEFS_W(Self: TFIELDDEF; const T: TFIELDDEFS); -begin Self.CHILDDEFS := T; end; - -procedure TFIELDDEFCHILDDEFS_R(Self: TFIELDDEF; var T: TFIELDDEFS); -begin T := Self.CHILDDEFS; end; - -procedure TFIELDDEFREQUIRED_W(Self: TFIELDDEF; const T: BOOLEAN); -begin Self.REQUIRED := T;end; - -procedure TFIELDDEFPARENTDEF_R(Self: TFIELDDEF; var T: TFIELDDEF); -begin T := Self.PARENTDEF; end; - -{$ENDIF} - -procedure TFIELDDEFATTRIBUTES_W(Self: TFIELDDEF; const T: TFIELDATTRIBUTES); -begin Self.ATTRIBUTES := T; end; - -procedure TFIELDDEFATTRIBUTES_R(Self: TFIELDDEF; var T: TFIELDATTRIBUTES); -begin T := Self.ATTRIBUTES; end; - -procedure TFIELDDEFREQUIRED_R(Self: TFIELDDEF; var T: BOOLEAN); -begin T := Self.REQUIRED; end; - -procedure TFIELDDEFINTERNALCALCFIELD_W(Self: TFIELDDEF; const T: BOOLEAN); -begin Self.INTERNALCALCFIELD := T; end; - -procedure TFIELDDEFINTERNALCALCFIELD_R(Self: TFIELDDEF; var T: BOOLEAN); -begin T := Self.INTERNALCALCFIELD; end; - -{$IFNDEF FPC} -procedure TFIELDDEFFIELDNO_W(Self: TFIELDDEF; const T: INTEGER); -begin Self.FIELDNO := T; end; - -procedure TDEFCOLLECTIONUPDATED_W(Self: TDEFCOLLECTION; const T: BOOLEAN); -begin Self.UPDATED := T; end; - -procedure TDEFCOLLECTIONUPDATED_R(Self: TDEFCOLLECTION; var T: BOOLEAN); -begin T := Self.UPDATED; end; - -procedure TDEFCOLLECTIONDATASET_R(Self: TDEFCOLLECTION; var T: TDATASET); -begin T := Self.DATASET; end; - -procedure TNAMEDITEMNAME_W(Self: TNAMEDITEM; const T: String); -begin Self.NAME := T; end; - -procedure TNAMEDITEMNAME_R(Self: TNAMEDITEM; var T: String); -begin T := Self.NAME; end; - - -{$ENDIF} - -procedure TFIELDDEFFIELDNO_R(Self: TFIELDDEF; var T: INTEGER); -begin T := Self.FIELDNO; end; - -procedure TFIELDDEFFIELDCLASS_R(Self: TFIELDDEF; var T: TFIELDCLASS); -begin T := Self.FIELDCLASS; end; - -procedure RIRegisterTDATASET(Cl: TPSRuntimeClassImporter); -Begin -with Cl.Add(TDATASET) do - begin - RegisterMethod(@TDATASET.ACTIVEBUFFER, 'ActiveBuffer'); - RegisterMethod(@TDATASET.APPEND, 'Append'); - RegisterMethod(@TDATASET.APPENDRECORD, 'AppendRecord'); -// RegisterVirtualMethod(@TDATASET.BOOKMARKVALID, 'BookmarkValid'); - RegisterVirtualMethod(@TDATASET.CANCEL, 'Cancel'); - RegisterMethod(@TDATASET.CHECKBROWSEMODE, 'CheckBrowseMode'); - RegisterMethod(@TDATASET.CLEARFIELDS, 'ClearFields'); - RegisterMethod(@TDATASET.CLOSE, 'Close'); - RegisterMethod(@TDATASET.CONTROLSDISABLED, 'ControlsDisabled'); -// RegisterVirtualMethod(@TDATASET.COMPAREBOOKMARKS, 'CompareBookmarks'); - RegisterVirtualMethod(@TDATASET.CREATEBLOBSTREAM, 'CreateBlobStream'); - RegisterMethod(@TDATASET.CURSORPOSCHANGED, 'CursorPosChanged'); - RegisterMethod(@TDATASET.DELETE, 'Delete'); - RegisterMethod(@TDATASET.DISABLECONTROLS, 'DisableControls'); - RegisterMethod(@TDATASET.EDIT, 'Edit'); - RegisterMethod(@TDATASET.ENABLECONTROLS, 'EnableControls'); - RegisterMethod(@TDATASET.FIELDBYNAME, 'FieldByName'); - RegisterMethod(@TDATASET.FINDFIELD, 'FindField'); - RegisterMethod(@TDATASET.FINDFIRST, 'FindFirst'); - RegisterMethod(@TDATASET.FINDLAST, 'FindLast'); - RegisterMethod(@TDATASET.FINDNEXT, 'FindNext'); - RegisterMethod(@TDATASET.FINDPRIOR, 'FindPrior'); - RegisterMethod(@TDATASET.FIRST, 'First'); -// RegisterVirtualMethod(@TDATASET.FREEBOOKMARK, 'FreeBookmark'); -// RegisterVirtualMethod(@TDATASET.GETBOOKMARK, 'GetBookmark'); - RegisterVirtualMethod(@TDATASET.GETCURRENTRECORD, 'GetCurrentRecord'); -// RegisterVirtualMethod(@TDATASET.GETDETAILDATASETS, 'GetDetailDataSets'); -// RegisterVirtualMethod(@TDATASET.GETDETAILLINKFIELDS, 'GetDetailLinkFields'); -// RegisterVirtualMethod(@TDATASET.GETBLOBFIELDDATA, 'GetBlobFieldData'); -// RegisterMethod(@TDATASET.GETFIELDLIST, 'GetFieldList'); - RegisterMethod(@TDATASET.GETFIELDNAMES, 'GetFieldNames'); -// RegisterMethod(@TDATASET.GOTOBOOKMARK, 'GotoBookmark'); - RegisterMethod(@TDATASET.INSERT, 'Insert'); - RegisterMethod(@TDATASET.INSERTRECORD, 'InsertRecord'); - RegisterMethod(@TDATASET.ISEMPTY, 'IsEmpty'); - RegisterMethod(@TDATASET.ISLINKEDTO, 'IsLinkedTo'); - RegisterVirtualMethod(@TDATASET.ISSEQUENCED, 'IsSequenced'); - RegisterMethod(@TDATASET.LAST, 'Last'); - RegisterVirtualMethod(@TDATASET.LOCATE, 'Locate'); - RegisterVirtualMethod(@TDATASET.LOOKUP, 'Lookup'); - RegisterMethod(@TDATASET.MOVEBY, 'MoveBy'); - RegisterMethod(@TDATASET.NEXT, 'Next'); - RegisterMethod(@TDATASET.OPEN, 'Open'); - RegisterVirtualMethod(@TDATASET.POST, 'Post'); - RegisterMethod(@TDATASET.PRIOR, 'Prior'); - RegisterMethod(@TDATASET.REFRESH, 'Refresh'); -// RegisterVirtualMethod(@TDATASET.RESYNC, 'Resync'); - RegisterMethod(@TDATASET.SETFIELDS, 'SetFields'); - RegisterVirtualMethod(@TDATASET.TRANSLATE, 'Translate'); - RegisterMethod(@TDATASET.UPDATECURSORPOS, 'UpdateCursorPos'); - RegisterMethod(@TDATASET.UPDATERECORD, 'UpdateRecord'); - RegisterVirtualMethod(@TDATASET.UPDATESTATUS, 'UpdateStatus'); - RegisterPropertyHelper(@TDATASETBOF_R,nil,'BOF'); -// RegisterPropertyHelper(@TDATASETBOOKMARK_R,@TDATASETBOOKMARK_W,'Bookmark'); - RegisterPropertyHelper(@TDATASETCANMODIFY_R,nil,'CanModify'); - RegisterPropertyHelper(@TDATASETDATASOURCE_R,nil,'DataSource'); - RegisterPropertyHelper(@TDATASETDEFAULTFIELDS_R,nil,'DefaultFields'); - RegisterPropertyHelper(@TDATASETEOF_R,nil,'EOF'); - RegisterPropertyHelper(@TDATASETFIELDCOUNT_R,nil,'FieldCount'); - RegisterPropertyHelper(@TDATASETFIELDS_R,nil,'Fields'); - RegisterPropertyHelper(@TDATASETFIELDVALUES_R,@TDATASETFIELDVALUES_W,'FieldValues'); - RegisterPropertyHelper(@TDATASETFOUND_R,nil,'Found'); -{$IFDEF DELPHI6UP} - RegisterPropertyHelper(@TDATASETISUNIDIRECTIONAL_R,nil,'IsUnidirectional'); -{$ENDIF} - RegisterPropertyHelper(@TDATASETMODIFIED_R,nil,'Modified'); - RegisterPropertyHelper(@TDATASETRECORDCOUNT_R,nil,'RecordCount'); - RegisterPropertyHelper(@TDATASETRECNO_R,@TDATASETRECNO_W,'RecNo'); - RegisterPropertyHelper(@TDATASETRECORDSIZE_R,nil,'RecordSize'); - RegisterPropertyHelper(@TDATASETSTATE_R,nil,'State'); - RegisterPropertyHelper(@TDATASETFILTER_R,@TDATASETFILTER_W,'Filter'); - RegisterPropertyHelper(@TDATASETFILTERED_R,@TDATASETFILTERED_W,'Filtered'); - RegisterPropertyHelper(@TDATASETFILTEROPTIONS_R,@TDATASETFILTEROPTIONS_W,'FilterOptions'); - RegisterPropertyHelper(@TDATASETACTIVE_R,@TDATASETACTIVE_W,'Active'); - RegisterPropertyHelper(@TDATASETAUTOCALCFIELDS_R,@TDATASETAUTOCALCFIELDS_W,'AutoCalcFields'); - RegisterPropertyHelper(@TDATASETBEFOREOPEN_R,@TDATASETBEFOREOPEN_W,'BeforeOpen'); - RegisterPropertyHelper(@TDATASETAFTEROPEN_R,@TDATASETAFTEROPEN_W,'AfterOpen'); - RegisterPropertyHelper(@TDATASETBEFORECLOSE_R,@TDATASETBEFORECLOSE_W,'BeforeClose'); - RegisterPropertyHelper(@TDATASETAFTERCLOSE_R,@TDATASETAFTERCLOSE_W,'AfterClose'); - RegisterPropertyHelper(@TDATASETBEFOREINSERT_R,@TDATASETBEFOREINSERT_W,'BeforeInsert'); - RegisterPropertyHelper(@TDATASETAFTERINSERT_R,@TDATASETAFTERINSERT_W,'AfterInsert'); - RegisterPropertyHelper(@TDATASETBEFOREEDIT_R,@TDATASETBEFOREEDIT_W,'BeforeEdit'); - RegisterPropertyHelper(@TDATASETAFTEREDIT_R,@TDATASETAFTEREDIT_W,'AfterEdit'); - RegisterPropertyHelper(@TDATASETBEFOREPOST_R,@TDATASETBEFOREPOST_W,'BeforePost'); - RegisterPropertyHelper(@TDATASETAFTERPOST_R,@TDATASETAFTERPOST_W,'AfterPost'); - RegisterPropertyHelper(@TDATASETBEFORECANCEL_R,@TDATASETBEFORECANCEL_W,'BeforeCancel'); - RegisterPropertyHelper(@TDATASETAFTERCANCEL_R,@TDATASETAFTERCANCEL_W,'AfterCancel'); - RegisterPropertyHelper(@TDATASETBEFOREDELETE_R,@TDATASETBEFOREDELETE_W,'BeforeDelete'); - RegisterPropertyHelper(@TDATASETAFTERDELETE_R,@TDATASETAFTERDELETE_W,'AfterDelete'); - RegisterPropertyHelper(@TDATASETBEFORESCROLL_R,@TDATASETBEFORESCROLL_W,'BeforeScroll'); - RegisterPropertyHelper(@TDATASETAFTERSCROLL_R,@TDATASETAFTERSCROLL_W,'AfterScroll'); - {$IFNDEF FPC} - RegisterPropertyHelper(@TDATASETFIELDLIST_R,nil,'FieldList'); - RegisterPropertyHelper(@TDATASETDESIGNER_R,nil,'Designer'); - RegisterPropertyHelper(@TDATASETBLOCKREADSIZE_R,@TDATASETBLOCKREADSIZE_W,'BlockReadSize'); - RegisterPropertyHelper(@TDATASETBEFOREREFRESH_R,@TDATASETBEFOREREFRESH_W,'BeforeRefresh'); - RegisterPropertyHelper(@TDATASETAFTERREFRESH_R,@TDATASETAFTERREFRESH_W,'AfterRefresh'); - RegisterPropertyHelper(@TDATASETAGGFIELDS_R,nil,'AggFields'); - RegisterPropertyHelper(@TDATASETDATASETFIELD_R,@TDATASETDATASETFIELD_W,'DataSetField'); - RegisterPropertyHelper(@TDATASETOBJECTVIEW_R,@TDATASETOBJECTVIEW_W,'ObjectView'); - RegisterPropertyHelper(@TDATASETSPARSEARRAYS_R,@TDATASETSPARSEARRAYS_W,'SparseArrays'); - RegisterPropertyHelper(@TDATASETFIELDDEFS_R,@TDATASETFIELDDEFS_W,'FieldDefs'); - RegisterPropertyHelper(@TDATASETFIELDDEFLIST_R,nil,'FieldDefList'); - - {$ENDIF} - RegisterEventPropertyHelper(@TDATASETONCALCFIELDS_R,@TDATASETONCALCFIELDS_W,'OnCalcFields'); - RegisterEventPropertyHelper(@TDATASETONDELETEERROR_R,@TDATASETONDELETEERROR_W,'OnDeleteError'); - RegisterEventPropertyHelper(@TDATASETONEDITERROR_R,@TDATASETONEDITERROR_W,'OnEditError'); - RegisterEventPropertyHelper(@TDATASETONFILTERRECORD_R,@TDATASETONFILTERRECORD_W,'OnFilterRecord'); - RegisterEventPropertyHelper(@TDATASETONNEWRECORD_R,@TDATASETONNEWRECORD_W,'OnNewRecord'); - RegisterEventPropertyHelper(@TDATASETONPOSTERROR_R,@TDATASETONPOSTERROR_W,'OnPostError'); - end; -end; - -procedure RIRegisterTPARAMS(Cl: TPSRuntimeClassImporter); -Begin -with Cl.Add(TPARAMS) do - begin -// RegisterMethod(@TPARAMS.ASSIGNVALUES, 'AssignValues'); - RegisterMethod(@TPARAMS.ADDPARAM, 'AddParam'); - RegisterMethod(@TPARAMS.REMOVEPARAM, 'RemoveParam'); - RegisterMethod(@TPARAMS.CREATEPARAM, 'CreateParam'); - RegisterMethod(@TPARAMS.GETPARAMLIST, 'GetParamList'); - RegisterMethod(@TPARAMS.ISEQUAL, 'IsEqual'); - RegisterMethod(@TPARAMS.PARSESQL, 'ParseSQL'); - RegisterMethod(@TPARAMS.PARAMBYNAME, 'ParamByName'); - RegisterMethod(@TPARAMS.FINDPARAM, 'FindParam'); - RegisterPropertyHelper(@TPARAMSITEMS_R,@TPARAMSITEMS_W,'Items'); - RegisterPropertyHelper(@TPARAMSPARAMVALUES_R,@TPARAMSPARAMVALUES_W,'ParamValues'); - end; -end; - -procedure RIRegisterTPARAM(Cl: TPSRuntimeClassImporter); -Begin -with Cl.Add(TPARAM) do - begin - RegisterMethod(@TPARAM.ASSIGNFIELD, 'AssignField'); - RegisterMethod(@TPARAM.ASSIGNFIELDVALUE, 'AssignFieldValue'); - RegisterMethod(@TPARAM.CLEAR, 'Clear'); -// RegisterMethod(@TPARAM.GETDATA, 'GetData'); - RegisterMethod(@TPARAM.GETDATASIZE, 'GetDataSize'); - RegisterMethod(@TPARAM.LOADFROMFILE, 'LoadFromFile'); - RegisterMethod(@TPARAM.LOADFROMSTREAM, 'LoadFromStream'); -// RegisterMethod(@TPARAM.SETBLOBDATA, 'SetBlobData'); -// RegisterMethod(@TPARAM.SETDATA, 'SetData'); - {$IFNDEF FPC} - RegisterPropertyHelper(@TPARAMASBCD_R,@TPARAMASBCD_W,'AsBCD'); -{$IFDEF DELPHI6UP} - RegisterPropertyHelper(@TPARAMASFMTBCD_R,@TPARAMASFMTBCD_W,'AsFMTBCD'); -{$ENDIF} - {$ENDIF} - RegisterPropertyHelper(@TPARAMASBLOB_R,@TPARAMASBLOB_W,'AsBlob'); - RegisterPropertyHelper(@TPARAMASBOOLEAN_R,@TPARAMASBOOLEAN_W,'AsBoolean'); - RegisterPropertyHelper(@TPARAMASCURRENCY_R,@TPARAMASCURRENCY_W,'AsCurrency'); - RegisterPropertyHelper(@TPARAMASDATE_R,@TPARAMASDATE_W,'AsDate'); - RegisterPropertyHelper(@TPARAMASDATETIME_R,@TPARAMASDATETIME_W,'AsDateTime'); - RegisterPropertyHelper(@TPARAMASFLOAT_R,@TPARAMASFLOAT_W,'AsFloat'); - RegisterPropertyHelper(@TPARAMASINTEGER_R,@TPARAMASINTEGER_W,'AsInteger'); - RegisterPropertyHelper(@TPARAMASSMALLINT_R,@TPARAMASSMALLINT_W,'AsSmallInt'); - RegisterPropertyHelper(@TPARAMASMEMO_R,@TPARAMASMEMO_W,'AsMemo'); - RegisterPropertyHelper(@TPARAMASSTRING_R,@TPARAMASSTRING_W,'AsString'); - RegisterPropertyHelper(@TPARAMASTIME_R,@TPARAMASTIME_W,'AsTime'); - RegisterPropertyHelper(@TPARAMASWORD_R,@TPARAMASWORD_W,'AsWord'); - RegisterPropertyHelper(@TPARAMBOUND_R,@TPARAMBOUND_W,'Bound'); - RegisterPropertyHelper(@TPARAMISNULL_R,nil,'IsNull'); - RegisterPropertyHelper(@TPARAMNATIVESTR_R,@TPARAMNATIVESTR_W,'NativeStr'); - RegisterPropertyHelper(@TPARAMTEXT_R,@TPARAMTEXT_W,'Text'); - RegisterPropertyHelper(@TPARAMDATATYPE_R,@TPARAMDATATYPE_W,'DataType'); -{$IFDEF DELPHI6UP} - RegisterPropertyHelper(@TPARAMPRECISION_R,@TPARAMPRECISION_W,'Precision'); - RegisterPropertyHelper(@TPARAMNUMERICSCALE_R,@TPARAMNUMERICSCALE_W,'NumericScale'); - RegisterPropertyHelper(@TPARAMSIZE_R,@TPARAMSIZE_W,'Size'); -{$ENDIF} - RegisterPropertyHelper(@TPARAMNAME_R,@TPARAMNAME_W,'Name'); - RegisterPropertyHelper(@TPARAMPARAMTYPE_R,@TPARAMPARAMTYPE_W,'ParamType'); - RegisterPropertyHelper(@TPARAMVALUE_R,@TPARAMVALUE_W,'Value'); - end; -end; - -{$IFNDEF FPC} -procedure RIRegisterTGUIDFIELD(Cl: TPSRuntimeClassImporter); -Begin -with Cl.Add(TGUIDFIELD) do - begin - end; -end; - -procedure RIRegisterTVARIANTFIELD(Cl: TPSRuntimeClassImporter); -Begin -with Cl.Add(TVARIANTFIELD) do - begin - end; -end; - -procedure RIRegisterTREFERENCEFIELD(Cl: TPSRuntimeClassImporter); -Begin -with Cl.Add(TREFERENCEFIELD) do - begin - RegisterPropertyHelper(@TREFERENCEFIELDREFERENCETABLENAME_R,@TREFERENCEFIELDREFERENCETABLENAME_W,'ReferenceTableName'); - end; -end; - - -procedure RIRegisterTDATASETFIELD(Cl: TPSRuntimeClassImporter); -Begin -with Cl.Add(TDATASETFIELD) do - begin - RegisterPropertyHelper(@TDATASETFIELDNESTEDDATASET_R,nil,'NestedDataSet'); - RegisterPropertyHelper(@TDATASETFIELDINCLUDEOBJECTFIELD_R,@TDATASETFIELDINCLUDEOBJECTFIELD_W,'IncludeObjectField'); - end; -end; - - -procedure RIRegisterTARRAYFIELD(Cl: TPSRuntimeClassImporter); -Begin -with Cl.Add(TARRAYFIELD) do - begin - end; -end; - - -procedure RIRegisterTADTFIELD(Cl: TPSRuntimeClassImporter); -Begin -with Cl.Add(TADTFIELD) do - begin - end; -end; - - -procedure RIRegisterTOBJECTFIELD(Cl: TPSRuntimeClassImporter); -Begin -with Cl.Add(TOBJECTFIELD) do - begin - RegisterPropertyHelper(@TOBJECTFIELDFIELDCOUNT_R,nil,'FieldCount'); - RegisterPropertyHelper(@TOBJECTFIELDFIELDS_R,nil,'Fields'); - RegisterPropertyHelper(@TOBJECTFIELDFIELDVALUES_R,@TOBJECTFIELDFIELDVALUES_W,'FieldValues'); - RegisterPropertyHelper(@TOBJECTFIELDUNNAMED_R,nil,'UnNamed'); - RegisterPropertyHelper(@TOBJECTFIELDOBJECTTYPE_R,@TOBJECTFIELDOBJECTTYPE_W,'ObjectType'); - end; -end; -{$ENDIF} - - -procedure RIRegisterTGRAPHICFIELD(Cl: TPSRuntimeClassImporter); -Begin -with Cl.Add(TGRAPHICFIELD) do - begin - end; -end; - -procedure RIRegisterTMEMOFIELD(Cl: TPSRuntimeClassImporter); -Begin -with Cl.Add(TMEMOFIELD) do - begin - end; -end; - -procedure RIRegisterTBLOBFIELD(Cl: TPSRuntimeClassImporter); -Begin -with Cl.Add(TBLOBFIELD) do - begin - RegisterMethod(@TBLOBFIELD.LOADFROMFILE, 'LoadFromFile'); - RegisterMethod(@TBLOBFIELD.LOADFROMSTREAM, 'LoadFromStream'); - RegisterMethod(@TBLOBFIELD.SAVETOFILE, 'SaveToFile'); - RegisterMethod(@TBLOBFIELD.SAVETOSTREAM, 'SaveToStream'); - RegisterPropertyHelper(@TBLOBFIELDBLOBSIZE_R,nil,'BlobSize'); - RegisterPropertyHelper(@TBLOBFIELDMODIFIED_R,@TBLOBFIELDMODIFIED_W,'Modified'); - RegisterPropertyHelper(@TBLOBFIELDVALUE_R,@TBLOBFIELDVALUE_W,'Value'); - RegisterPropertyHelper(@TBLOBFIELDTRANSLITERATE_R,@TBLOBFIELDTRANSLITERATE_W,'Transliterate'); - RegisterPropertyHelper(@TBLOBFIELDBLOBTYPE_R,@TBLOBFIELDBLOBTYPE_W,'BlobType'); -{$IFNDEF FPC} -{$IFDEF DELPHI6UP} - RegisterPropertyHelper(@TBLOBFIELDGRAPHICHEADER_R,@TBLOBFIELDGRAPHICHEADER_W,'GraphicHeader'); -{$ENDIF} -{$ENDIF} - end; -end; - - -{$IFNDEF FPC} -{$IFDEF DELPHI6UP} - -procedure RIRegisterTFMTBCDFIELD(Cl: TPSRuntimeClassImporter); -Begin -with Cl.Add(TFMTBCDFIELD) do - begin - RegisterPropertyHelper(@TFMTBCDFIELDVALUE_R,@TFMTBCDFIELDVALUE_W,'Value'); - RegisterPropertyHelper(@TFMTBCDFIELDCURRENCY_R,@TFMTBCDFIELDCURRENCY_W,'Currency'); - RegisterPropertyHelper(@TFMTBCDFIELDMAXVALUE_R,@TFMTBCDFIELDMAXVALUE_W,'MaxValue'); - RegisterPropertyHelper(@TFMTBCDFIELDMINVALUE_R,@TFMTBCDFIELDMINVALUE_W,'MinValue'); - RegisterPropertyHelper(@TFMTBCDFIELDPRECISION_R,@TFMTBCDFIELDPRECISION_W,'Precision'); - end; -end; -{$ENDIF} -procedure RIRegisterTBCDFIELD(Cl: TPSRuntimeClassImporter); -Begin -with Cl.Add(TBCDFIELD) do - begin - RegisterPropertyHelper(@TBCDFIELDVALUE_R,@TBCDFIELDVALUE_W,'Value'); - RegisterPropertyHelper(@TBCDFIELDCURRENCY_R,@TBCDFIELDCURRENCY_W,'Currency'); - RegisterPropertyHelper(@TBCDFIELDMAXVALUE_R,@TBCDFIELDMAXVALUE_W,'MaxValue'); - RegisterPropertyHelper(@TBCDFIELDMINVALUE_R,@TBCDFIELDMINVALUE_W,'MinValue'); - RegisterPropertyHelper(@TBCDFIELDPRECISION_R,@TBCDFIELDPRECISION_W,'Precision'); - end; -end; -{$ENDIF} - -procedure RIRegisterTVARBYTESFIELD(Cl: TPSRuntimeClassImporter); -Begin -with Cl.Add(TVARBYTESFIELD) do - begin - end; -end; - -procedure RIRegisterTBYTESFIELD(Cl: TPSRuntimeClassImporter); -Begin -with Cl.Add(TBYTESFIELD) do - begin - end; -end; - -procedure RIRegisterTBINARYFIELD(Cl: TPSRuntimeClassImporter); -Begin -with Cl.Add(TBINARYFIELD) do - begin - end; -end; - -procedure RIRegisterTTIMEFIELD(Cl: TPSRuntimeClassImporter); -Begin -with Cl.Add(TTIMEFIELD) do - begin - end; -end; - -procedure RIRegisterTDATEFIELD(Cl: TPSRuntimeClassImporter); -Begin -with Cl.Add(TDATEFIELD) do - begin - end; -end; - -procedure RIRegisterTDATETIMEFIELD(Cl: TPSRuntimeClassImporter); -Begin -with Cl.Add(TDATETIMEFIELD) do - begin - RegisterPropertyHelper(@TDATETIMEFIELDVALUE_R,@TDATETIMEFIELDVALUE_W,'Value'); - RegisterPropertyHelper(@TDATETIMEFIELDDISPLAYFORMAT_R,@TDATETIMEFIELDDISPLAYFORMAT_W,'DisplayFormat'); - end; -end; - -procedure RIRegisterTBOOLEANFIELD(Cl: TPSRuntimeClassImporter); -Begin -with Cl.Add(TBOOLEANFIELD) do - begin - RegisterPropertyHelper(@TBOOLEANFIELDVALUE_R,@TBOOLEANFIELDVALUE_W,'Value'); - RegisterPropertyHelper(@TBOOLEANFIELDDISPLAYVALUES_R,@TBOOLEANFIELDDISPLAYVALUES_W,'DisplayValues'); - end; -end; - -procedure RIRegisterTCURRENCYFIELD(Cl: TPSRuntimeClassImporter); -Begin -with Cl.Add(TCURRENCYFIELD) do - begin - end; -end; - -procedure RIRegisterTFLOATFIELD(Cl: TPSRuntimeClassImporter); -Begin -with Cl.Add(TFLOATFIELD) do - begin - {$IFNDEF FPC} - RegisterPropertyHelper(@TFLOATFIELDCURRENCY_R,@TFLOATFIELDCURRENCY_W,'Currency'); - {$ENDIF} - RegisterPropertyHelper(@TFLOATFIELDVALUE_R,@TFLOATFIELDVALUE_W,'Value'); - RegisterPropertyHelper(@TFLOATFIELDMAXVALUE_R,@TFLOATFIELDMAXVALUE_W,'MaxValue'); - RegisterPropertyHelper(@TFLOATFIELDMINVALUE_R,@TFLOATFIELDMINVALUE_W,'MinValue'); - RegisterPropertyHelper(@TFLOATFIELDPRECISION_R,@TFLOATFIELDPRECISION_W,'Precision'); - end; -end; - -procedure RIRegisterTAUTOINCFIELD(Cl: TPSRuntimeClassImporter); -Begin -with Cl.Add(TAUTOINCFIELD) do - begin - end; -end; - -procedure RIRegisterTWORDFIELD(Cl: TPSRuntimeClassImporter); -Begin -with Cl.Add(TWORDFIELD) do - begin - end; -end; - -procedure RIRegisterTLARGEINTFIELD(Cl: TPSRuntimeClassImporter); -Begin -with Cl.Add(TLARGEINTFIELD) do - begin - RegisterPropertyHelper(@TLARGEINTFIELDASLARGEINT_R,@TLARGEINTFIELDASLARGEINT_W,'AsLargeInt'); - RegisterPropertyHelper(@TLARGEINTFIELDVALUE_R,@TLARGEINTFIELDVALUE_W,'Value'); - RegisterPropertyHelper(@TLARGEINTFIELDMAXVALUE_R,@TLARGEINTFIELDMAXVALUE_W,'MaxValue'); - RegisterPropertyHelper(@TLARGEINTFIELDMINVALUE_R,@TLARGEINTFIELDMINVALUE_W,'MinValue'); - end; -end; - -procedure RIRegisterTSMALLINTFIELD(Cl: TPSRuntimeClassImporter); -Begin -with Cl.Add(TSMALLINTFIELD) do - begin - end; -end; - -procedure RIRegisterTINTEGERFIELD(Cl: TPSRuntimeClassImporter); -Begin -with Cl.Add(TINTEGERFIELD) do - begin - RegisterPropertyHelper(@TINTEGERFIELDVALUE_R,@TINTEGERFIELDVALUE_W,'Value'); - RegisterPropertyHelper(@TINTEGERFIELDMAXVALUE_R,@TINTEGERFIELDMAXVALUE_W,'MaxValue'); - RegisterPropertyHelper(@TINTEGERFIELDMINVALUE_R,@TINTEGERFIELDMINVALUE_W,'MinValue'); - end; -end; - -procedure RIRegisterTNUMERICFIELD(Cl: TPSRuntimeClassImporter); -Begin -with Cl.Add(TNUMERICFIELD) do - begin - RegisterPropertyHelper(@TNUMERICFIELDDISPLAYFORMAT_R,@TNUMERICFIELDDISPLAYFORMAT_W,'DisplayFormat'); - RegisterPropertyHelper(@TNUMERICFIELDEDITFORMAT_R,@TNUMERICFIELDEDITFORMAT_W,'EditFormat'); - end; -end; - -{$IFNDEF FPC} -procedure RIRegisterTWIDESTRINGFIELD(Cl: TPSRuntimeClassImporter); -Begin -with Cl.Add(TWIDESTRINGFIELD) do - begin - RegisterPropertyHelper(@TWIDESTRINGFIELDVALUE_R,@TWIDESTRINGFIELDVALUE_W,'Value'); - end; -end; -{$ENDIF} - -procedure RIRegisterTSTRINGFIELD(Cl: TPSRuntimeClassImporter); -Begin -with Cl.Add(TSTRINGFIELD) do - begin - RegisterPropertyHelper(@TSTRINGFIELDVALUE_R,@TSTRINGFIELDVALUE_W,'Value'); - {$IFNDEF FPC} - RegisterPropertyHelper(@TSTRINGFIELDFIXEDCHAR_R,@TSTRINGFIELDFIXEDCHAR_W,'FixedChar'); - RegisterPropertyHelper(@TSTRINGFIELDTRANSLITERATE_R,@TSTRINGFIELDTRANSLITERATE_W,'Transliterate'); - {$ENDIF} - end; -end; - procedure RIRegisterTFIELD(Cl: TPSRuntimeClassImporter); Begin with Cl.Add(TFIELD) do @@ -1857,23 +3605,339 @@ with Cl.Add(TFIELD) do end; end; -procedure RIRegisterTLOOKUPLIST(Cl: TPSRuntimeClassImporter); +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TFieldList'}{$ENDIF} +{$IFNDEF FPC} +{$IFDEF class_helper_present} +type + TFieldList_PSHelper = class helper for TFieldList + public + procedure FIELDS_R(var T: TFIELD; const t1: INTEGER); + end; + +procedure TFieldList_PSHelper.FIELDS_R(var T: TFIELD; const t1: INTEGER); +begin T := Self.FIELDS[t1]; end; + +procedure RIRegisterTFIELDLIST(Cl: TPSRuntimeClassImporter); Begin -with Cl.Add(TLOOKUPLIST) do +with Cl.Add(TFieldList) do begin - RegisterConstructor(@TLOOKUPLIST.CREATE, 'Create'); - {$IFDEF DELPHI2009UP} - RegisterVirtualAbstractMethod(TDefaultLookupList, @TDefaultLookupList.ADD, 'Add'); - RegisterVirtualAbstractMethod(TDefaultLookupList, @TDefaultLookupList.CLEAR, 'Clear'); - RegisterVirtualAbstractMethod(TDefaultLookupList, @TDefaultLookupList.VALUEOFKEY, 'ValueOfKey'); - {$ELSE} - RegisterMethod(@TLOOKUPLIST.ADD, 'Add'); - RegisterMethod(@TLOOKUPLIST.CLEAR, 'Clear'); - RegisterMethod(@TLOOKUPLIST.VALUEOFKEY, 'ValueOfKey'); + RegisterMethod(@TFieldList.FIELDBYNAME, 'FieldByName'); + RegisterMethod(@TFieldList.FIND, 'Find'); + RegisterPropertyHelper(@TFieldList.FIELDS_R,nil,'Fields'); + end; +end; +{$ELSE} +procedure TFIELDLISTFIELDS_R(Self: TFieldList; var T: TFIELD; const t1: INTEGER); +begin T := Self.FIELDS[t1]; end; + +procedure RIRegisterTFIELDLIST(Cl: TPSRuntimeClassImporter); +Begin +with Cl.Add(TFIELDLIST) do + begin + RegisterMethod(@TFIELDLIST.FIELDBYNAME, 'FieldByName'); + RegisterMethod(@TFIELDLIST.FIND, 'Find'); + RegisterPropertyHelper(@TFIELDLISTFIELDS_R,nil,'Fields'); + end; +end; +{$ENDIF class_helper_present} +{$ENDIF FPC} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TFieldDefList'}{$ENDIF} +{$IFNDEF FPC} +{$IFDEF class_helper_present} +type + TFieldDefList_PSHelper = class helper for TFieldDefList + public + procedure FIELDDEFS_R(var T: TFIELDDEF; const t1: INTEGER); + end; + +procedure TFieldDefList_PSHelper.FIELDDEFS_R(var T: TFIELDDEF; const t1: INTEGER); +begin T := Self.FIELDDEFS[t1]; end; + +procedure RIRegisterTFIELDDEFLIST(Cl: TPSRuntimeClassImporter); +Begin +with Cl.Add(TFieldDefList) do + begin + RegisterMethod(@TFieldDefList.FIELDBYNAME, 'FieldByName'); + RegisterMethod(@TFieldDefList.FIND, 'Find'); + RegisterPropertyHelper(@TFieldDefList.FIELDDEFS_R,nil,'FieldDefs'); + end; +end; +{$ELSE} +procedure TFIELDDEFLISTFIELDDEFS_R(Self: TFIELDDEFLIST; var T: TFIELDDEF; const t1: INTEGER); +begin T := Self.FIELDDEFS[t1]; end; + +procedure RIRegisterTFIELDDEFLIST(Cl: TPSRuntimeClassImporter); +Begin +with Cl.Add(TFIELDDEFLIST) do + begin + RegisterMethod(@TFIELDDEFLIST.FIELDBYNAME, 'FieldByName'); + RegisterMethod(@TFIELDDEFLIST.FIND, 'Find'); + RegisterPropertyHelper(@TFIELDDEFLISTFIELDDEFS_R,nil,'FieldDefs'); + end; +end; +{$ENDIF class_helper_present} +{$ENDIF FPC} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TFlatList'}{$ENDIF} +{$IFNDEF FPC} +{$IFDEF class_helper_present} +type + TFlatList_PSHelper = class helper for TFlatList + public + procedure DATASET_R(var T: TDATASET); + end; + +procedure TFlatList_PSHelper.DATASET_R(var T: TDATASET); +begin T := Self.DATASET; end; + +procedure RIRegisterTFLATLIST(Cl: TPSRuntimeClassImporter); +Begin + with Cl.Add(TFlatList) do begin + RegisterConstructor(@TFlatList.CREATE, 'Create'); + RegisterMethod(@TFlatList.UPDATE, 'Update'); + RegisterPropertyHelper(@TFlatList.DATASET_R,nil,'Dataset'); + end; +end; +{$ELSE} +procedure TFLATLISTDATASET_R(Self: TFlatList; var T: TDATASET); +begin T := Self.DATASET; end; + +procedure RIRegisterTFLATLIST(Cl: TPSRuntimeClassImporter); +Begin +with Cl.Add(TFLATLIST) do + begin + RegisterConstructor(@TFLATLIST.CREATE, 'Create'); + RegisterMethod(@TFLATLIST.UPDATE, 'Update'); + RegisterPropertyHelper(@TFLATLISTDATASET_R,nil,'Dataset'); + end; +end; +{$ENDIF class_helper_present} +{$ENDIF FPC} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TIndexDef'}{$ENDIF} + +{$IFDEF class_helper_present} +type + TIndexDef_PSHelper = class helper for TIndexDef + public + procedure SOURCE_W(const T: String); + procedure SOURCE_R(var T: String); + procedure OPTIONS_W(const T: TINDEXOPTIONS); + procedure OPTIONS_R(var T: TINDEXOPTIONS); + procedure FIELDS_W(const T: String); + procedure FIELDS_R(var T: String); + procedure EXPRESSION_W(const T: String); + procedure EXPRESSION_R(var T: String); + {$IFNDEF FPC} + procedure GROUPINGLEVEL_W(const T: INTEGER); + procedure GROUPINGLEVEL_R(var T: INTEGER); + procedure DESCFIELDS_W(const T: String); + procedure DESCFIELDS_R(var T: String); + procedure CASEINSFIELDS_W(const T: String); + procedure CASEINSFIELDS_R(var T: String); + procedure FIELDEXPRESSION_R(var T: String); + {$ENDIF} + end; + +procedure TIndexDef_PSHelper.SOURCE_W(const T: String); +begin Self.SOURCE := T; end; + +procedure TIndexDef_PSHelper.SOURCE_R(var T: String); +begin T := Self.SOURCE; end; + +procedure TIndexDef_PSHelper.OPTIONS_W(const T: TINDEXOPTIONS); +begin Self.OPTIONS := T; end; + +procedure TIndexDef_PSHelper.OPTIONS_R(var T: TINDEXOPTIONS); +begin T := Self.OPTIONS; end; + +procedure TIndexDef_PSHelper.FIELDS_W(const T: String); +begin Self.FIELDS := T; end; + +procedure TIndexDef_PSHelper.FIELDS_R(var T: String); +begin T := Self.FIELDS; end; + +procedure TIndexDef_PSHelper.EXPRESSION_W(const T: String); +begin {$IFNDEF FPC}Self.EXPRESSION := T; {$ENDIF}end; + +procedure TIndexDef_PSHelper.EXPRESSION_R(var T: String); +begin T := Self.EXPRESSION; end; + +{$IFNDEF FPC} +procedure TIndexDef_PSHelper.GROUPINGLEVEL_W(const T: INTEGER); +begin Self.GROUPINGLEVEL := T; end; + +procedure TIndexDef_PSHelper.GROUPINGLEVEL_R(var T: INTEGER); +begin T := Self.GROUPINGLEVEL; end; + +procedure TIndexDef_PSHelper.DESCFIELDS_W(const T: String); +begin Self.DESCFIELDS := T; end; + +procedure TIndexDef_PSHelper.DESCFIELDS_R(var T: String); +begin T := Self.DESCFIELDS; end; + +procedure TIndexDef_PSHelper.CASEINSFIELDS_W(const T: String); +begin Self.CASEINSFIELDS := T; end; + +procedure TIndexDef_PSHelper.CASEINSFIELDS_R(var T: String); +begin T := Self.CASEINSFIELDS; end; + + +procedure TIndexDef_PSHelper.FIELDEXPRESSION_R(var T: String); +begin T := Self.FIELDEXPRESSION; end; +{$ENDIF} + +procedure RIRegisterTINDEXDEF(Cl: TPSRuntimeClassImporter); +Begin + with Cl.Add(TIndexDef) do begin + RegisterConstructor(@TIndexDef.CREATE, 'Create'); + {$IFNDEF FPC} + RegisterPropertyHelper(@TIndexDef.FIELDEXPRESSION_R,nil,'FieldExpression'); + RegisterPropertyHelper(@TIndexDef.CASEINSFIELDS_R,@TIndexDef.CASEINSFIELDS_W,'CaseInsFields'); + RegisterPropertyHelper(@TIndexDef.GROUPINGLEVEL_R,@TIndexDef.GROUPINGLEVEL_W,'GroupingLevel'); + RegisterPropertyHelper(@TIndexDef.DESCFIELDS_R,@TIndexDef.DESCFIELDS_W,'DescFields'); {$ENDIF} + RegisterPropertyHelper(@TIndexDef.EXPRESSION_R,@TIndexDef.EXPRESSION_W,'Expression'); + RegisterPropertyHelper(@TIndexDef.FIELDS_R,@TIndexDef.FIELDS_W,'Fields'); + RegisterPropertyHelper(@TIndexDef.OPTIONS_R,@TIndexDef.OPTIONS_W,'Options'); + RegisterPropertyHelper(@TIndexDef.SOURCE_R,@TIndexDef.SOURCE_W,'Source'); + end; +end; +{$ELSE} +{$IFNDEF FPC} +procedure TINDEXDEFGROUPINGLEVEL_W(Self: TIndexDef; const T: INTEGER); +begin Self.GROUPINGLEVEL := T; end; + +procedure TINDEXDEFGROUPINGLEVEL_R(Self: TIndexDef; var T: INTEGER); +begin T := Self.GROUPINGLEVEL; end; +{$ENDIF FPC} +procedure TINDEXDEFSOURCE_W(Self: TINDEXDEF; const T: String); +begin Self.SOURCE := T; end; + +procedure TINDEXDEFSOURCE_R(Self: TINDEXDEF; var T: String); +begin T := Self.SOURCE; end; + +procedure TINDEXDEFOPTIONS_W(Self: TINDEXDEF; const T: TINDEXOPTIONS); +begin Self.OPTIONS := T; end; + +procedure TINDEXDEFOPTIONS_R(Self: TINDEXDEF; var T: TINDEXOPTIONS); +begin T := Self.OPTIONS; end; + +procedure TINDEXDEFFIELDS_W(Self: TINDEXDEF; const T: String); +begin Self.FIELDS := T; end; + +procedure TINDEXDEFFIELDS_R(Self: TINDEXDEF; var T: String); +begin T := Self.FIELDS; end; + +procedure TINDEXDEFEXPRESSION_W(Self: TINDEXDEF; const T: String); +begin {$IFNDEF FPC}Self.EXPRESSION := T; {$ENDIF}end; + +procedure TINDEXDEFEXPRESSION_R(Self: TINDEXDEF; var T: String); +begin T := Self.EXPRESSION; end; + +{$IFNDEF FPC} +procedure TINDEXDEFDESCFIELDS_W(Self: TINDEXDEF; const T: String); +begin Self.DESCFIELDS := T; end; + +procedure TINDEXDEFDESCFIELDS_R(Self: TINDEXDEF; var T: String); +begin T := Self.DESCFIELDS; end; + +procedure TINDEXDEFCASEINSFIELDS_W(Self: TINDEXDEF; const T: String); +begin Self.CASEINSFIELDS := T; end; + +procedure TINDEXDEFCASEINSFIELDS_R(Self: TINDEXDEF; var T: String); +begin T := Self.CASEINSFIELDS; end; + + +procedure TINDEXDEFFIELDEXPRESSION_R(Self: TINDEXDEF; var T: String); +begin T := Self.FIELDEXPRESSION; end; +{$ENDIF} + +procedure RIRegisterTINDEXDEF(Cl: TPSRuntimeClassImporter); +Begin +with Cl.Add(TINDEXDEF) do + begin + RegisterConstructor(@TINDEXDEF.CREATE, 'Create'); +{$IFNDEF FPC} + RegisterPropertyHelper(@TINDEXDEFFIELDEXPRESSION_R,nil,'FieldExpression'); + RegisterPropertyHelper(@TINDEXDEFCASEINSFIELDS_R,@TINDEXDEFCASEINSFIELDS_W,'CaseInsFields'); + RegisterPropertyHelper(@TINDEXDEFGROUPINGLEVEL_R,@TINDEXDEFGROUPINGLEVEL_W,'GroupingLevel'); + RegisterPropertyHelper(@TINDEXDEFDESCFIELDS_R,@TINDEXDEFDESCFIELDS_W,'DescFields'); + +{$ENDIF} + RegisterPropertyHelper(@TINDEXDEFEXPRESSION_R,@TINDEXDEFEXPRESSION_W,'Expression'); + RegisterPropertyHelper(@TINDEXDEFFIELDS_R,@TINDEXDEFFIELDS_W,'Fields'); + RegisterPropertyHelper(@TINDEXDEFOPTIONS_R,@TINDEXDEFOPTIONS_W,'Options'); + RegisterPropertyHelper(@TINDEXDEFSOURCE_R,@TINDEXDEFSOURCE_W,'Source'); + end; +end; +{$ENDIF class_helper_present} + +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TFields'}{$ENDIF} +{$IFDEF class_helper_present} +type + TFields_PSHelper = class helper for TFields + public + procedure FIELDS_W(const T: TFIELD; const t1: INTEGER); + procedure FIELDS_R(var T: TFIELD; const t1: INTEGER); + procedure DATASET_R(var T: TDATASET); + procedure COUNT_R(var T: INTEGER); + end; + +procedure TFields_PSHelper.FIELDS_W(const T: TFIELD; const t1: INTEGER); +begin Self.FIELDS[t1] := T; end; + +procedure TFields_PSHelper.FIELDS_R(var T: TFIELD; const t1: INTEGER); +begin T := Self.FIELDS[t1]; end; + +procedure TFields_PSHelper.DATASET_R(var T: TDATASET); +begin T := Self.DATASET; end; + +procedure TFields_PSHelper.COUNT_R(var T: INTEGER); +begin T := Self.COUNT; end; + +procedure RIRegisterTFIELDS(Cl: TPSRuntimeClassImporter); +Begin + with Cl.Add(TFields) do + begin + RegisterConstructor(@TFields.CREATE, 'Create'); + RegisterMethod(@TFields.ADD, 'Add'); + RegisterMethod(@TFields.CHECKFIELDNAME, 'CheckFieldName'); + RegisterMethod(@TFields.CHECKFIELDNAMES, 'CheckFieldNames'); + RegisterMethod(@TFields.CLEAR, 'Clear'); + RegisterMethod(@TFields.FINDFIELD, 'FindField'); + RegisterMethod(@TFields.FIELDBYNAME, 'FieldByName'); + RegisterMethod(@TFields.FIELDBYNUMBER, 'FieldByNumber'); + RegisterMethod(@TFields.GETFIELDNAMES, 'GetFieldNames'); + RegisterMethod(@TFields.INDEXOF, 'IndexOf'); + RegisterMethod(@TFields.REMOVE, 'Remove'); + RegisterPropertyHelper(@TFields.COUNT_R,nil,'Count'); + RegisterPropertyHelper(@TFields.DATASET_R,nil,'Dataset'); + RegisterPropertyHelper(@TFields.FIELDS_R,@TFields.FIELDS_W,'Fields'); end; end; +{$ELSE} +procedure TFIELDSFIELDS_W(Self: TFields; const T: TFIELD; const t1: INTEGER); +begin Self.FIELDS[t1] := T; end; + +procedure TFIELDSFIELDS_R(Self: TFIELDS; var T: TFIELD; const t1: INTEGER); +begin T := Self.FIELDS[t1]; end; + +procedure TFIELDSDATASET_R(Self: TFIELDS; var T: TDATASET); +begin T := Self.DATASET; end; + +procedure TFIELDSCOUNT_R(Self: TFIELDS; var T: INTEGER); +begin T := Self.COUNT; end; procedure RIRegisterTFIELDS(Cl: TPSRuntimeClassImporter); Begin with Cl.Add(TFIELDS) do @@ -1895,39 +3959,44 @@ with Cl.Add(TFIELDS) do end; end; -{$IFNDEF FPC} -procedure RIRegisterTFIELDLIST(Cl: TPSRuntimeClassImporter); +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TIndexDefs'}{$ENDIF} +{$IFDEF class_helper_present} +type + TIndexDefs_PSHelper = class helper for TIndexDefs + public + procedure ITEMS_W(const T: TINDEXDEF; const t1: INTEGER); + procedure ITEMS_R(var T: TINDEXDEF; const t1: INTEGER); + end; + +procedure TIndexDefs_PSHelper.ITEMS_W(const T: TINDEXDEF; const t1: INTEGER); +begin Self.ITEMS[t1] := T; end; + +procedure TIndexDefs_PSHelper.ITEMS_R(var T: TINDEXDEF; const t1: INTEGER); +begin T := Self.ITEMS[t1]; end; + +procedure RIRegisterTINDEXDEFS(Cl: TPSRuntimeClassImporter); Begin -with Cl.Add(TFIELDLIST) do - begin - RegisterMethod(@TFIELDLIST.FIELDBYNAME, 'FieldByName'); - RegisterMethod(@TFIELDLIST.FIND, 'Find'); - RegisterPropertyHelper(@TFIELDLISTFIELDS_R,nil,'Fields'); + with Cl.Add(TIndexDefs) do + begin + RegisterConstructor(@TIndexDefs.CREATE, 'Create'); + RegisterMethod(@TIndexDefs.ADDINDEXDEF, 'AddIndexDef'); + RegisterMethod(@TIndexDefs.FIND, 'Find'); + RegisterMethod(@TIndexDefs.UPDATE, 'Update'); + RegisterMethod(@TIndexDefs.FINDINDEXFORFIELDS, 'FindIndexForFields'); + RegisterMethod(@TIndexDefs.GETINDEXFORFIELDS, 'GetIndexForFields'); + RegisterMethod(@TIndexDefs.ADD, 'Add'); + RegisterPropertyHelper(@TIndexDefs.ITEMS_R,@TIndexDefs.ITEMS_W,'Items'); end; end; +{$ELSE} +procedure TINDEXDEFSITEMS_W(Self: TIndexDefs; const T: TINDEXDEF; const t1: INTEGER); +begin Self.ITEMS[t1] := T; end; -procedure RIRegisterTFIELDDEFLIST(Cl: TPSRuntimeClassImporter); -Begin -with Cl.Add(TFIELDDEFLIST) do - begin - RegisterMethod(@TFIELDDEFLIST.FIELDBYNAME, 'FieldByName'); - RegisterMethod(@TFIELDDEFLIST.FIND, 'Find'); - RegisterPropertyHelper(@TFIELDDEFLISTFIELDDEFS_R,nil,'FieldDefs'); - end; -end; - - -procedure RIRegisterTFLATLIST(Cl: TPSRuntimeClassImporter); -Begin -with Cl.Add(TFLATLIST) do - begin - RegisterConstructor(@TFLATLIST.CREATE, 'Create'); - RegisterMethod(@TFLATLIST.UPDATE, 'Update'); - RegisterPropertyHelper(@TFLATLISTDATASET_R,nil,'Dataset'); - end; -end; -{$ENDIF} - +procedure TINDEXDEFSITEMS_R(Self: TINDEXDEFS; var T: TINDEXDEF; const t1: INTEGER); +begin T := Self.ITEMS[t1]; end; procedure RIRegisterTINDEXDEFS(Cl: TPSRuntimeClassImporter); Begin @@ -1943,26 +4012,76 @@ with Cl.Add(TINDEXDEFS) do RegisterPropertyHelper(@TINDEXDEFSITEMS_R,@TINDEXDEFSITEMS_W,'Items'); end; end; +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TFieldDefs'}{$ENDIF} +{$IFDEF class_helper_present} +type + TFieldDefs_PSHelper = class helper for TFieldDefs + public + {$IFNDEF FPC} + procedure PARENTDEF_R(var T: TFIELDDEF); + {$ENDIF} + procedure ITEMS_W(const T: TFIELDDEF; const t1: INTEGER); + procedure ITEMS_R(var T: TFIELDDEF; const t1: INTEGER); + procedure HIDDENFIELDS_W(const T: BOOLEAN); + procedure HIDDENFIELDS_R(var T: BOOLEAN); + end; -procedure RIRegisterTINDEXDEF(Cl: TPSRuntimeClassImporter); -Begin -with Cl.Add(TINDEXDEF) do - begin - RegisterConstructor(@TINDEXDEF.CREATE, 'Create'); {$IFNDEF FPC} - RegisterPropertyHelper(@TINDEXDEFFIELDEXPRESSION_R,nil,'FieldExpression'); - RegisterPropertyHelper(@TINDEXDEFCASEINSFIELDS_R,@TINDEXDEFCASEINSFIELDS_W,'CaseInsFields'); - RegisterPropertyHelper(@TINDEXDEFGROUPINGLEVEL_R,@TINDEXDEFGROUPINGLEVEL_W,'GroupingLevel'); - RegisterPropertyHelper(@TINDEXDEFDESCFIELDS_R,@TINDEXDEFDESCFIELDS_W,'DescFields'); - +procedure TFieldDefs_PSHelper.PARENTDEF_R(var T: TFIELDDEF); +begin T := Self.PARENTDEF; end; {$ENDIF} - RegisterPropertyHelper(@TINDEXDEFEXPRESSION_R,@TINDEXDEFEXPRESSION_W,'Expression'); - RegisterPropertyHelper(@TINDEXDEFFIELDS_R,@TINDEXDEFFIELDS_W,'Fields'); - RegisterPropertyHelper(@TINDEXDEFOPTIONS_R,@TINDEXDEFOPTIONS_W,'Options'); - RegisterPropertyHelper(@TINDEXDEFSOURCE_R,@TINDEXDEFSOURCE_W,'Source'); + +procedure TFieldDefs_PSHelper.ITEMS_W(const T: TFIELDDEF; const t1: INTEGER); +begin Self.ITEMS[t1] := T; end; + +procedure TFieldDefs_PSHelper.ITEMS_R(var T: TFIELDDEF; const t1: INTEGER); +begin T := Self.ITEMS[t1]; end; + +procedure TFieldDefs_PSHelper.HIDDENFIELDS_W(const T: BOOLEAN); +begin Self.HIDDENFIELDS := T; end; + +procedure TFieldDefs_PSHelper.HIDDENFIELDS_R(var T: BOOLEAN); +begin T := Self.HIDDENFIELDS; end; + +procedure RIRegisterTFIELDDEFS(Cl: TPSRuntimeClassImporter); +Begin + with Cl.Add(TFieldDefs) do + begin + RegisterConstructor(@TFieldDefs.CREATE, 'Create'); + RegisterMethod(@TFieldDefs.ADDFIELDDEF, 'AddFieldDef'); + RegisterMethod(@TFieldDefs.FIND, 'Find'); + RegisterMethod(@TFieldDefs.UPDATE, 'Update'); + {$IFNDEF FPC} + RegisterMethod(@TFieldDefs.ADD, 'Add'); + RegisterPropertyHelper(@TFieldDefs.PARENTDEF_R,nil,'ParentDef'); + + {$ENDIF} + RegisterPropertyHelper(@TFieldDefs.HIDDENFIELDS_R,@TFieldDefs.HIDDENFIELDS_W,'HiddenFields'); + RegisterPropertyHelper(@TFieldDefs.ITEMS_R,@TFieldDefs.ITEMS_W,'Items'); end; end; +{$ELSE} +{$IFNDEF FPC} +procedure TFIELDDEFSPARENTDEF_R(Self: TFieldDefs; var T: TFIELDDEF); +begin T := Self.PARENTDEF; end; +{$ENDIF} + +procedure TFIELDDEFSITEMS_W(Self: TFIELDDEFS; const T: TFIELDDEF; const t1: INTEGER); +begin Self.ITEMS[t1] := T; end; + +procedure TFIELDDEFSITEMS_R(Self: TFIELDDEFS; var T: TFIELDDEF; const t1: INTEGER); +begin T := Self.ITEMS[t1]; end; + +procedure TFIELDDEFSHIDDENFIELDS_W(Self: TFIELDDEFS; const T: BOOLEAN); +begin Self.HIDDENFIELDS := T; end; + +procedure TFIELDDEFSHIDDENFIELDS_R(Self: TFIELDDEFS; var T: BOOLEAN); +begin T := Self.HIDDENFIELDS; end; + procedure RIRegisterTFIELDDEFS(Cl: TPSRuntimeClassImporter); Begin with Cl.Add(TFIELDDEFS) do @@ -1981,6 +4100,183 @@ with Cl.Add(TFIELDDEFS) do end; end; +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TFieldDef'}{$ENDIF} +{$IFDEF class_helper_present} +type + TFieldDef_PSHelper = class helper for TFieldDef + public + procedure SIZE_W(const T: INTEGER); + procedure SIZE_R(var T: INTEGER); + procedure PRECISION_W(const T: INTEGER); + procedure PRECISION_R(var T: INTEGER); + procedure DATATYPE_W(const T: TFIELDTYPE); + procedure DATATYPE_R(var T: TFIELDTYPE); + {$IFNDEF FPC} + procedure CHILDDEFS_W(const T: TFIELDDEFS); + procedure CHILDDEFS_R(var T: TFIELDDEFS); + procedure REQUIRED_W(const T: BOOLEAN); + procedure PARENTDEF_R(var T: TFIELDDEF); + {$ENDIF} + procedure ATTRIBUTES_W(const T: TFIELDATTRIBUTES); + procedure ATTRIBUTES_R(var T: TFIELDATTRIBUTES); + procedure REQUIRED_R(var T: BOOLEAN); + procedure INTERNALCALCFIELD_W(const T: BOOLEAN); + procedure INTERNALCALCFIELD_R(var T: BOOLEAN); + procedure FIELDNO_R(var T: INTEGER); + procedure FIELDCLASS_R(var T: TFIELDCLASS); + {$IFNDEF FPC} + procedure FIELDNO_W(const T: INTEGER); + {$ENDIF} + end; + +procedure TFieldDef_PSHelper.SIZE_W(const T: INTEGER); +begin Self.SIZE := T; end; + +procedure TFieldDef_PSHelper.SIZE_R(var T: INTEGER); +begin T := Self.SIZE; end; + +procedure TFieldDef_PSHelper.PRECISION_W(const T: INTEGER); +begin Self.PRECISION := T; end; + +procedure TFieldDef_PSHelper.PRECISION_R(var T: INTEGER); +begin T := Self.PRECISION; end; + +procedure TFieldDef_PSHelper.DATATYPE_W(const T: TFIELDTYPE); +begin Self.DATATYPE := T; end; + +procedure TFieldDef_PSHelper.DATATYPE_R(var T: TFIELDTYPE); +begin T := Self.DATATYPE; end; + +{$IFNDEF FPC} +procedure TFieldDef_PSHelper.CHILDDEFS_W(const T: TFIELDDEFS); +begin Self.CHILDDEFS := T; end; + +procedure TFieldDef_PSHelper.CHILDDEFS_R(var T: TFIELDDEFS); +begin T := Self.CHILDDEFS; end; + +procedure TFieldDef_PSHelper.REQUIRED_W(const T: BOOLEAN); +begin Self.REQUIRED := T;end; + +procedure TFieldDef_PSHelper.PARENTDEF_R(var T: TFIELDDEF); +begin T := Self.PARENTDEF; end; + +{$ENDIF} + +procedure TFieldDef_PSHelper.ATTRIBUTES_W(const T: TFIELDATTRIBUTES); +begin Self.ATTRIBUTES := T; end; + +procedure TFieldDef_PSHelper.ATTRIBUTES_R(var T: TFIELDATTRIBUTES); +begin T := Self.ATTRIBUTES; end; + +procedure TFieldDef_PSHelper.REQUIRED_R(var T: BOOLEAN); +begin T := Self.REQUIRED; end; + +procedure TFieldDef_PSHelper.INTERNALCALCFIELD_W(const T: BOOLEAN); +begin Self.INTERNALCALCFIELD := T; end; + +procedure TFieldDef_PSHelper.INTERNALCALCFIELD_R(var T: BOOLEAN); +begin T := Self.INTERNALCALCFIELD; end; + +procedure TFieldDef_PSHelper.FIELDNO_R(var T: INTEGER); +begin T := Self.FIELDNO; end; + +procedure TFieldDef_PSHelper.FIELDCLASS_R(var T: TFIELDCLASS); +begin T := Self.FIELDCLASS; end; + +{$IFNDEF FPC} +procedure TFieldDef_PSHelper.FIELDNO_W(const T: INTEGER); +begin Self.FIELDNO := T; end; +{$ENDIF} + + +procedure RIRegisterTFIELDDEF(Cl: TPSRuntimeClassImporter); +Begin +with Cl.Add(TFieldDef) do + begin +// RegisterConstructor(@TFieldDef..CREATE, 'Create'); +{$IFNDEF FPC} + RegisterMethod(@TFieldDef.ADDCHILD, 'AddChild'); + RegisterMethod(@TFieldDef.HASCHILDDEFS, 'HasChildDefs'); +{$ENDIF} + RegisterMethod(@TFieldDef.CREATEFIELD, 'CreateField'); +{$IFNDEF FPC} + RegisterPropertyHelper(@TFieldDef.FIELDNO_R,@TFieldDef.FIELDNO_W,'FieldNo'); + RegisterPropertyHelper(@TFieldDef.PARENTDEF_R,nil,'ParentDef'); + RegisterPropertyHelper(@TFieldDef.CHILDDEFS_R,@TFieldDef.CHILDDEFS_W,'ChildDefs'); + RegisterPropertyHelper(@TFieldDef.REQUIRED_R,@TFieldDef.REQUIRED_W,'Required'); +{$ENDIF} + RegisterPropertyHelper(@TFieldDef.FIELDCLASS_R,nil,'FieldClass'); + RegisterPropertyHelper(@TFieldDef.INTERNALCALCFIELD_R,@TFieldDef.INTERNALCALCFIELD_W,'InternalCalcField'); + RegisterPropertyHelper(@TFieldDef.ATTRIBUTES_R,@TFieldDef.ATTRIBUTES_W,'Attributes'); + RegisterPropertyHelper(@TFieldDef.DATATYPE_R,@TFieldDef.DATATYPE_W,'DataType'); + RegisterPropertyHelper(@TFieldDef.PRECISION_R,@TFieldDef.PRECISION_W,'Precision'); + RegisterPropertyHelper(@TFieldDef.SIZE_R,@TFieldDef.SIZE_W,'Size'); + end; +end; + +{$ELSE} +procedure TFIELDDEFSIZE_W(Self: TFieldDef; const T: INTEGER); +begin Self.SIZE := T; end; + +procedure TFIELDDEFSIZE_R(Self: TFIELDDEF; var T: INTEGER); +begin T := Self.SIZE; end; + +procedure TFIELDDEFPRECISION_W(Self: TFIELDDEF; const T: INTEGER); +begin Self.PRECISION := T; end; + +procedure TFIELDDEFPRECISION_R(Self: TFIELDDEF; var T: INTEGER); +begin T := Self.PRECISION; end; + +procedure TFIELDDEFDATATYPE_W(Self: TFIELDDEF; const T: TFIELDTYPE); +begin Self.DATATYPE := T; end; + +procedure TFIELDDEFDATATYPE_R(Self: TFIELDDEF; var T: TFIELDTYPE); +begin T := Self.DATATYPE; end; + +{$IFNDEF FPC} +procedure TFIELDDEFCHILDDEFS_W(Self: TFIELDDEF; const T: TFIELDDEFS); +begin Self.CHILDDEFS := T; end; + +procedure TFIELDDEFCHILDDEFS_R(Self: TFIELDDEF; var T: TFIELDDEFS); +begin T := Self.CHILDDEFS; end; + +procedure TFIELDDEFREQUIRED_W(Self: TFIELDDEF; const T: BOOLEAN); +begin Self.REQUIRED := T;end; + +procedure TFIELDDEFPARENTDEF_R(Self: TFIELDDEF; var T: TFIELDDEF); +begin T := Self.PARENTDEF; end; + +{$ENDIF} + +procedure TFIELDDEFATTRIBUTES_W(Self: TFIELDDEF; const T: TFIELDATTRIBUTES); +begin Self.ATTRIBUTES := T; end; + +procedure TFIELDDEFATTRIBUTES_R(Self: TFIELDDEF; var T: TFIELDATTRIBUTES); +begin T := Self.ATTRIBUTES; end; + +procedure TFIELDDEFREQUIRED_R(Self: TFIELDDEF; var T: BOOLEAN); +begin T := Self.REQUIRED; end; + +procedure TFIELDDEFINTERNALCALCFIELD_W(Self: TFIELDDEF; const T: BOOLEAN); +begin Self.INTERNALCALCFIELD := T; end; + +procedure TFIELDDEFINTERNALCALCFIELD_R(Self: TFIELDDEF; var T: BOOLEAN); +begin T := Self.INTERNALCALCFIELD; end; + +procedure TFIELDDEFFIELDNO_R(Self: TFIELDDEF; var T: INTEGER); +begin T := Self.FIELDNO; end; + +procedure TFIELDDEFFIELDCLASS_R(Self: TFIELDDEF; var T: TFIELDCLASS); +begin T := Self.FIELDCLASS; end; + +{$IFNDEF FPC} +procedure TFIELDDEFFIELDNO_W(Self: TFIELDDEF; const T: INTEGER); +begin Self.FIELDNO := T; end; +{$ENDIF} + procedure RIRegisterTFIELDDEF(Cl: TPSRuntimeClassImporter); Begin with Cl.Add(TFIELDDEF) do @@ -2008,7 +4304,50 @@ with Cl.Add(TFIELDDEF) do end; end; +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TDefCollection'}{$ENDIF} {$IFNDEF FPC} +{$IFDEF class_helper_present} +type + TDefCollection_PSHelper = class helper for TDefCollection + public + procedure UPDATED_W(const T: BOOLEAN); + procedure UPDATED_R(var T: BOOLEAN); + procedure DATASET_R(var T: TDATASET); + end; + +procedure TDefCollection_PSHelper.UPDATED_W(const T: BOOLEAN); +begin Self.UPDATED := T; end; + +procedure TDefCollection_PSHelper.UPDATED_R(var T: BOOLEAN); +begin T := Self.UPDATED; end; + +procedure TDefCollection_PSHelper.DATASET_R(var T: TDATASET); +begin T := Self.DATASET; end; + +procedure RIRegisterTDEFCOLLECTION(Cl: TPSRuntimeClassImporter); +Begin + with Cl.Add(TDefCollection) do begin + RegisterConstructor(@TDefCollection.CREATE, 'Create'); + RegisterMethod(@TDefCollection.FIND, 'Find'); + RegisterMethod(@TDefCollection.GETITEMNAMES, 'GetItemNames'); + RegisterMethod(@TDefCollection.INDEXOF, 'IndexOf'); + RegisterPropertyHelper(@TDefCollection.DATASET_R,nil,'Dataset'); + RegisterPropertyHelper(@TDefCollection.UPDATED_R,@TDefCollection.UPDATED_W,'Updated'); + end; +end; +{$ELSE} +procedure TDEFCOLLECTIONUPDATED_W(Self: TDefCollection; const T: BOOLEAN); +begin Self.UPDATED := T; end; + +procedure TDEFCOLLECTIONUPDATED_R(Self: TDEFCOLLECTION; var T: BOOLEAN); +begin T := Self.UPDATED; end; + +procedure TDEFCOLLECTIONDATASET_R(Self: TDEFCOLLECTION; var T: TDATASET); +begin T := Self.DATASET; end; + procedure RIRegisterTDEFCOLLECTION(Cl: TPSRuntimeClassImporter); Begin with Cl.Add(TDEFCOLLECTION) do @@ -2021,6 +4360,38 @@ with Cl.Add(TDEFCOLLECTION) do RegisterPropertyHelper(@TDEFCOLLECTIONUPDATED_R,@TDEFCOLLECTIONUPDATED_W,'Updated'); end; end; +{$ENDIF class_helper_present} +{$ENDIF FPC} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TNamedItem'}{$ENDIF} +{$IFNDEF FPC} +{$IFDEF class_helper_present} +type + TNamedItem_PSHelper = class helper for TNamedItem + public + procedure NAME_W(const T: String); + procedure NAME_R(var T: String); + end; + +procedure TNamedItem_PSHelper.NAME_W(const T: String); +begin Self.NAME := T; end; + +procedure TNamedItem_PSHelper.NAME_R(var T: String); +begin T := Self.NAME; end; + +procedure RIRegisterTNAMEDITEM(Cl: TPSRuntimeClassImporter); +Begin + with Cl.Add(TNamedItem) do begin + RegisterPropertyHelper(@TNamedItem.NAME_R,@TNamedItem.NAME_W,'Name'); + end; +end; +{$ELSE} +procedure TNAMEDITEMNAME_W(Self: TNamedItem; const T: String); +begin Self.NAME := T; end; + +procedure TNAMEDITEMNAME_R(Self: TNAMEDITEM; var T: String); +begin T := Self.NAME; end; procedure RIRegisterTNAMEDITEM(Cl: TPSRuntimeClassImporter); Begin @@ -2029,66 +4400,229 @@ with Cl.Add(TNAMEDITEM) do RegisterPropertyHelper(@TNAMEDITEMNAME_R,@TNAMEDITEMNAME_W,'Name'); end; end; -{$ENDIF} +{$ENDIF class_helper_present} +{$ENDIF FPC} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} +{$IFDEF DELPHI10UP}{$REGION 'TGuidField'}{$ENDIF} +{$IFNDEF FPC} +procedure RIRegisterTGUIDFIELD(Cl: TPSRuntimeClassImporter); +Begin +with Cl.Add(TGuidField) do + begin + end; +end; +{$ENDIF} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TVariantField'}{$ENDIF} +{$IFNDEF FPC} +procedure RIRegisterTVARIANTFIELD(Cl: TPSRuntimeClassImporter); +Begin +with Cl.Add(TVariantField) do + begin + end; +end; +{$ENDIF} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TArrayField'}{$ENDIF} +{$IFNDEF FPC} +procedure RIRegisterTARRAYFIELD(Cl: TPSRuntimeClassImporter); +Begin +with Cl.Add(TArrayField) do + begin + end; +end; +{$ENDIF} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TADTField'}{$ENDIF} +{$IFNDEF FPC} +procedure RIRegisterTADTFIELD(Cl: TPSRuntimeClassImporter); +Begin +with Cl.Add(TADTField) do + begin + end; +end; +{$ENDIF} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TGraphicField'}{$ENDIF} +procedure RIRegisterTGRAPHICFIELD(Cl: TPSRuntimeClassImporter); +Begin +with Cl.Add(TGraphicField) do + begin + end; +end; +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TMemoField'}{$ENDIF} +procedure RIRegisterTMEMOFIELD(Cl: TPSRuntimeClassImporter); +Begin +with Cl.Add(TMemoField) do + begin + end; +end; +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TVarBytesField'}{$ENDIF} +procedure RIRegisterTVARBYTESFIELD(Cl: TPSRuntimeClassImporter); +Begin +with Cl.Add(TVarBytesField) do + begin + end; +end; +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TBytesField'}{$ENDIF} +procedure RIRegisterTBYTESFIELD(Cl: TPSRuntimeClassImporter); +Begin +with Cl.Add(TBytesField) do + begin + end; +end; +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TBinaryField'}{$ENDIF} +procedure RIRegisterTBINARYFIELD(Cl: TPSRuntimeClassImporter); +Begin +with Cl.Add(TBinaryField) do + begin + end; +end; +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TTimeField'}{$ENDIF} +procedure RIRegisterTTIMEFIELD(Cl: TPSRuntimeClassImporter); +Begin +with Cl.Add(TTimeField) do + begin + end; +end; +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TDateField'}{$ENDIF} +procedure RIRegisterTDATEFIELD(Cl: TPSRuntimeClassImporter); +Begin +with Cl.Add(TDateField) do + begin + end; +end; +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TCurrencyField'}{$ENDIF} +procedure RIRegisterTCURRENCYFIELD(Cl: TPSRuntimeClassImporter); +Begin +with Cl.Add(TCurrencyField) do + begin + end; +end; +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TAutoIncField'}{$ENDIF} +procedure RIRegisterTAUTOINCFIELD(Cl: TPSRuntimeClassImporter); +Begin +with Cl.Add(TAutoIncField) do + begin + end; +end; +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TWordField'}{$ENDIF} +procedure RIRegisterTWORDFIELD(Cl: TPSRuntimeClassImporter); +Begin +with Cl.Add(TWordField) do + begin + end; +end; +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TSmallintField'}{$ENDIF} +procedure RIRegisterTSMALLINTFIELD(Cl: TPSRuntimeClassImporter); +Begin +with Cl.Add(TSmallintField) do + begin + end; +end; +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TLookupList'}{$ENDIF} +procedure RIRegisterTLOOKUPLIST(Cl: TPSRuntimeClassImporter); +Begin +with Cl.Add(TLookupList) do + begin + RegisterConstructor(@TLOOKUPLIST.CREATE, 'Create'); + {$IFDEF DELPHI2009UP} + RegisterVirtualAbstractMethod(TDefaultLookupList, @TDefaultLookupList.ADD, 'Add'); + RegisterVirtualAbstractMethod(TDefaultLookupList, @TDefaultLookupList.CLEAR, 'Clear'); + RegisterVirtualAbstractMethod(TDefaultLookupList, @TDefaultLookupList.VALUEOFKEY, 'ValueOfKey'); + {$ELSE} + RegisterMethod(@TLOOKUPLIST.ADD, 'Add'); + RegisterMethod(@TLOOKUPLIST.CLEAR, 'Clear'); + RegisterMethod(@TLOOKUPLIST.VALUEOFKEY, 'ValueOfKey'); + {$ENDIF} + end; +end; +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} procedure RIRegister_DB(CL: TPSRuntimeClassImporter); Begin -RIRegisterTFIELDDEF(Cl); -RIRegisterTFIELDDEFS(Cl); -RIRegisterTINDEXDEF(Cl); -RIRegisterTINDEXDEFS(Cl); -RIRegisterTFIELDS(Cl); -RIRegisterTLOOKUPLIST(Cl); -RIRegisterTFIELD(Cl); -RIRegisterTSTRINGFIELD(Cl); -RIRegisterTNUMERICFIELD(Cl); -RIRegisterTINTEGERFIELD(Cl); -RIRegisterTSMALLINTFIELD(Cl); -RIRegisterTLARGEINTFIELD(Cl); -RIRegisterTWORDFIELD(Cl); -RIRegisterTAUTOINCFIELD(Cl); -RIRegisterTFLOATFIELD(Cl); -RIRegisterTCURRENCYFIELD(Cl); -RIRegisterTBOOLEANFIELD(Cl); -RIRegisterTDATETIMEFIELD(Cl); -RIRegisterTDATEFIELD(Cl); -RIRegisterTTIMEFIELD(Cl); -RIRegisterTBINARYFIELD(Cl); -RIRegisterTBYTESFIELD(Cl); -RIRegisterTVARBYTESFIELD(Cl); -{$IFNDEF FPC} -RIRegisterTNAMEDITEM(Cl); -RIRegisterTDEFCOLLECTION(Cl); -RIRegisterTWIDESTRINGFIELD(Cl); -RIRegisterTFLATLIST(Cl); -RIRegisterTFIELDDEFLIST(Cl); -RIRegisterTFIELDLIST(Cl); -RIRegisterTBCDFIELD(Cl); -{$IFDEF DELPHI6UP} -RIRegisterTFMTBCDFIELD(Cl); -{$ENDIF} -{$ENDIF} + RIRegisterTFIELDDEF(Cl); + RIRegisterTFIELDDEFS(Cl); + RIRegisterTINDEXDEF(Cl); + RIRegisterTINDEXDEFS(Cl); + RIRegisterTFIELDS(Cl); + RIRegisterTLOOKUPLIST(Cl); + RIRegisterTFIELD(Cl); + RIRegisterTSTRINGFIELD(Cl); + RIRegisterTNUMERICFIELD(Cl); + RIRegisterTINTEGERFIELD(Cl); + RIRegisterTSMALLINTFIELD(Cl); + RIRegisterTLARGEINTFIELD(Cl); + RIRegisterTWORDFIELD(Cl); + RIRegisterTAUTOINCFIELD(Cl); + RIRegisterTFLOATFIELD(Cl); + RIRegisterTCURRENCYFIELD(Cl); + RIRegisterTBOOLEANFIELD(Cl); + RIRegisterTDATETIMEFIELD(Cl); + RIRegisterTDATEFIELD(Cl); + RIRegisterTTIMEFIELD(Cl); + RIRegisterTBINARYFIELD(Cl); + RIRegisterTBYTESFIELD(Cl); + RIRegisterTVARBYTESFIELD(Cl); + {$IFNDEF FPC} + RIRegisterTNAMEDITEM(Cl); + RIRegisterTDEFCOLLECTION(Cl); + RIRegisterTWIDESTRINGFIELD(Cl); + RIRegisterTFLATLIST(Cl); + RIRegisterTFIELDDEFLIST(Cl); + RIRegisterTFIELDLIST(Cl); + RIRegisterTBCDFIELD(Cl); + {$IFDEF DELPHI6UP} + RIRegisterTFMTBCDFIELD(Cl); + {$ENDIF} + {$ENDIF} -RIRegisterTBLOBFIELD(Cl); -RIRegisterTMEMOFIELD(Cl); -RIRegisterTGRAPHICFIELD(Cl); -{$IFNDEF FPC} -RIRegisterTOBJECTFIELD(Cl); -RIRegisterTADTFIELD(Cl); -RIRegisterTARRAYFIELD(Cl); -RIRegisterTDATASETFIELD(Cl); -RIRegisterTREFERENCEFIELD(Cl); -RIRegisterTVARIANTFIELD(Cl); -RIRegisterTGUIDFIELD(Cl); -{$ENDIF} -RIRegisterTPARAM(Cl); -RIRegisterTPARAMS(Cl); -RIRegisterTDATASET(Cl); + RIRegisterTBLOBFIELD(Cl); + RIRegisterTMEMOFIELD(Cl); + RIRegisterTGRAPHICFIELD(Cl); + {$IFNDEF FPC} + RIRegisterTOBJECTFIELD(Cl); + RIRegisterTADTFIELD(Cl); + RIRegisterTARRAYFIELD(Cl); + RIRegisterTDATASETFIELD(Cl); + RIRegisterTREFERENCEFIELD(Cl); + RIRegisterTVARIANTFIELD(Cl); + RIRegisterTGUIDFIELD(Cl); + {$ENDIF} + RIRegisterTPARAM(Cl); + RIRegisterTPARAMS(Cl); + RIRegisterTDATASET(Cl); end; {$IFDEF USEIMPORTER} initialization -RIImporter.Invoke(RIRegister_DB); + RIImporter.Invoke(RIRegister_DB); {$ENDIF} end. diff --git a/Source/uPSR_classes.pas b/Source/uPSR_classes.pas index bfd47ad..513e8db 100644 --- a/Source/uPSR_classes.pas +++ b/Source/uPSR_classes.pas @@ -34,6 +34,231 @@ implementation uses Classes; +{$IFDEF DELPHI10UP}{$REGION 'TStrings'}{$ENDIF} +{$IFDEF class_helper_present} +type + TStrings_PSHelper = class helper for TStrings + public + procedure CapacityR(var T: Longint); + procedure CapacityW( T: Longint); + procedure DelimiterR( var T: char); + procedure DelimiterW( T: char); + {$IFDEF DELPHI2006UP} + procedure StrictDelimiterR( var T: boolean); + procedure StrictDelimiterW( T: boolean); + {$ENDIF} + procedure DelimitedTextR( var T: string); + procedure DelimitedTextW( T: string); + procedure NameValueSeparatorR( var T: char); + procedure NameValueSeparatorW( T: char); + procedure QuoteCharR( var T: char); + procedure QuoteCharW( T: char); + procedure CountR( var T: Longint); + procedure TextR( var T: string); + procedure TextW( T: string); + procedure CommaTextR( var T: string); + procedure CommaTextW( T: string); + procedure ObjectsR( var T: TObject; I: Longint); + procedure ObjectsW( const T: TObject; I: Longint); + procedure StringsR( var T: string; I: Longint); + procedure StringsW( const T: string; I: Longint); + procedure NamesR( var T: string; I: Longint); + procedure ValuesR( var T: string; const I: string); + procedure ValuesW( Const T, I: String); + procedure ValueFromIndexR( var T: string; const I: Longint); + procedure ValueFromIndexW( Const T: String; I: Longint); + end; + +procedure TStrings_PSHelper.CapacityR( var T: Longint); +begin + T := Self.Capacity; +end; + +procedure TStrings_PSHelper.CapacityW( T: Longint); +begin + Self.Capacity := T; +end; + +procedure TStrings_PSHelper.DelimiterR( var T: char); +begin + T := Self.Delimiter; +end; + +procedure TStrings_PSHelper.DelimiterW( T: char); +begin + Self.Delimiter:= T; +end; + +{$IFDEF DELPHI2006UP} +procedure TStrings_PSHelper.StrictDelimiterR( var T: boolean); +begin + T := Self.StrictDelimiter; +end; + +procedure TStrings_PSHelper.StrictDelimiterW( T: boolean); +begin + Self.StrictDelimiter:= T; +end; +{$ENDIF} + +procedure TStrings_PSHelper.DelimitedTextR( var T: string); +begin + T := Self.DelimitedText; +end; + +procedure TStrings_PSHelper.DelimitedTextW( T: string); +begin + Self.DelimitedText:= T; +end; + +procedure TStrings_PSHelper.NameValueSeparatorR( var T: char); +begin + T := Self.NameValueSeparator; +end; + +procedure TStrings_PSHelper.NameValueSeparatorW( T: char); +begin + Self.NameValueSeparator:= T; +end; + +procedure TStrings_PSHelper.QuoteCharR( var T: char); +begin + T := Self.QuoteChar; +end; + +procedure TStrings_PSHelper.QuoteCharW( T: char); +begin + Self.QuoteChar:= T; +end; + +procedure TStrings_PSHelper.CountR( var T: Longint); +begin + T := Self.Count; +end; + +procedure TStrings_PSHelper.TextR( var T: string); +begin + T := Self.Text; +end; + +procedure TStrings_PSHelper.TextW( T: string); +begin + Self.Text:= T; +end; + +procedure TStrings_PSHelper.CommaTextR( var T: string); +begin + T := Self.CommaText; +end; + +procedure TStrings_PSHelper.CommaTextW( T: string); +begin + Self.CommaText:= T; +end; + +procedure TStrings_PSHelper.ObjectsR( var T: TObject; I: Longint); +begin + T := Self.Objects[I]; +end; + +procedure TStrings_PSHelper.ObjectsW( const T: TObject; I: Longint); +begin + Self.Objects[I]:= T; +end; + +procedure TStrings_PSHelper.StringsR( var T: string; I: Longint); +begin + T := Self.Strings[I]; +end; + +procedure TStrings_PSHelper.StringsW( const T: string; I: Longint); +begin + Self.Strings[I]:= T; +end; + +procedure TStrings_PSHelper.NamesR( var T: string; I: Longint); +begin + T := Self.Names[I]; +end; + +procedure TStrings_PSHelper.ValuesR( var T: string; const I: string); +begin + T := Self.Values[I]; +end; + +procedure TStrings_PSHelper.ValuesW( Const T, I: String); +begin + Self.Values[I]:= T; +end; + +procedure TStrings_PSHelper.ValueFromIndexR( var T: string; const I: Longint); +begin + T := Self.ValueFromIndex[I]; +end; + +procedure TStrings_PSHelper.ValueFromIndexW( Const T: String; I: Longint); +begin + Self.ValueFromIndex[I]:= T; +end; + +procedure RIRegisterTStrings(cl: TPSRuntimeClassImporter; Streams: Boolean); // requires TPersistent +begin + with Cl.Add(TStrings) do + begin +{$IFDEF DELPHI2005UP} + RegisterConstructor(@TStrings.CREATE, 'Create'); +{$ENDIF} + + RegisterVirtualMethod(@TStrings.Add, 'Add'); + RegisterMethod(@TStrings.Append, 'Append'); + RegisterVirtualMethod(@TStrings.AddStrings, 'AddStrings'); + RegisterVirtualAbstractMethod(TStringList, @TStringList.Clear, 'Clear'); + RegisterVirtualAbstractMethod(TStringList, @TStringList.Delete, 'Delete'); + RegisterVirtualMethod(@TStrings.IndexOf, 'IndexOf'); + RegisterVirtualAbstractMethod(TStringList, @TStringList.Insert, 'Insert'); + RegisterPropertyHelper(@TStrings.CapacityR, @TStrings.CapacityW, 'Capacity'); + RegisterPropertyHelper(@TStrings.DelimiterR, @TStrings.DelimiterW, 'DELIMITER'); +{$IFDEF DELPHI2006UP} + RegisterPropertyHelper(@TStrings.StrictDelimiterR, @TStrings.StrictDelimiterW, 'StrictDelimiter'); +{$ENDIF} + RegisterPropertyHelper(@TStrings.DelimitedTextR, @TStrings.DelimitedTextW, 'DelimitedText'); + RegisterPropertyHelper(@TStrings.NameValueSeparatorR, @TStrings.NameValueSeparatorW, 'NameValueSeparator'); + RegisterPropertyHelper(@TStrings.QuoteCharR, @TStrings.QuoteCharW, 'QuoteChar'); + RegisterPropertyHelper(@TStrings.CountR, nil, 'Count'); + RegisterPropertyHelper(@TStrings.TextR, @TStrings.TextW, 'Text'); + RegisterPropertyHelper(@TStrings.CommaTextR, @TStrings.CommatextW, 'CommaText'); + if Streams then + begin + RegisterVirtualMethod(@TStrings.LoadFromFile, 'LoadFromFile'); + RegisterVirtualMethod(@TStrings.SaveToFile, 'SaveToFile'); + end; + RegisterPropertyHelper(@TStrings.StringsR, @TStrings.StringsW, 'Strings'); + RegisterPropertyHelper(@TStrings.ObjectsR, @TStrings.ObjectsW, 'Objects'); + + {$IFNDEF PS_MINIVCL} + RegisterMethod(@TStrings.BeginUpdate, 'BeginUpdate'); + RegisterMethod(@TStrings.EndUpdate, 'EndUpdate'); + RegisterMethod(@TStrings.Equals, 'Equals'); + RegisterVirtualMethod(@TStrings.Exchange, 'Exchange'); + RegisterMethod(@TStrings.IndexOfName, 'IndexOfName'); + if Streams then + RegisterVirtualMethod(@TStrings.LoadFromStream, 'LoadFromStream'); + RegisterVirtualMethod(@TStrings.Move, 'Move'); + if Streams then + RegisterVirtualMethod(@TStrings.SaveToStream, 'SaveToStream'); + RegisterVirtualMethod(@TStrings.SetText, 'SetText'); + RegisterPropertyHelper(@TStrings.NamesR, nil, 'Names'); + RegisterPropertyHelper(@TStrings.ValuesR, @TStrings.ValuesW, 'Values'); + RegisterPropertyHelper(@TStrings.ValueFromIndexR, @TStrings.ValueFromIndexW, 'ValueFromIndex'); + RegisterVirtualMethod(@TStrings.ADDOBJECT, 'AddObject'); + RegisterVirtualMethod(@TStrings.GETTEXT, 'GetText'); + RegisterMethod(@TStrings.INDEXOFOBJECT, 'IndexOfObject'); + RegisterMethod(@TStrings.INSERTOBJECT, 'InsertObject'); + {$ENDIF} + end; +end; + +{$ELSE} procedure TStringsCapacityR(Self: TStrings; var T: Longint); begin T := Self.Capacity; end; procedure TStringsCapacityW(Self: TStrings; T: Longint); begin Self.Capacity := T; end; procedure TStringsDelimiterR(Self: TStrings; var T: char); begin T := Self.Delimiter; end; @@ -92,6 +317,7 @@ procedure TStringsValueFromIndexR(Self: TStrings; var T: string; const I: Longin begin T := Self.ValueFromIndex[I]; end; + procedure TStringsValueFromIndexW(Self: TStrings; Const T: String; I: Longint); begin Self.ValueFromIndex[I]:= T; @@ -153,7 +379,93 @@ begin {$ENDIF} end; end; +{$ENDIF} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} +{$IFDEF DELPHI10UP}{$REGION 'TStringList'}{$ENDIF} +{$IFDEF class_helper_present} +type + TStringList_PSHelper = class helper for TStringList + public + procedure CASESENSITIVE_R(var T: Boolean); + procedure CASESENSITIVE_W(const T: Boolean); + procedure DUPLICATES_R(var T: TDuplicates); + procedure DUPLICATES_W(const T: TDuplicates); + procedure SORTED_R(var T: Boolean); + procedure SORTED_W(const T: Boolean); + procedure ONCHANGE_R(var T: TNotifyEvent); + procedure ONCHANGE_W(const T: TNotifyEvent); + procedure ONCHANGING_R(var T: TNotifyEvent); + procedure ONCHANGING_W(const T: TNotifyEvent); + end; + +procedure TStringList_PSHelper.CASESENSITIVE_R(var T: Boolean); +begin + T := Self.CaseSensitive; +end; + +procedure TStringList_PSHelper.CASESENSITIVE_W(const T: Boolean); +begin + Self.CaseSensitive := T; +end; + +procedure TStringList_PSHelper.DUPLICATES_R(var T: TDuplicates); +begin + T := Self.Duplicates; +end; + +procedure TStringList_PSHelper.DUPLICATES_W(const T: TDuplicates); +begin + Self.Duplicates := T; +end; + +procedure TStringList_PSHelper.SORTED_R(var T: Boolean); +begin + T := Self.Sorted; +end; + +procedure TStringList_PSHelper.SORTED_W(const T: Boolean); +begin + Self.Sorted := T; +end; + +procedure TStringList_PSHelper.ONCHANGE_R(var T: TNotifyEvent); +begin + T := Self.OnChange; +end; + +procedure TStringList_PSHelper.ONCHANGE_W(const T: TNotifyEvent); +begin + Self.OnChange := T; +end; + +procedure TStringList_PSHelper.ONCHANGING_R(var T: TNotifyEvent); +begin + T := Self.OnChanging; +end; + +procedure TStringList_PSHelper.ONCHANGING_W(const T: TNotifyEvent); +begin + Self.OnChanging := T; +end; + +procedure RIRegisterTSTRINGLIST(Cl: TPSRuntimeClassImporter); +begin + with Cl.Add(TSTRINGLIST) do + begin +{$IFDEF DELPHI2005UP} + RegisterConstructor(@TStringList.CREATE, 'Create'); +{$ENDIF} + RegisterVirtualMethod(@TStringList.FIND, 'Find'); + RegisterVirtualMethod(@TStringList.SORT, 'Sort'); + RegisterPropertyHelper(@TStringList.CASESENSITIVE_R, @TStringList.CASESENSITIVE_W, 'CaseSensitive'); + RegisterPropertyHelper(@TStringList.DUPLICATES_R, @TStringList.DUPLICATES_W, 'Duplicates'); + RegisterPropertyHelper(@TStringList.SORTED_R, @TStringList.SORTED_W, 'Sorted'); + RegisterEventPropertyHelper(@TStringList.ONCHANGE_R, @TStringList.ONCHANGE_W, 'OnChange'); + RegisterEventPropertyHelper(@TStringList.ONCHANGING_R, @TStringList.ONCHANGING_W, 'OnChanging'); + end; +end; +{$ELSE} procedure TSTRINGLISTCASESENSITIVE_R(Self: TSTRINGLIST; var T: BOOLEAN); begin T := Self.CASESENSITIVE; end; procedure TSTRINGLISTCASESENSITIVE_W(Self: TSTRINGLIST; const T: BOOLEAN); begin Self.CASESENSITIVE := T; end; procedure TSTRINGLISTDUPLICATES_R(Self: TSTRINGLIST; var T: TDUPLICATES); begin T := Self.DUPLICATES; end; @@ -185,7 +497,53 @@ begin end; end; +{$ENDIF} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TBits'}{$ENDIF} {$IFNDEF PS_MINIVCL} +{$IFDEF class_helper_present} +type + TBits_PSHelper = class helper for TBits + public + procedure BITS_W( T: BOOLEAN; t1: INTEGER); + procedure BITS_R( var T: BOOLEAN; t1: INTEGER); + procedure SIZE_R( T: INTEGER); + procedure SIZE_W( var T: INTEGER); + end; + +procedure TBits_PSHelper.BITS_W( T: BOOLEAN; t1: INTEGER); +begin + Self.BITS[t1] := T; +end; + +procedure TBits_PSHelper.BITS_R( var T: BOOLEAN; t1: INTEGER); +begin + T := Self.Bits[t1]; +end; + +procedure TBits_PSHelper.SIZE_R( T: INTEGER); +begin + Self.SIZE := T; +end; + +procedure TBits_PSHelper.SIZE_W( var T: INTEGER); +begin + T := Self.SIZE; +end; + +procedure RIRegisterTBITS(Cl: TPSRuntimeClassImporter); +begin + with Cl.Add(TBits) do + begin + RegisterMethod(@TBits.OPENBIT, 'OpenBit'); + RegisterPropertyHelper(@TBits.BITS_R, @TBits.BITS_W, 'Bits'); + RegisterPropertyHelper(@TBits.SIZE_R, @TBits.SIZE_W, 'Size'); + end; +end; + +{$ELSE} + procedure TBITSBITS_W(Self: TBITS; T: BOOLEAN; t1: INTEGER); begin Self.BITS[t1] := T; end; procedure TBITSBITS_R(Self: TBITS; var T: BOOLEAN; t1: INTEGER); begin T := Self.Bits[t1]; end; procedure TBITSSIZE_R(Self: TBITS; T: INTEGER); begin Self.SIZE := T; end; @@ -201,7 +559,60 @@ begin end; end; {$ENDIF} +{$ENDIF} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} +{$IFDEF DELPHI10UP}{$REGION 'TStream'}{$ENDIF} +{$IFDEF class_helper_present} +type + TStream_PSHelper = class helper for TStream + public + procedure POSITION_R(var T: LONGINT); + procedure POSITION_W(T: LONGINT); + procedure SIZE_R(var T: LONGINT); + {$IFDEF DELPHI3UP} + procedure SIZE_W(T: LONGINT); + {$ENDIF} + end; + + +procedure TStream_PSHelper.POSITION_R(var T: LONGINT); +begin + t := Self.Position; +end; +procedure TStream_PSHelper.POSITION_W(T: LONGINT); +begin + Self.Position := t; +end; + +procedure TStream_PSHelper.SIZE_R(var T: LONGINT); +begin + t := Self.Size; +end; + +{$IFDEF DELPHI3UP} +procedure TStream_PSHelper.SIZE_W(T: LONGINT); +begin + Self.Size := t; +end; +{$ENDIF} + +procedure RIRegisterTSTREAM(Cl: TPSRuntimeClassImporter); +begin + with Cl.Add(TSTREAM) do + begin + RegisterVirtualAbstractMethod(TMemoryStream, @TMemoryStream.READ, 'Read'); + RegisterVirtualAbstractMethod(TMemoryStream, @TMemoryStream.WRITE, 'Write'); + RegisterVirtualAbstractMethod(TMemoryStream, @TMemoryStream.SEEK, 'Seek'); + RegisterMethod(@TStream.READBUFFER, 'ReadBuffer'); + RegisterMethod(@TStream.WRITEBUFFER, 'WriteBuffer'); + RegisterMethod(@TStream.COPYFROM, 'CopyFrom'); + RegisterPropertyHelper(@TStream.POSITION_R, @TStream.POSITION_W, 'Position'); + RegisterPropertyHelper(@TStream.SIZE_R, {$IFDEF DELPHI3UP}@TStream.SIZE_W, {$ELSE}nil, {$ENDIF}'Size'); + end; +end; + +{$ELSE} procedure TSTREAMPOSITION_R(Self: TSTREAM; var T: LONGINT); begin t := Self.POSITION; end; procedure TSTREAMPOSITION_W(Self: TSTREAM; T: LONGINT); begin Self.POSITION := t; end; procedure TSTREAMSIZE_R(Self: TSTREAM; var T: LONGINT); begin t := Self.SIZE; end; @@ -223,7 +634,32 @@ begin RegisterPropertyHelper(@TSTREAMSIZE_R, {$IFDEF DELPHI3UP}@TSTREAMSIZE_W, {$ELSE}nil, {$ENDIF}'Size'); end; end; +{$ENDIF} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} +{$IFDEF DELPHI10UP}{$REGION 'THandleStream'}{$ENDIF} +{$IFDEF class_helper_present} +type + THandleStream_PSHelper = class helper for THandleStream + public + procedure HANDLE_R(var T: INTEGER); + end; + +procedure THandleStream_PSHelper.HANDLE_R(var T: INTEGER); +begin + T := Self.HANDLE; +end; + +procedure RIRegisterTHANDLESTREAM(Cl: TPSRuntimeClassImporter); +begin + with Cl.Add(THandleStream) do + begin + RegisterConstructor(@THandleStream.Create, 'Create'); + RegisterPropertyHelper(@THandleStream.HANDLE_R, nil, 'Handle'); + end; +end; + +{$ELSE} procedure THANDLESTREAMHANDLE_R(Self: THANDLESTREAM; var T: INTEGER); begin T := Self.HANDLE; end; procedure RIRegisterTHANDLESTREAM(Cl: TPSRuntimeClassImporter); @@ -235,6 +671,38 @@ begin end; end; +{$ENDIF} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + + +{$IFDEF DELPHI10UP}{$REGION 'TFilestream'}{$ENDIF} + +{$IFDEF class_helper_present} +type + TFilestream_PSHelper = class helper for TFilestream + public + {$IFDEF FPC} + function Create(filename: string; mode: word): TFileStream; + {$ENDIF} + end; + +{$IFDEF FPC} +// mh: because FPC doesn't handle pointers to overloaded functions +function TFileStream.Create(filename: string; mode: word): TFileStream; +begin + result := TFilestream.Create(filename, mode); +end; +{$ENDIF} + +procedure RIRegisterTFILESTREAM(Cl: TPSRuntimeClassImporter); +begin + with Cl.Add(TFILESTREAM) do + begin + RegisterConstructor(@TFILESTREAM.CREATE, 'Create'); + end; +end; + +{$ELSE} {$IFDEF FPC} // mh: because FPC doesn't handle pointers to overloaded functions function TFileStreamCreate(filename: string; mode: word): TFileStream; @@ -255,12 +723,39 @@ begin end; end; +{$ENDIF} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TStringStream'}{$ENDIF} {$IFDEF UNICODE} {$IFNDEF FPC} {$DEFINE STRINGSTREAMFIX} {$ENDIF} {$ENDIF} +{$IFDEF class_helper_present} +type + TStringStream_PSHelper = class helper for TStringStream + public + function CreateString(AHidden1: Pointer; AHidden2: Byte; const AString: string): TStringStream; + end; + +{$IFDEF STRINGSTREAMFIX} +function TStringStream_PSHelper.CreateString(AHidden1: Pointer; AHidden2: Byte; const AString: string): TStringStream; +begin + Result := TStringStream.Create(AString); +end; +{$ENDIF} + +procedure RIRegisterTSTRINGSTREAM(Cl: TPSRuntimeClassImporter); +begin + with Cl.Add(TSTRINGSTREAM) do + begin + RegisterConstructor({$IFDEF STRINGSTREAMFIX}@TStringStream.CreateString{$ELSE}@TSTRINGSTREAM.CREATE{$ENDIF}, 'Create'); + end; +end; + +{$ELSE} {$IFDEF STRINGSTREAMFIX} function TStringStreamCreateString(AHidden1: Pointer; AHidden2: Byte; const AString: string): TStringStream; begin @@ -276,19 +771,27 @@ begin end; end; +{$ENDIF} + +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + {$IFNDEF PS_MINIVCL} + +{$IFDEF DELPHI10UP}{$REGION 'TCustomMemoryStream'}{$ENDIF} procedure RIRegisterTCUSTOMMEMORYSTREAM(Cl: TPSRuntimeClassImporter); begin - with Cl.Add(TCUSTOMMEMORYSTREAM) do + with Cl.Add(TCustomMemoryStream) do begin RegisterMethod(@TCUSTOMMEMORYSTREAM.SAVETOSTREAM, 'SaveToStream'); RegisterMethod(@TCUSTOMMEMORYSTREAM.SAVETOFILE, 'SaveToFile'); end; end; +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} +{$IFDEF DELPHI10UP}{$REGION 'TMemoryStream'}{$ENDIF} procedure RIRegisterTMEMORYSTREAM(Cl: TPSRuntimeClassImporter); begin - with Cl.Add(TMEMORYSTREAM) do + with Cl.Add(TMemoryStream) do begin RegisterMethod(@TMEMORYSTREAM.CLEAR, 'Clear'); RegisterMethod(@TMEMORYSTREAM.LOADFROMSTREAM, 'LoadFromStream'); @@ -296,16 +799,61 @@ begin RegisterMethod(@TMEMORYSTREAM.SETSIZE, 'SetSize'); end; end; +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} +{$IFDEF DELPHI10UP}{$REGION 'TResourceStream'}{$ENDIF} procedure RIRegisterTRESOURCESTREAM(Cl: TPSRuntimeClassImporter); begin - with Cl.Add(TRESOURCESTREAM) do + with Cl.Add(TResourceStream) do begin RegisterConstructor(@TRESOURCESTREAM.CREATE, 'Create'); RegisterConstructor(@TRESOURCESTREAM.CREATEFROMID, 'CreateFromID'); end; end; +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} +{$IFDEF DELPHI10UP}{$REGION 'TParser'}{$ENDIF} +{$IFDEF class_helper_present} +type + TParser_PSHelper = class helper for TParser + public + procedure SOURCELINE_R(var T: INTEGER); + procedure TOKEN_R(var T: CHAR); + end; + +procedure TParser_PSHelper.SOURCELINE_R(var T: INTEGER); +begin + T := Self.SourceLine; +end; + +procedure TParser_PSHelper.TOKEN_R(var T: CHAR); +begin + T := Self.Token; +end; + +procedure RIRegisterTPARSER(Cl: TPSRuntimeClassImporter); +begin + with Cl.Add(TParser) do + begin + RegisterConstructor(@TParser.CREATE, 'Create'); + RegisterMethod(@TParser.CHECKTOKEN, 'CheckToken'); + RegisterMethod(@TParser.CHECKTOKENSYMBOL, 'CheckTokenSymbol'); + RegisterMethod(@TParser.ERROR, 'Error'); + RegisterMethod(@TParser.ERRORSTR, 'ErrorStr'); + RegisterMethod(@TParser.HEXTOBINARY, 'HexToBinary'); + RegisterMethod(@TParser.NEXTTOKEN, 'NextToken'); + RegisterMethod(@TParser.SOURCEPOS, 'SourcePos'); + RegisterMethod(@TParser.TOKENCOMPONENTIDENT, 'TokenComponentIdent'); + RegisterMethod(@TParser.TOKENFLOAT, 'TokenFloat'); + RegisterMethod(@TParser.TOKENINT, 'TokenInt'); + RegisterMethod(@TParser.TOKENSTRING, 'TokenString'); + RegisterMethod(@TParser.TOKENSYMBOLIS, 'TokenSymbolIs'); + RegisterPropertyHelper(@TParser.SOURCELINE_R, nil, 'SourceLine'); + RegisterPropertyHelper(@TParser.TOKEN_R, nil, 'Token'); + end; +end; + +{$ELSE} procedure TPARSERSOURCELINE_R(Self: TPARSER; var T: INTEGER); begin T := Self.SOURCELINE; end; procedure TPARSERTOKEN_R(Self: TPARSER; var T: CHAR); begin T := Self.TOKEN; end; @@ -330,8 +878,76 @@ begin RegisterPropertyHelper(@TPARSERTOKEN_R, nil, 'Token'); end; end; +{$ENDIF} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} -procedure TCOLLECTIONITEMS_W(Self: TCOLLECTION; const T: TCOLLECTIONITEM; const t1: INTEGER); +{$IFDEF DELPHI10UP}{$REGION 'TOwnedCollection'}{$ENDIF} +{$IFDEF DELPHI3UP} +procedure RIRegisterTOWNEDCOLLECTION(Cl: TPSRuntimeClassImporter); +Begin + with Cl.Add(TOwnedCollection) do + begin + RegisterConstructor(@TOWNEDCOLLECTION.CREATE, 'Create'); + end; +end; +{$ENDIF} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TCollection'}{$ENDIF} +{$IFDEF class_helper_present} +type + TCollection_PSHelper = class helper for TCollection + public + procedure ITEMS_W(const T: TCollectionItem; const t1: Integer); + procedure ITEMS_R(var T: TCollectionItem; const t1: Integer); + {$IFDEF DELPHI3UP} + procedure ITEMCLASS_R(var T: TCollectionItemClass); + {$ENDIF} + procedure COUNT_R(var T: Integer); + end; + +procedure TCollection_PSHelper.ITEMS_W(const T: TCollectionItem; const t1: Integer); +begin + Self.Items[t1] := T; +end; + +procedure TCollection_PSHelper.ITEMS_R(var T: TCollectionItem; const t1: Integer); +begin + T := Self.Items[t1]; +end; + +{$IFDEF DELPHI3UP} +procedure TCollection_PSHelper.ITEMCLASS_R(var T: TCollectionItemClass); +begin + T := Self.ItemClass; +end; +{$ENDIF} + +procedure TCollection_PSHelper.COUNT_R(var T: Integer); +begin + T := Self.Count; +end; + +procedure RIRegisterTCOLLECTION(Cl: TPSRuntimeClassImporter); +Begin +with Cl.Add(TCollection) do + begin + RegisterConstructor(@TCollection.CREATE, 'Create'); +{$IFDEF DELPHI6UP} {$IFNDEF FPC} RegisterMethod(@TCollection.OWNER, 'Owner'); {$ENDIF} {$ENDIF} // no owner in FPC + RegisterMethod(@TCollection.ADD, 'Add'); + RegisterVirtualMethod(@TCollection.BEGINUPDATE, 'BeginUpdate'); + RegisterMethod(@TCollection.CLEAR, 'Clear'); +{$IFDEF DELPHI5UP} RegisterMethod(@TCollection.DELETE, 'Delete'); {$ENDIF} + RegisterVirtualMethod(@TCollection.ENDUPDATE, 'EndUpdate'); +{$IFDEF DELPHI3UP} RegisterMethod(@TCollection.FINDITEMID, 'FindItemID'); {$ENDIF} +{$IFDEF DELPHI3UP} RegisterMethod(@TCollection.INSERT, 'Insert'); {$ENDIF} + RegisterPropertyHelper(@TCollection.COUNT_R,nil,'Count'); +{$IFDEF DELPHI3UP} RegisterPropertyHelper(@TCollection.ITEMCLASS_R,nil,'ItemClass'); {$ENDIF} + RegisterPropertyHelper(@TCollection.ITEMS_R,@TCollection.ITEMS_W,'Items'); + end; +end; +{$ELSE} +procedure TCOLLECTIONITEMS_W(Self: TCollection; const T: TCOLLECTIONITEM; const t1: INTEGER); begin Self.ITEMS[t1] := T; end; procedure TCOLLECTIONITEMS_R(Self: TCOLLECTION; var T: TCOLLECTIONITEM; const t1: INTEGER); @@ -345,6 +961,96 @@ begin T := Self.ITEMCLASS; end; procedure TCOLLECTIONCOUNT_R(Self: TCOLLECTION; var T: INTEGER); begin T := Self.COUNT; end; +procedure RIRegisterTCOLLECTION(Cl: TPSRuntimeClassImporter); +Begin +with Cl.Add(TCOLLECTION) do + begin + RegisterConstructor(@TCOLLECTION.CREATE, 'Create'); +{$IFDEF DELPHI6UP} {$IFNDEF FPC} RegisterMethod(@TCOLLECTION.OWNER, 'Owner'); {$ENDIF} {$ENDIF} // no owner in FPC + RegisterMethod(@TCOLLECTION.ADD, 'Add'); + RegisterVirtualMethod(@TCOLLECTION.BEGINUPDATE, 'BeginUpdate'); + RegisterMethod(@TCOLLECTION.CLEAR, 'Clear'); +{$IFDEF DELPHI5UP} RegisterMethod(@TCOLLECTION.DELETE, 'Delete'); {$ENDIF} + RegisterVirtualMethod(@TCOLLECTION.ENDUPDATE, 'EndUpdate'); +{$IFDEF DELPHI3UP} RegisterMethod(@TCOLLECTION.FINDITEMID, 'FindItemID'); {$ENDIF} +{$IFDEF DELPHI3UP} RegisterMethod(@TCOLLECTION.INSERT, 'Insert'); {$ENDIF} + RegisterPropertyHelper(@TCOLLECTIONCOUNT_R,nil,'Count'); +{$IFDEF DELPHI3UP} RegisterPropertyHelper(@TCOLLECTIONITEMCLASS_R,nil,'ItemClass'); {$ENDIF} + RegisterPropertyHelper(@TCOLLECTIONITEMS_R,@TCOLLECTIONITEMS_W,'Items'); + end; +end; + +{$ENDIF} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TCollectionItem'}{$ENDIF} +{$IFDEF class_helper_present} +type + TCollectionItem_PSHelper = class helper for TCollectionItem + public + {$IFDEF DELPHI3UP} + procedure DISPLAYNAME_W(const T: string); + procedure DISPLAYNAME_R(var T: STRING); + procedure ID_R(var T: INTEGER); + {$ENDIF} + procedure INDEX_W(const T: INTEGER); + procedure INDEX_R(var T: INTEGER); + procedure COLLECTION_W(const T: TCOLLECTION); + procedure COLLECTION_R(var T: TCOLLECTION); + end; + +{$IFDEF DELPHI3UP} +procedure TCollectionItem_PSHelper.DISPLAYNAME_W(const T: string); +begin + Self.DISPLAYNAME := T; +end; +{$ENDIF} + +{$IFDEF DELPHI3UP} +procedure TCollectionItem_PSHelper.DISPLAYNAME_R(var T: STRING); +begin + T := Self.DISPLAYNAME; +end; +{$ENDIF} + +procedure TCollectionItem_PSHelper.INDEX_W(const T: INTEGER); +begin + Self.INDEX := T; +end; + +procedure TCollectionItem_PSHelper.INDEX_R(var T: INTEGER); +begin T := Self.INDEX; end; + +{$IFDEF DELPHI3UP} +procedure TCollectionItem_PSHelper.ID_R(var T: INTEGER); +begin + T := Self.ID; +end; +{$ENDIF} + +procedure TCollectionItem_PSHelper.COLLECTION_W(const T: TCOLLECTION); +begin + Self.COLLECTION := T; +end; + +procedure TCollectionItem_PSHelper.COLLECTION_R(var T: TCOLLECTION); +begin + T := Self.COLLECTION; +end; + +procedure RIRegisterTCOLLECTIONITEM(Cl: TPSRuntimeClassImporter); +Begin +with Cl.Add(TCollectionItem) do + begin + RegisterVirtualConstructor(@TCollectionItem.CREATE, 'Create'); + RegisterPropertyHelper(@TCollectionItem.COLLECTION_R,@TCollectionItem.COLLECTION_W,'Collection'); +{$IFDEF DELPHI3UP} RegisterPropertyHelper(@TCollectionItem.ID_R,nil,'ID'); {$ENDIF} + RegisterPropertyHelper(@TCollectionItem.INDEX_R,@TCollectionItem.INDEX_W,'Index'); +{$IFDEF DELPHI3UP} RegisterPropertyHelper(@TCollectionItem.DISPLAYNAME_R,@TCollectionItem.DISPLAYNAME_W,'DisplayName'); {$ENDIF} + end; +end; + +{$ELSE} {$IFDEF DELPHI3UP} procedure TCOLLECTIONITEMDISPLAYNAME_W(Self: TCOLLECTIONITEM; const T: STRING); begin Self.DISPLAYNAME := T; end; @@ -372,38 +1078,9 @@ begin Self.COLLECTION := T; end; procedure TCOLLECTIONITEMCOLLECTION_R(Self: TCOLLECTIONITEM; var T: TCOLLECTION); begin T := Self.COLLECTION; end; -{$IFDEF DELPHI3UP} -procedure RIRegisterTOWNEDCOLLECTION(Cl: TPSRuntimeClassImporter); -Begin -with Cl.Add(TOWNEDCOLLECTION) do - begin - RegisterConstructor(@TOWNEDCOLLECTION.CREATE, 'Create'); - end; -end; -{$ENDIF} - -procedure RIRegisterTCOLLECTION(Cl: TPSRuntimeClassImporter); -Begin -with Cl.Add(TCOLLECTION) do - begin - RegisterConstructor(@TCOLLECTION.CREATE, 'Create'); -{$IFDEF DELPHI6UP} {$IFNDEF FPC} RegisterMethod(@TCOLLECTION.OWNER, 'Owner'); {$ENDIF} {$ENDIF} // no owner in FPC - RegisterMethod(@TCOLLECTION.ADD, 'Add'); - RegisterVirtualMethod(@TCOLLECTION.BEGINUPDATE, 'BeginUpdate'); - RegisterMethod(@TCOLLECTION.CLEAR, 'Clear'); -{$IFDEF DELPHI5UP} RegisterMethod(@TCOLLECTION.DELETE, 'Delete'); {$ENDIF} - RegisterVirtualMethod(@TCOLLECTION.ENDUPDATE, 'EndUpdate'); -{$IFDEF DELPHI3UP} RegisterMethod(@TCOLLECTION.FINDITEMID, 'FindItemID'); {$ENDIF} -{$IFDEF DELPHI3UP} RegisterMethod(@TCOLLECTION.INSERT, 'Insert'); {$ENDIF} - RegisterPropertyHelper(@TCOLLECTIONCOUNT_R,nil,'Count'); -{$IFDEF DELPHI3UP} RegisterPropertyHelper(@TCOLLECTIONITEMCLASS_R,nil,'ItemClass'); {$ENDIF} - RegisterPropertyHelper(@TCOLLECTIONITEMS_R,@TCOLLECTIONITEMS_W,'Items'); - end; -end; - procedure RIRegisterTCOLLECTIONITEM(Cl: TPSRuntimeClassImporter); Begin -with Cl.Add(TCOLLECTIONITEM) do +with Cl.Add(TCollectionItem) do begin RegisterVirtualConstructor(@TCOLLECTIONITEM.CREATE, 'Create'); RegisterPropertyHelper(@TCOLLECTIONITEMCOLLECTION_R,@TCOLLECTIONITEMCOLLECTION_W,'Collection'); @@ -412,6 +1089,10 @@ with Cl.Add(TCOLLECTIONITEM) do {$IFDEF DELPHI3UP} RegisterPropertyHelper(@TCOLLECTIONITEMDISPLAYNAME_R,@TCOLLECTIONITEMDISPLAYNAME_W,'DisplayName'); {$ENDIF} end; end; + +{$ENDIF} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + {$ENDIF} procedure RIRegister_Classes(Cl: TPSRuntimeClassImporter; Streams: Boolean); diff --git a/Source/uPSR_controls.pas b/Source/uPSR_controls.pas index b428754..e1b85fe 100644 --- a/Source/uPSR_controls.pas +++ b/Source/uPSR_controls.pas @@ -6,9 +6,6 @@ interface uses uPSRuntime, uPSUtils; - - - procedure RIRegisterTControl(Cl: TPSRuntimeClassImporter); procedure RIRegisterTWinControl(Cl: TPSRuntimeClassImporter); procedure RIRegisterTGraphicControl(cl: TPSRuntimeClassImporter); @@ -29,6 +26,98 @@ uses Classes, Controls, Graphics; {$ENDIF} +{$IFDEF DELPHI10UP}{$REGION 'TControl'}{$ENDIF} +{$IFDEF class_helper_present} +type + TControl_PSHelper = class helper for TControl + public + procedure AlignR( var T: Byte); + procedure AlignW( T: Byte); + procedure ClientHeightR( var T: Longint); + procedure ClientHeightW( T: Longint); + procedure ClientWidthR( var T: Longint); + procedure ClientWidthW( T: Longint); + procedure ShowHintR( var T: Boolean); + procedure ShowHintW( T: Boolean); + procedure VisibleR( var T: Boolean); + procedure VisibleW( T: Boolean); + procedure ParentR( var T: TWinControl); + procedure ParentW( T: TWinControl); + procedure SHOWHINT_W( T: BOOLEAN); + procedure SHOWHINT_R( var T: BOOLEAN); + procedure ENABLED_W( T: BOOLEAN); + procedure ENABLED_R( var T: BOOLEAN); + end; + +procedure TControl_PSHelper.AlignR( var T: Byte); begin T := Byte(Self.Align); end; +procedure TControl_PSHelper.AlignW( T: Byte); begin Self.Align:= TAlign(T); end; + +procedure TControl_PSHelper.ClientHeightR( var T: Longint); begin T := Self.ClientHeight; end; +procedure TControl_PSHelper.ClientHeightW( T: Longint); begin Self.ClientHeight := T; end; + +procedure TControl_PSHelper.ClientWidthR( var T: Longint); begin T := Self.ClientWidth; end; +procedure TControl_PSHelper.ClientWidthW( T: Longint); begin Self.ClientWidth:= T; end; + +procedure TControl_PSHelper.ShowHintR( var T: Boolean); begin T := Self.ShowHint; end; +procedure TControl_PSHelper.ShowHintW( T: Boolean); begin Self.ShowHint:= T; end; + +procedure TControl_PSHelper.VisibleR( var T: Boolean); begin T := Self.Visible; end; +procedure TControl_PSHelper.VisibleW( T: Boolean); begin Self.Visible:= T; end; + +procedure TControl_PSHelper.ParentR( var T: TWinControl); begin T := Self.Parent; end; +procedure TControl_PSHelper.ParentW( T: TWinControl); begin Self.Parent:= T; end; + + +procedure TControl_PSHelper.SHOWHINT_W( T: BOOLEAN); begin Self.SHOWHINT := T; end; +procedure TControl_PSHelper.SHOWHINT_R( var T: BOOLEAN); begin T := Self.SHOWHINT; end; +procedure TControl_PSHelper.ENABLED_W( T: BOOLEAN); begin Self.ENABLED := T; end; +procedure TControl_PSHelper.ENABLED_R( var T: BOOLEAN); begin T := Self.ENABLED; end; + +procedure RIRegisterTControl(Cl: TPSRuntimeClassImporter); +begin + with Cl.Add(TControl) do + begin + RegisterVirtualConstructor(@TControl.Create, 'Create'); + RegisterMethod(@TControl.BRingToFront, 'BringToFront'); + RegisterMethod(@TControl.Hide, 'Hide'); + RegisterVirtualMethod(@TControl.Invalidate, 'Invalidate'); + RegisterMethod(@TControl.Refresh, 'Refresh'); + RegisterVirtualMethod(@TControl.Repaint, 'Repaint'); + RegisterMethod(@TControl.SendToBack, 'SendToBack'); + RegisterMethod(@TControl.Show, 'Show'); + RegisterVirtualMethod(@TControl.Update, 'Update'); + RegisterVirtualMethod(@TControl.SetBounds, 'SetBounds'); + + RegisterPropertyHelper(@TControl.ShowHintR, @TControl.ShowHintW, 'ShowHint'); + RegisterPropertyHelper(@TControl.AlignR, @TControl.AlignW, 'Align'); + RegisterPropertyHelper(@TControl.ClientHeightR, @TControl.ClientHeightW, 'ClientHeight'); + RegisterPropertyHelper(@TControl.ClientWidthR, @TControl.ClientWidthW, 'ClientWidth'); + RegisterPropertyHelper(@TControl.VisibleR, @TControl.VisibleW, 'Visible'); + RegisterPropertyHelper(@TControl.ENABLED_R, @TControl.ENABLED_W, 'Enabled'); + + RegisterPropertyHelper(@TControl.ParentR, @TControl.ParentW, 'Parent'); + + {$IFNDEF PS_MINIVCL} + RegisterMethod(@TControl.Dragging, 'Dragging'); + RegisterMethod(@TControl.HasParent, 'HasParent'); + RegisterMethod(@TCONTROL.CLIENTTOSCREEN, 'ClientToScreen'); + RegisterMethod(@TCONTROL.DRAGGING, 'Dragging'); + {$IFNDEF FPC} + RegisterMethod(@TCONTROL.BEGINDRAG, 'BeginDrag'); + RegisterMethod(@TCONTROL.ENDDRAG, 'EndDrag'); + {$ENDIF} + {$IFNDEF CLX} + RegisterMethod(@TCONTROL.GETTEXTBUF, 'GetTextBuf'); + RegisterMethod(@TCONTROL.GETTEXTLEN, 'GetTextLen'); + RegisterMethod(@TCONTROL.PERFORM, 'Perform'); + RegisterMethod(@TCONTROL.SETTEXTBUF, 'SetTextBuf'); + {$ENDIF} + RegisterMethod(@TCONTROL.SCREENTOCLIENT, 'ScreenToClient'); + {$ENDIF} + end; +end; + +{$ELSE} procedure TControlAlignR(Self: TControl; var T: Byte); begin T := Byte(Self.Align); end; procedure TControlAlignW(Self: TControl; T: Byte); begin Self.Align:= TAlign(T); end; @@ -82,7 +171,7 @@ begin RegisterMethod(@TControl.HasParent, 'HasParent'); RegisterMethod(@TCONTROL.CLIENTTOSCREEN, 'ClientToScreen'); RegisterMethod(@TCONTROL.DRAGGING, 'Dragging'); - {$IFNDEF FPC} + {$IFNDEF FPC} RegisterMethod(@TCONTROL.BEGINDRAG, 'BeginDrag'); RegisterMethod(@TCONTROL.ENDDRAG, 'EndDrag'); {$ENDIF} @@ -96,6 +185,81 @@ begin {$ENDIF} end; end; + +{$ENDIF} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TWinControl'}{$ENDIF} +{$IFDEF class_helper_present} +type + TWinControl_PSHelper = class helper for TWinControl + public + {$IFNDEF CLX} + procedure HandleR(var T: Longint); + {$ENDIF} + procedure ShowingR(var T: Boolean); + procedure TabOrderR(var T: Longint); + procedure TabOrderW(T: Longint); + procedure TabStopR(var T: Boolean); + procedure TabStopW(T: Boolean); + procedure BRUSH_R(var T: TBRUSH); + procedure CONTROLS_R(var T: TCONTROL; t1: INTEGER); + procedure CONTROLCOUNT_R(var T: INTEGER); + end; + +{$IFNDEF CLX} +procedure TWinControl_PSHelper.HandleR(var T: Longint); begin T := Self.Handle; end; +{$ENDIF} +procedure TWinControl_PSHelper.ShowingR(var T: Boolean); begin T := Self.Showing; end; + + +procedure TWinControl_PSHelper.TabOrderR(var T: Longint); begin T := Self.TabOrder; end; +procedure TWinControl_PSHelper.TabOrderW(T: Longint); begin Self.TabOrder:= T; end; + +procedure TWinControl_PSHelper.TabStopR(var T: Boolean); begin T := Self.TabStop; end; +procedure TWinControl_PSHelper.TabStopW(T: Boolean); begin Self.TabStop:= T; end; +procedure TWinControl_PSHelper.BRUSH_R(var T: TBRUSH); begin T := Self.BRUSH; end; +procedure TWinControl_PSHelper.CONTROLS_R(var T: TCONTROL; t1: INTEGER); begin t := Self.CONTROLS[t1]; end; +procedure TWinControl_PSHelper.CONTROLCOUNT_R(var T: INTEGER); begin t := Self.CONTROLCOUNT; end; + +procedure RIRegisterTWinControl(Cl: TPSRuntimeClassImporter); // requires TControl +begin + with Cl.Add(TWinControl) do + begin + {$IFNDEF CLX} + RegisterPropertyHelper(@TWinControl.HandleR, nil, 'Handle'); + {$ENDIF} + RegisterPropertyHelper(@TWinControl.ShowingR, nil, 'Showing'); + RegisterPropertyHelper(@TWinControl.TabOrderR, @TWinControl.TabOrderW, 'TabOrder'); + RegisterPropertyHelper(@TWinControl.TabStopR, @TWinControl.TabStopW, 'TabStop'); + RegisterMethod(@TWinControl.CANFOCUS, 'CanFocus'); + RegisterMethod(@TWinControl.FOCUSED, 'Focused'); + RegisterPropertyHelper(@TWinControl.CONTROLS_R, nil, 'Controls'); + RegisterPropertyHelper(@TWinControl.CONTROLCOUNT_R, nil, 'ControlCount'); + {$IFNDEF PS_MINIVCL} + RegisterMethod(@TWinControl.HandleAllocated, 'HandleAllocated'); + RegisterMethod(@TWinControl.HandleNeeded, 'HandleNeeded'); + RegisterMethod(@TWinControl.EnableAlign, 'EnableAlign'); + RegisterMethod(@TWinControl.RemoveControl, 'RemoveControl'); + {$IFNDEF FPC} + RegisterMethod(@TWinControl.InsertControl, 'InsertControl'); + RegisterMethod(@TWinControl.ScaleBy, 'ScaleBy'); + RegisterMethod(@TWinControl.ScrollBy, 'ScrollBy'); + {$IFNDEF CLX} + RegisterMethod(@TWinControl.PAINTTO, 'PaintTo'); + {$ENDIF} + {$ENDIF}{FPC} + RegisterMethod(@TWinControl.Realign, 'Realign'); + RegisterVirtualMethod(@TWinControl.SetFocus, 'SetFocus'); + RegisterMethod(@TWinControl.CONTAINSCONTROL, 'ContainsControl'); + RegisterMethod(@TWinControl.DISABLEALIGN, 'DisableAlign'); + RegisterMethod(@TWinControl.UPDATECONTROLSTATE, 'UpdateControlState'); + RegisterPropertyHelper(@TWinControl.BRUSH_R, nil, 'Brush'); + {$ENDIF} + end; +end; + +{$ELSE} {$IFNDEF CLX} procedure TWinControlHandleR(Self: TWinControl; var T: Longint); begin T := Self.Handle; end; {$ENDIF} @@ -148,17 +312,121 @@ begin end; end; +{$ENDIF} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TGraphicControl'}{$ENDIF} procedure RIRegisterTGraphicControl(cl: TPSRuntimeClassImporter); // requires TControl begin Cl.Add(TGraphicControl); end; +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TCustomControl'}{$ENDIF} procedure RIRegisterTCustomControl(cl: TPSRuntimeClassImporter); // requires TControl begin Cl.Add(TCustomControl); end; +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} +{$IFDEF DELPHI10UP}{$REGION 'TDragObject'}{$ENDIF} +{$IFDEF class_helper_present} +{$IFDEF DELPHI4UP} +type + TDragObject_PSHelper = class helper for TDragObject + public + procedure MouseDeltaY_R(var T: Double); + procedure MouseDeltaX_R(var T: Double); + procedure DragTarget_W(const T: Pointer); + procedure DragTarget_R(var T: Pointer); + procedure DragTargetPos_W(const T: TPoint); + procedure DragTargetPos_R(var T: TPoint); + procedure DragPos_W(const T: TPoint); + procedure DragPos_R(var T: TPoint); + procedure DragHandle_W(const T: HWND); + procedure DragHandle_R(var T: HWND); + procedure Cancelling_W(const T: Boolean); + procedure Cancelling_R(var T: Boolean); + end; + +(*----------------------------------------------------------------------------*) +procedure TDragObject_PSHelper.MouseDeltaY_R(var T: Double); +begin T := Self.MouseDeltaY; end; + +(*----------------------------------------------------------------------------*) +procedure TDragObject_PSHelper.MouseDeltaX_R(var T: Double); +begin T := Self.MouseDeltaX; end; + +(*----------------------------------------------------------------------------*) +procedure TDragObject_PSHelper.DragTarget_W(const T: Pointer); +begin Self.DragTarget := T; end; + +(*----------------------------------------------------------------------------*) +procedure TDragObject_PSHelper.DragTarget_R(var T: Pointer); +begin T := Self.DragTarget; end; + +(*----------------------------------------------------------------------------*) +procedure TDragObject_PSHelper.DragTargetPos_W(const T: TPoint); +begin Self.DragTargetPos := T; end; + +(*----------------------------------------------------------------------------*) +procedure TDragObject_PSHelper.DragTargetPos_R(var T: TPoint); +begin T := Self.DragTargetPos; end; + +(*----------------------------------------------------------------------------*) +procedure TDragObject_PSHelper.DragPos_W(const T: TPoint); +begin Self.DragPos := T; end; + +(*----------------------------------------------------------------------------*) +procedure TDragObject_PSHelper.DragPos_R(var T: TPoint); +begin T := Self.DragPos; end; + +(*----------------------------------------------------------------------------*) +procedure TDragObject_PSHelper.DragHandle_W(const T: HWND); +begin Self.DragHandle := T; end; + +(*----------------------------------------------------------------------------*) +procedure TDragObject_PSHelper.DragHandle_R(var T: HWND); +begin T := Self.DragHandle; end; + +(*----------------------------------------------------------------------------*) +procedure TDragObject_PSHelper.Cancelling_W(const T: Boolean); +begin Self.Cancelling := T; end; + +(*----------------------------------------------------------------------------*) +procedure TDragObject_PSHelper.Cancelling_R(var T: Boolean); +begin T := Self.Cancelling; end; +{$ENDIF} +(*----------------------------------------------------------------------------*) +procedure RIRegister_TDragObject(CL: TPSRuntimeClassImporter); +begin + with CL.Add(TDragObject) do + begin +{$IFNDEF PS_MINIVCL} +{$IFDEF DELPHI4UP} + RegisterVirtualMethod(@TDragObject.Assign, 'Assign'); +{$ENDIF} +{$IFNDEF FPC} + RegisterVirtualMethod(@TDragObject.GetName, 'GetName'); + RegisterVirtualMethod(@TDragObject.Instance, 'Instance'); +{$ENDIF} + RegisterVirtualMethod(@TDragObject.HideDragImage, 'HideDragImage'); + RegisterVirtualMethod(@TDragObject.ShowDragImage, 'ShowDragImage'); +{$IFDEF DELPHI4UP} + RegisterPropertyHelper(@TDragObject.Cancelling_R,@TDragObject.Cancelling_W,'Cancelling'); + RegisterPropertyHelper(@TDragObject.DragHandle_R,@TDragObject.DragHandle_W,'DragHandle'); + RegisterPropertyHelper(@TDragObject.DragPos_R,@TDragObject.DragPos_W,'DragPos'); + RegisterPropertyHelper(@TDragObject.DragTargetPos_R,@TDragObject.DragTargetPos_W,'DragTargetPos'); + RegisterPropertyHelper(@TDragObject.DragTarget_R,@TDragObject.DragTarget_W,'DragTarget'); + RegisterPropertyHelper(@TDragObject.MouseDeltaX_R,nil,'MouseDeltaX'); + RegisterPropertyHelper(@TDragObject.MouseDeltaY_R,nil,'MouseDeltaY'); +{$ENDIF} +{$ENDIF} + end; +end; + +{$ELSE} {$IFDEF DELPHI4UP} -(* === run-time registration functions === *) (*----------------------------------------------------------------------------*) procedure TDragObjectMouseDeltaY_R(Self: TDragObject; var T: Double); begin T := Self.MouseDeltaY; end; @@ -219,7 +487,7 @@ begin {$IFNDEF FPC} RegisterVirtualMethod(@TDragObject.GetName, 'GetName'); RegisterVirtualMethod(@TDragObject.Instance, 'Instance'); -{$ENDIF} +{$ENDIF} RegisterVirtualMethod(@TDragObject.HideDragImage, 'HideDragImage'); RegisterVirtualMethod(@TDragObject.ShowDragImage, 'ShowDragImage'); {$IFDEF DELPHI4UP} @@ -235,11 +503,17 @@ begin end; end; +{$ENDIF} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TSizeConstraints'}{$ENDIF} procedure RIRegisterTSizeConstraints(cl: TPSRuntimeClassImporter); begin Cl.Add(TSizeConstraints); end; +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} +{$IFDEF DELPHI10UP}{$REGION 'Controls'}{$ENDIF} procedure RIRegister_Controls(Cl: TPSRuntimeClassImporter); begin RIRegisterTControl(Cl); @@ -249,6 +523,7 @@ begin RIRegister_TDragObject(cl); RIRegisterTSizeConstraints(cl); end; +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} // PS_MINIVCL changes by Martijn Laan (mlaan at wintax _dot_ nl) diff --git a/Source/uPSR_extctrls.pas b/Source/uPSR_extctrls.pas index 7fc7c2f..5145f0d 100644 --- a/Source/uPSR_extctrls.pas +++ b/Source/uPSR_extctrls.pas @@ -33,89 +33,175 @@ uses ExtCtrls, Graphics; {$ENDIF} +{$IFDEF DELPHI10UP}{$REGION 'TShape'}{$ENDIF} procedure RIRegisterTSHAPE(Cl: TPSRuntimeClassImporter); begin - with Cl.Add(TSHAPE) do + with Cl.Add(TShape) do begin {$IFNDEF PS_MINIVCL} RegisterMethod(@TSHAPE.STYLECHANGED, 'StyleChanged'); {$ENDIF} end; end; +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} +{$IFDEF DELPHI10UP}{$REGION 'TImage'}{$ENDIF} +{$IFDEF class_helper_present} +type + TImage_PSHelper = class helper for TImage + public + procedure CANVAS_R(var T: TCANVAS); + end; + +procedure TImage_PSHelper.CANVAS_R(var T: TCANVAS); begin T := Self.CANVAS; end; + +procedure RIRegisterTIMAGE(Cl: TPSRuntimeClassImporter); +begin + with Cl.Add(TImage) do + begin + RegisterPropertyHelper(@TImage.CANVAS_R, nil, 'Canvas'); + end; +end; + +{$ELSE} procedure TIMAGECANVAS_R(Self: TIMAGE; var T: TCANVAS); begin T := Self.CANVAS; end; procedure RIRegisterTIMAGE(Cl: TPSRuntimeClassImporter); begin - with Cl.Add(TIMAGE) do + with Cl.Add(TImage) do begin RegisterPropertyHelper(@TIMAGECANVAS_R, nil, 'Canvas'); end; end; +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TPaintBox'}{$ENDIF} +{$IFDEF class_helper_present} +type + TPaintBox_PSHelper = class helper for TPaintBox + public + procedure CANVAS_R(var T: TCanvas); + end; + +procedure TPaintBox_PSHelper.CANVAS_R(var T: TCanvas); begin T := Self.CANVAS; end; + +procedure RIRegisterTPAINTBOX(Cl: TPSRuntimeClassImporter); +begin + with Cl.Add(TPaintBox) do + begin + RegisterPropertyHelper(@TPaintBox.CANVAS_R, nil, 'Canvas'); + end; +end; +{$ELSE} procedure TPAINTBOXCANVAS_R(Self: TPAINTBOX; var T: TCanvas); begin T := Self.CANVAS; end; procedure RIRegisterTPAINTBOX(Cl: TPSRuntimeClassImporter); begin - with Cl.Add(TPAINTBOX) do + with Cl.Add(TPaintBox) do begin RegisterPropertyHelper(@TPAINTBOXCANVAS_R, nil, 'Canvas'); end; end; +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} +{$IFDEF DELPHI10UP}{$REGION 'TBevel'}{$ENDIF} procedure RIRegisterTBEVEL(Cl: TPSRuntimeClassImporter); begin - Cl.Add(TBEVEL); + Cl.Add(TBevel); end; +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} +{$IFDEF DELPHI10UP}{$REGION 'TTimer'}{$ENDIF} procedure RIRegisterTTIMER(Cl: TPSRuntimeClassImporter); begin - Cl.Add(TTIMER); + Cl.Add(TTimer); end; +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} +{$IFDEF DELPHI10UP}{$REGION 'TCustomPanel'}{$ENDIF} procedure RIRegisterTCUSTOMPANEL(Cl: TPSRuntimeClassImporter); begin - Cl.Add(TCUSTOMPANEL); + Cl.Add(TCustomPanel); end; +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} +{$IFDEF DELPHI10UP}{$REGION 'TPanel'}{$ENDIF} procedure RIRegisterTPANEL(Cl: TPSRuntimeClassImporter); begin - Cl.Add(TPANEL); + Cl.Add(TPanel); end; +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + {$IFNDEF CLX} +{$IFDEF DELPHI10UP}{$REGION 'TPage'}{$ENDIF} procedure RIRegisterTPAGE(Cl: TPSRuntimeClassImporter); begin - Cl.Add(TPAGE); + Cl.Add(TPage); end; +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} +{$IFDEF DELPHI10UP}{$REGION 'TNotebook'}{$ENDIF} procedure RIRegisterTNOTEBOOK(Cl: TPSRuntimeClassImporter); begin - Cl.Add(TNOTEBOOK); + Cl.Add(TNotebook); +end; +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'THeader'}{$ENDIF} +{$IFNDEF FPC} +{$IFDEF class_helper_present} +type + THeader_PSHelper = class helper for THeader + public + procedure SECTIONWIDTH_R(var T: INTEGER; t1: INTEGER); + procedure SECTIONWIDTH_W(T: INTEGER; t1: INTEGER); + end; + +procedure THeader_PSHelper.SECTIONWIDTH_R(var T: INTEGER; t1: INTEGER); begin T := Self.SECTIONWIDTH[t1]; end; +procedure THeader_PSHelper.SECTIONWIDTH_W(T: INTEGER; t1: INTEGER); begin Self.SECTIONWIDTH[t1] := T; end; + +procedure RIRegisterTHEADER(Cl: TPSRuntimeClassImporter); +begin + with Cl.Add(THeader) do + begin + RegisterPropertyHelper(@THeader.SECTIONWIDTH_R, @THeader.SECTIONWIDTH_W, 'SectionWidth'); + end; end; -{$IFNDEF FPC} +{$ELSE} procedure THEADERSECTIONWIDTH_R(Self: THEADER; var T: INTEGER; t1: INTEGER); begin T := Self.SECTIONWIDTH[t1]; end; procedure THEADERSECTIONWIDTH_W(Self: THEADER; T: INTEGER; t1: INTEGER); begin Self.SECTIONWIDTH[t1] := T; end; procedure RIRegisterTHEADER(Cl: TPSRuntimeClassImporter); begin - with Cl.Add(THEADER) do + with Cl.Add(THeader) do begin RegisterPropertyHelper(@THEADERSECTIONWIDTH_R, @THEADERSECTIONWIDTH_W, 'SectionWidth'); end; end; -{$ENDIF} + +{$ENDIF class_helper_present} +{$ENDIF FPC} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + {$ENDIF} +{$IFDEF DELPHI10UP}{$REGION 'TCustomRadioGroup'}{$ENDIF} procedure RIRegisterTCUSTOMRADIOGROUP(Cl: TPSRuntimeClassImporter); begin - Cl.Add(TCUSTOMRADIOGROUP); + Cl.Add(TCustomRadioGroup); end; +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} +{$IFDEF DELPHI10UP}{$REGION 'TRadioGroup'}{$ENDIF} procedure RIRegisterTRADIOGROUP(Cl: TPSRuntimeClassImporter); begin - Cl.Add(TRADIOGROUP); + Cl.Add(TRadioGroup); end; +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} procedure RIRegister_ExtCtrls(cl: TPSRuntimeClassImporter); begin diff --git a/Source/uPSR_forms.pas b/Source/uPSR_forms.pas index 08be3e1..d498e0e 100644 --- a/Source/uPSR_forms.pas +++ b/Source/uPSR_forms.pas @@ -18,36 +18,167 @@ implementation uses sysutils, classes, {$IFDEF CLX}QControls, QForms, QGraphics{$ELSE}Controls, Forms, Graphics{$ENDIF}; +{$IFDEF DELPHI10UP}{$REGION 'TControlScrollBar'}{$ENDIF} +{$IFDEF class_helper_present} +type + TControlScrollBar_PSHelper = class helper for TControlScrollBar + public + procedure KIND_R(var T: TSCROLLBARKIND); + procedure SCROLLPOS_R(var T: INTEGER); + end; + +procedure TControlScrollBar_PSHelper.KIND_R(var T: TSCROLLBARKIND); begin T := Self.KIND; end; +procedure TControlScrollBar_PSHelper.SCROLLPOS_R(var T: INTEGER); begin t := Self.SCROLLPOS; end; + +procedure RIRegisterTCONTROLSCROLLBAR(Cl: TPSRuntimeClassImporter); +begin + with Cl.Add(TControlScrollBar) do + begin + RegisterPropertyHelper(@TControlScrollBar.KIND_R, nil, 'Kind'); + RegisterPropertyHelper(@TControlScrollBar.SCROLLPOS_R, nil, 'ScrollPos'); + end; +end; + +{$ELSE} procedure TCONTROLSCROLLBARKIND_R(Self: TCONTROLSCROLLBAR; var T: TSCROLLBARKIND); begin T := Self.KIND; end; procedure TCONTROLSCROLLBARSCROLLPOS_R(Self: TCONTROLSCROLLBAR; var T: INTEGER); begin t := Self.SCROLLPOS; end; procedure RIRegisterTCONTROLSCROLLBAR(Cl: TPSRuntimeClassImporter); begin - with Cl.Add(TCONTROLSCROLLBAR) do + with Cl.Add(TControlScrollBar) do begin RegisterPropertyHelper(@TCONTROLSCROLLBARKIND_R, nil, 'Kind'); RegisterPropertyHelper(@TCONTROLSCROLLBARSCROLLPOS_R, nil, 'ScrollPos'); end; end; +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TScrollingWinControl'}{$ENDIF} {$IFNDEF FPC} procedure RIRegisterTSCROLLINGWINCONTROL(Cl: TPSRuntimeClassImporter); begin - with Cl.Add(TSCROLLINGWINCONTROL) do + with Cl.Add(TScrollingWinControl) do begin RegisterMethod(@TSCROLLINGWINCONTROL.SCROLLINVIEW, 'ScrollInView'); end; end; {$ENDIF} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} +{$IFDEF DELPHI10UP}{$REGION 'TScrollBox'}{$ENDIF} procedure RIRegisterTSCROLLBOX(Cl: TPSRuntimeClassImporter); begin - Cl.Add(TSCROLLBOX); + Cl.Add(TScrollBox); end; +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TForm'}{$ENDIF} +{$IFDEF class_helper_present} +type + TForm_PSHelper = class helper for TForm + public + {$IFNDEF FPC} + {$IFNDEF CLX} + procedure ACTIVEOLECONTROL_W(T: TWINCONTROL); + procedure ACTIVEOLECONTROL_R(var T: TWINCONTROL); + procedure TILEMODE_W(T: TTILEMODE); + procedure TILEMODE_R(var T: TTILEMODE); + {$ENDIF}{CLX} + procedure ACTIVEMDICHILD_R(var T: TFORM); + procedure DROPTARGET_W(T: BOOLEAN); + procedure DROPTARGET_R(var T: BOOLEAN); + procedure MDICHILDCOUNT_R(var T: INTEGER); + procedure MDICHILDREN_R(var T: TFORM; t1: INTEGER); + {$ENDIF}{FPC} + + procedure MODALRESULT_W(T: TMODALRESULT); + procedure MODALRESULT_R(var T: TMODALRESULT); + procedure ACTIVE_R(var T: BOOLEAN); + procedure CANVAS_R(var T: TCANVAS); + {$IFNDEF CLX} + procedure CLIENTHANDLE_R(var T: Longint); + {$ENDIF} + end; + {$IFNDEF FPC} {$IFNDEF CLX} -procedure TFORMACTIVEOLECONTROL_W(Self: TFORM; T: TWINCONTROL); begin Self.ACTIVEOLECONTROL := T; end; -procedure TFORMACTIVEOLECONTROL_R(Self: TFORM; var T: TWINCONTROL); begin T := Self.ACTIVEOLECONTROL; +procedure TForm_PSHelper.ACTIVEOLECONTROL_W(T: TWINCONTROL); begin Self.ACTIVEOLECONTROL := T; end; +procedure TForm_PSHelper.ACTIVEOLECONTROL_R(var T: TWINCONTROL); begin T := Self.ACTIVEOLECONTROL; +end; +procedure TForm_PSHelper.TILEMODE_W(T: TTILEMODE); begin Self.TILEMODE := T; end; +procedure TForm_PSHelper.TILEMODE_R(var T: TTILEMODE); begin T := Self.TILEMODE; end; +{$ENDIF}{CLX} +procedure TForm_PSHelper.ACTIVEMDICHILD_R(var T: TFORM); begin T := Self.ACTIVEMDICHILD; end; +procedure TForm_PSHelper.DROPTARGET_W(T: BOOLEAN); begin Self.DROPTARGET := T; end; +procedure TForm_PSHelper.DROPTARGET_R(var T: BOOLEAN); begin T := Self.DROPTARGET; end; +procedure TForm_PSHelper.MDICHILDCOUNT_R(var T: INTEGER); begin T := Self.MDICHILDCOUNT; end; +procedure TForm_PSHelper.MDICHILDREN_R(var T: TFORM; t1: INTEGER); begin T := Self.MDICHILDREN[T1]; +end; +{$ENDIF}{FPC} + +procedure TForm_PSHelper.MODALRESULT_W(T: TMODALRESULT); begin Self.MODALRESULT := T; end; +procedure TForm_PSHelper.MODALRESULT_R(var T: TMODALRESULT); begin T := Self.MODALRESULT; end; +procedure TForm_PSHelper.ACTIVE_R(var T: BOOLEAN); begin T := Self.ACTIVE; end; +procedure TForm_PSHelper.CANVAS_R(var T: TCANVAS); begin T := Self.CANVAS; end; +{$IFNDEF CLX} +procedure TForm_PSHelper.CLIENTHANDLE_R(var T: Longint); begin T := Self.CLIENTHANDLE; end; +{$ENDIF} + +{ Innerfuse Pascal Script Class Import Utility (runtime) } + +procedure RIRegisterTFORM(Cl: TPSRuntimeClassImporter); +begin + with Cl.Add(TForm) do + begin + {$IFDEF DELPHI4UP} + RegisterVirtualConstructor(@TForm.CREATENEW, 'CreateNew'); + {$ELSE} + RegisterConstructor(@TForm.CREATENEW, 'CreateNew'); + {$ENDIF} + RegisterMethod(@TForm.CLOSE, 'Close'); + RegisterMethod(@TForm.HIDE, 'Hide'); + RegisterMethod(@TForm.SHOW, 'Show'); + RegisterMethod(@TForm.SHOWMODAL, 'ShowModal'); + RegisterMethod(@TForm.RELEASE, 'Release'); + RegisterPropertyHelper(@TForm.ACTIVE_R, nil, 'Active'); + + {$IFNDEF PS_MINIVCL} + {$IFNDEF FPC} +{$IFNDEF CLX} + RegisterMethod(@TForm.ARRANGEICONS, 'ArrangeIcons'); + RegisterMethod(@TForm.GETFORMIMAGE, 'GetFormImage'); + RegisterMethod(@TForm.PRINT, 'Print'); + RegisterMethod(@TForm.SENDCANCELMODE, 'SendCancelMode'); + RegisterPropertyHelper(@TForm.ACTIVEOLECONTROL_R, @TForm.ACTIVEOLECONTROL_W, 'ActiveOleControl'); + RegisterPropertyHelper(@TForm.CLIENTHANDLE_R, nil, 'ClientHandle'); + RegisterPropertyHelper(@TForm.TILEMODE_R, @TForm.TILEMODE_W, 'TileMode'); +{$ENDIF}{CLX} + RegisterMethod(@TForm.CASCADE, 'Cascade'); + RegisterMethod(@TForm.NEXT, 'Next'); + RegisterMethod(@TForm.PREVIOUS, 'Previous'); + RegisterMethod(@TForm.TILE, 'Tile'); + RegisterPropertyHelper(@TForm.ACTIVEMDICHILD_R, nil, 'ActiveMDIChild'); + RegisterPropertyHelper(@TForm.DROPTARGET_R, @TForm.DROPTARGET_W, 'DropTarget'); + RegisterPropertyHelper(@TForm.MDICHILDCOUNT_R, nil, 'MDIChildCount'); + RegisterPropertyHelper(@TForm.MDICHILDREN_R, nil, 'MDIChildren'); + {$ENDIF}{FPC} + RegisterMethod(@TForm.CLOSEQUERY, 'CloseQuery'); + RegisterMethod(@TForm.DEFOCUSCONTROL, 'DefocusControl'); + RegisterMethod(@TForm.FOCUSCONTROL, 'FocusControl'); + RegisterMethod(@TForm.SETFOCUSEDCONTROL, 'SetFocusedControl'); + RegisterPropertyHelper(@TForm.CANVAS_R, nil, 'Canvas'); + RegisterPropertyHelper(@TForm.MODALRESULT_R, @TForm.MODALRESULT_W, 'ModalResult'); + {$ENDIF}{PS_MINIVCL} + end; +end; + +{$ELSE} +{$IFNDEF FPC} +{$IFNDEF CLX} +procedure TFORMACTIVEOLECONTROL_W(Self: TForm; T: TWINCONTROL); begin Self.ACTIVEOLECONTROL := T; end; +procedure TFORMACTIVEOLECONTROL_R(Self: TFORM; var T: TWINCONTROL); begin T := Self.ACTIVEOLECONTROL; end; procedure TFORMTILEMODE_W(Self: TFORM; T: TTILEMODE); begin Self.TILEMODE := T; end; procedure TFORMTILEMODE_R(Self: TFORM; var T: TTILEMODE); begin T := Self.TILEMODE; end; @@ -56,7 +187,7 @@ procedure TFORMACTIVEMDICHILD_R(Self: TFORM; var T: TFORM); begin T := Self.ACTI procedure TFORMDROPTARGET_W(Self: TFORM; T: BOOLEAN); begin Self.DROPTARGET := T; end; procedure TFORMDROPTARGET_R(Self: TFORM; var T: BOOLEAN); begin T := Self.DROPTARGET; end; procedure TFORMMDICHILDCOUNT_R(Self: TFORM; var T: INTEGER); begin T := Self.MDICHILDCOUNT; end; -procedure TFORMMDICHILDREN_R(Self: TFORM; var T: TFORM; t1: INTEGER); begin T := Self.MDICHILDREN[T1]; +procedure TFORMMDICHILDREN_R(Self: TFORM; var T: TFORM; t1: INTEGER); begin T := Self.MDICHILDREN[T1]; end; {$ENDIF}{FPC} @@ -88,7 +219,7 @@ begin {$IFNDEF PS_MINIVCL} {$IFNDEF FPC} -{$IFNDEF CLX} +{$IFNDEF CLX} RegisterMethod(@TFORM.ARRANGEICONS, 'ArrangeIcons'); RegisterMethod(@TFORM.GETFORMIMAGE, 'GetFormImage'); RegisterMethod(@TFORM.PRINT, 'Print'); @@ -116,8 +247,198 @@ begin end; end; +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TApplication'}{$ENDIF} +{$IFDEF class_helper_present} +type + TApplication_PSHelper = class helper for TApplication + public + {$IFNDEF FPC} + procedure ACTIVE_R(var T: BOOLEAN); + {$IFNDEF CLX} + procedure DIALOGHANDLE_R(var T: Longint); + procedure DIALOGHANDLE_W(T: Longint); + procedure HANDLE_R(var T: Longint); + procedure HANDLE_W(T: Longint); + procedure UPDATEFORMATSETTINGS_R(var T: BOOLEAN); + procedure UPDATEFORMATSETTINGS_W(T: BOOLEAN); + {$ENDIF} + {$ENDIF}{FPC} + + + procedure EXENAME_R(var T: STRING); + procedure HELPFILE_R(var T: STRING); + procedure HELPFILE_W(T: STRING); + procedure HINT_R(var T: STRING); + procedure HINT_W(T: STRING); + procedure HINTCOLOR_R(var T: TCOLOR); + procedure HINTCOLOR_W(T: TCOLOR); + procedure HINTPAUSE_R(var T: INTEGER); + procedure HINTPAUSE_W(T: INTEGER); + procedure HINTSHORTPAUSE_R(var T: INTEGER); + procedure HINTSHORTPAUSE_W(T: INTEGER); + procedure HINTHIDEPAUSE_R(var T: INTEGER); + procedure HINTHIDEPAUSE_W(T: INTEGER); + procedure MAINFORM_R(var T: {$IFDEF DELPHI3UP}TCustomForm{$ELSE}TFORM{$ENDIF}); + procedure SHOWHINT_R(var T: BOOLEAN); + procedure SHOWHINT_W(T: BOOLEAN); + procedure SHOWMAINFORM_R(var T: BOOLEAN); + procedure SHOWMAINFORM_W(T: BOOLEAN); + procedure TERMINATED_R(var T: BOOLEAN); + procedure TITLE_R(var T: STRING); + procedure TITLE_W(T: STRING); + + {$IFNDEF FPC} + procedure ONACTIVATE_R(var T: TNOTIFYEVENT); + procedure ONACTIVATE_W(T: TNOTIFYEVENT); + procedure ONDEACTIVATE_R(var T: TNOTIFYEVENT); + procedure ONDEACTIVATE_W(T: TNOTIFYEVENT); + {$ENDIF} + + procedure ONIDLE_R(var T: TIDLEEVENT); + procedure ONIDLE_W(T: TIDLEEVENT); + procedure ONHELP_R(var T: THELPEVENT); + procedure ONHELP_W(T: THELPEVENT); + procedure ONHINT_R(var T: TNOTIFYEVENT); + procedure ONHINT_W(T: TNOTIFYEVENT); + + {$IFNDEF FPC} + procedure ONMINIMIZE_R(var T: TNOTIFYEVENT); + procedure ONMINIMIZE_W(T: TNOTIFYEVENT); + + procedure ONRESTORE_R(var T: TNOTIFYEVENT); + procedure ONRESTORE_W(T: TNOTIFYEVENT); + {$ENDIF} + end; + +{$IFNDEF FPC} +procedure TApplication_PSHelper.ACTIVE_R(var T: BOOLEAN); begin T := Self.ACTIVE; end; +{$IFNDEF CLX} +procedure TApplication_PSHelper.DIALOGHANDLE_R(var T: Longint); begin T := Self.DIALOGHANDLE; end; +procedure TApplication_PSHelper.DIALOGHANDLE_W(T: Longint); begin Self.DIALOGHANDLE := T; end; +procedure TApplication_PSHelper.HANDLE_R(var T: Longint); begin T := Self.HANDLE; end; +procedure TApplication_PSHelper.HANDLE_W(T: Longint); begin Self.HANDLE := T; end; +procedure TApplication_PSHelper.UPDATEFORMATSETTINGS_R(var T: BOOLEAN); begin T := Self.UPDATEFORMATSETTINGS; end; +procedure TApplication_PSHelper.UPDATEFORMATSETTINGS_W(T: BOOLEAN); begin Self.UPDATEFORMATSETTINGS := T; end; +{$ENDIF} +{$ENDIF}{FPC} + + +procedure TApplication_PSHelper.EXENAME_R(var T: STRING); begin T := Self.EXENAME; end; +procedure TApplication_PSHelper.HELPFILE_R(var T: STRING); begin T := Self.HELPFILE; end; +procedure TApplication_PSHelper.HELPFILE_W(T: STRING); begin Self.HELPFILE := T; end; +procedure TApplication_PSHelper.HINT_R(var T: STRING); begin T := Self.HINT; end; +procedure TApplication_PSHelper.HINT_W(T: STRING); begin Self.HINT := T; end; +procedure TApplication_PSHelper.HINTCOLOR_R(var T: TCOLOR); begin T := Self.HINTCOLOR; end; +procedure TApplication_PSHelper.HINTCOLOR_W(T: TCOLOR); begin Self.HINTCOLOR := T; end; +procedure TApplication_PSHelper.HINTPAUSE_R(var T: INTEGER); begin T := Self.HINTPAUSE; end; +procedure TApplication_PSHelper.HINTPAUSE_W(T: INTEGER); begin Self.HINTPAUSE := T; end; +procedure TApplication_PSHelper.HINTSHORTPAUSE_R(var T: INTEGER); begin T := Self.HINTSHORTPAUSE; end; +procedure TApplication_PSHelper.HINTSHORTPAUSE_W(T: INTEGER); begin Self.HINTSHORTPAUSE := T; end; +procedure TApplication_PSHelper.HINTHIDEPAUSE_R(var T: INTEGER); begin T := Self.HINTHIDEPAUSE; end; +procedure TApplication_PSHelper.HINTHIDEPAUSE_W(T: INTEGER); begin Self.HINTHIDEPAUSE := T; end; +procedure TApplication_PSHelper.MAINFORM_R(var T: {$IFDEF DELPHI3UP}TCustomForm{$ELSE}TFORM{$ENDIF}); begin T := Self.MAINFORM; end; +procedure TApplication_PSHelper.SHOWHINT_R(var T: BOOLEAN); begin T := Self.SHOWHINT; end; +procedure TApplication_PSHelper.SHOWHINT_W(T: BOOLEAN); begin Self.SHOWHINT := T; end; +procedure TApplication_PSHelper.SHOWMAINFORM_R(var T: BOOLEAN); begin T := Self.SHOWMAINFORM; end; +procedure TApplication_PSHelper.SHOWMAINFORM_W(T: BOOLEAN); begin Self.SHOWMAINFORM := T; end; +procedure TApplication_PSHelper.TERMINATED_R(var T: BOOLEAN); begin T := Self.TERMINATED; end; +procedure TApplication_PSHelper.TITLE_R(var T: STRING); begin T := Self.TITLE; end; +procedure TApplication_PSHelper.TITLE_W(T: STRING); begin Self.TITLE := T; end; + +{$IFNDEF FPC} +procedure TApplication_PSHelper.ONACTIVATE_R(var T: TNOTIFYEVENT); begin T := Self.ONACTIVATE; end; +procedure TApplication_PSHelper.ONACTIVATE_W(T: TNOTIFYEVENT); begin Self.ONACTIVATE := T; end; +procedure TApplication_PSHelper.ONDEACTIVATE_R(var T: TNOTIFYEVENT); begin T := Self.ONDEACTIVATE; end; +procedure TApplication_PSHelper.ONDEACTIVATE_W(T: TNOTIFYEVENT); begin Self.ONDEACTIVATE := T; end; +{$ENDIF} + +procedure TApplication_PSHelper.ONIDLE_R(var T: TIDLEEVENT); begin T := Self.ONIDLE; end; +procedure TApplication_PSHelper.ONIDLE_W(T: TIDLEEVENT); begin Self.ONIDLE := T; end; +procedure TApplication_PSHelper.ONHELP_R(var T: THELPEVENT); begin T := Self.ONHELP; end; +procedure TApplication_PSHelper.ONHELP_W(T: THELPEVENT); begin Self.ONHELP := T; end; +procedure TApplication_PSHelper.ONHINT_R(var T: TNOTIFYEVENT); begin T := Self.ONHINT; end; +procedure TApplication_PSHelper.ONHINT_W(T: TNOTIFYEVENT); begin Self.ONHINT := T; end; + +{$IFNDEF FPC} +procedure TApplication_PSHelper.ONMINIMIZE_R(var T: TNOTIFYEVENT); begin T := Self.ONMINIMIZE; end; +procedure TApplication_PSHelper.ONMINIMIZE_W(T: TNOTIFYEVENT); begin Self.ONMINIMIZE := T; end; + +procedure TApplication_PSHelper.ONRESTORE_R(var T: TNOTIFYEVENT); begin T := Self.ONRESTORE; end; +procedure TApplication_PSHelper.ONRESTORE_W(T: TNOTIFYEVENT); begin Self.ONRESTORE := T; end; +{$ENDIF} + +procedure RIRegisterTAPPLICATION(Cl: TPSRuntimeClassImporter); +begin + with Cl.Add(TApplication) do + begin {$IFNDEF FPC} -procedure TAPPLICATIONACTIVE_R(Self: TAPPLICATION; var T: BOOLEAN); begin T := Self.ACTIVE; end; + RegisterMethod(@TApplication.MINIMIZE, 'Minimize'); + RegisterMethod(@TApplication.RESTORE, 'Restore'); + RegisterPropertyHelper(@TApplication.ACTIVE_R, nil, 'Active'); + RegisterPropertyHelper(@TApplication.ONACTIVATE_R, @TApplication.ONACTIVATE_W, 'OnActivate'); + RegisterPropertyHelper(@TApplication.ONDEACTIVATE_R, @TApplication.ONDEACTIVATE_W, 'OnDeactivate'); + RegisterPropertyHelper(@TApplication.ONMINIMIZE_R, @TApplication.ONMINIMIZE_W, 'OnMinimize'); + RegisterPropertyHelper(@TApplication.ONRESTORE_R, @TApplication.ONRESTORE_W, 'OnRestore'); + RegisterPropertyHelper(@TApplication.DIALOGHANDLE_R, @TApplication.DIALOGHANDLE_W, 'DialogHandle'); + RegisterMethod(@TApplication.CREATEHANDLE, 'CreateHandle'); + RegisterMethod(@TApplication.NORMALIZETOPMOSTS, 'NormalizeTopMosts'); + RegisterMethod(@TApplication.RESTORETOPMOSTS, 'RestoreTopMosts'); + {$IFNDEF CLX} + RegisterPropertyHelper(@TApplication.HANDLE_R, @TApplication.HANDLE_W, 'Handle'); + RegisterPropertyHelper(@TApplication.UPDATEFORMATSETTINGS_R, @TApplication.UPDATEFORMATSETTINGS_W, 'UpdateFormatSettings'); + {$ENDIF} + {$ENDIF} + RegisterMethod(@TApplication.BRINGTOFRONT, 'BringToFront'); + RegisterMethod(@TApplication.MESSAGEBOX, 'MessageBox'); + RegisterMethod(@TApplication.PROCESSMESSAGES, 'ProcessMessages'); + RegisterMethod(@TApplication.TERMINATE, 'Terminate'); + RegisterPropertyHelper(@TApplication.EXENAME_R, nil, 'ExeName'); + RegisterPropertyHelper(@TApplication.HINT_R, @TApplication.HINT_W, 'Hint'); + RegisterPropertyHelper(@TApplication.MAINFORM_R, nil, 'MainForm'); + RegisterPropertyHelper(@TApplication.SHOWHINT_R, @TApplication.SHOWHINT_W, 'ShowHint'); + RegisterPropertyHelper(@TApplication.SHOWMAINFORM_R, @TApplication.SHOWMAINFORM_W, 'ShowMainForm'); + RegisterPropertyHelper(@TApplication.TERMINATED_R, nil, 'Terminated'); + RegisterPropertyHelper(@TApplication.TITLE_R, @TApplication.TITLE_W, 'Title'); + RegisterPropertyHelper(@TApplication.ONIDLE_R, @TApplication.ONIDLE_W, 'OnIdle'); + RegisterPropertyHelper(@TApplication.ONHINT_R, @TApplication.ONHINT_W, 'OnHint'); + {$IFNDEF PS_MINIVCL} + RegisterMethod(@TApplication.CONTROLDESTROYED, 'ControlDestroyed'); + RegisterMethod(@TApplication.CANCELHINT, 'CancelHint'); + {$IFNDEF CLX} + {$IFNDEF FPC} + RegisterMethod(@TApplication.HELPCOMMAND, 'HelpCommand'); + {$ENDIF} + RegisterMethod(@TApplication.HELPCONTEXT, 'HelpContext'); + {$IFNDEF FPC} + RegisterMethod(@TApplication.HELPJUMP, 'HelpJump'); + {$ENDIF} + {$ENDIF} +// RegisterMethod(@TApplication.HANDLEEXCEPTION, 'HandleException'); +// RegisterMethod(@TApplication.HOOKMAINWINDOW, 'HookMainWindow'); +// RegisterMethod(@TApplication.UNHOOKMAINWINDOW, 'UnhookMainWindow'); + + RegisterMethod(@TApplication.HANDLEMESSAGE, 'HandleMessage'); + RegisterMethod(@TApplication.HIDEHINT, 'HideHint'); + RegisterMethod(@TApplication.HINTMOUSEMESSAGE, 'HintMouseMessage'); + RegisterMethod(@TApplication.INITIALIZE, 'Initialize'); + RegisterMethod(@TApplication.RUN, 'Run'); +// RegisterMethod(@TApplication.SHOWEXCEPTION, 'ShowException'); + RegisterPropertyHelper(@TApplication.HELPFILE_R, @TApplication.HELPFILE_W, 'HelpFile'); + RegisterPropertyHelper(@TApplication.HINTCOLOR_R, @TApplication.HINTCOLOR_W, 'HintColor'); + RegisterPropertyHelper(@TApplication.HINTPAUSE_R, @TApplication.HINTPAUSE_W, 'HintPause'); + RegisterPropertyHelper(@TApplication.HINTSHORTPAUSE_R, @TApplication.HINTSHORTPAUSE_W, 'HintShortPause'); + RegisterPropertyHelper(@TApplication.HINTHIDEPAUSE_R, @TApplication.HINTHIDEPAUSE_W, 'HintHidePause'); + RegisterPropertyHelper(@TApplication.ONHELP_R, @TApplication.ONHELP_W, 'OnHelp'); + {$ENDIF} + end; +end; + +{$ELSE} +{$IFNDEF FPC} +procedure TAPPLICATIONACTIVE_R(Self: TApplication; var T: BOOLEAN); begin T := Self.ACTIVE; end; {$IFNDEF CLX} procedure TAPPLICATIONDIALOGHANDLE_R(Self: TAPPLICATION; var T: Longint); begin T := Self.DIALOGHANDLE; end; procedure TAPPLICATIONDIALOGHANDLE_W(Self: TAPPLICATION; T: Longint); begin Self.DIALOGHANDLE := T; end; @@ -239,6 +560,10 @@ begin end; end; +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + + procedure RIRegister_Forms(Cl: TPSRuntimeClassImporter); begin {$IFNDEF PS_MINIVCL} diff --git a/Source/uPSR_graphics.pas b/Source/uPSR_graphics.pas index 9ac5d72..a5102dc 100644 --- a/Source/uPSR_graphics.pas +++ b/Source/uPSR_graphics.pas @@ -27,6 +27,42 @@ uses Classes, Graphics,LCLType; {$ENDIF} +{$IFDEF DELPHI10UP}{$REGION 'TFont'}{$ENDIF} +{$IFDEF class_helper_present} +type + TFont_PSHelper = class helper for TFont + public + {$IFNDEF CLX} + procedure HandleR(var T: Longint); + procedure HandleW(T: Longint); + {$ENDIF} + procedure PixelsPerInchR(var T: Longint); + procedure PixelsPerInchW(T: Longint); + procedure StyleR(var T: TFontStyles); + procedure StyleW(T: TFontStyles); + end; +{$IFNDEF CLX} +procedure TFont_PSHelper.HandleR(var T: Longint); begin T := Self.Handle; end; +procedure TFont_PSHelper.HandleW(T: Longint); begin Self.Handle := T; end; +{$ENDIF} +procedure TFont_PSHelper.PixelsPerInchR(var T: Longint); begin T := Self.PixelsPerInch; end; +procedure TFont_PSHelper.PixelsPerInchW(T: Longint); begin {$IFNDEF FPC} Self.PixelsPerInch := T;{$ENDIF} end; +procedure TFont_PSHelper.StyleR(var T: TFontStyles); begin T := Self.Style; end; +procedure TFont_PSHelper.StyleW(T: TFontStyles); begin Self.Style:= T; end; + +procedure RIRegisterTFont(Cl: TPSRuntimeClassImporter); +begin + with Cl.Add(TFont) do + begin + RegisterConstructor(@TFont.Create, 'Create'); +{$IFNDEF CLX} + RegisterPropertyHelper(@TFont.HandleR, @TFont.HandleW, 'Handle'); +{$ENDIF} + RegisterPropertyHelper(@TFont.PixelsPerInchR, @TFont.PixelsPerInchW, 'PixelsPerInch'); + RegisterPropertyHelper(@TFont.StyleR, @TFont.StyleW, 'Style'); + end; +end; +{$ELSE} {$IFNDEF CLX} procedure TFontHandleR(Self: TFont; var T: Longint); begin T := Self.Handle; end; procedure TFontHandleW(Self: TFont; T: Longint); begin Self.Handle := T; end; @@ -48,6 +84,85 @@ begin RegisterPropertyHelper(@TFontStyleR, @TFontStyleW, 'Style'); end; end; +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TCanvas'}{$ENDIF} +{$IFDEF class_helper_present} +type + TCanvas_PSHelper = class helper for TCanvas + public + {$IFNDEF CLX} + procedure HandleR(var T: Longint); + procedure HandleW(T: Longint); + {$ENDIF} + + procedure PixelsR(var T: Longint; X,Y: Longint); + procedure PixelsW(T, X, Y: Longint); + {$IFDEF FPC} + procedure Arc(Self : TCanvas; X1, Y1, X2, Y2, X3, Y3, X4, Y4: Integer); + procedure Chord(Self : TCanvas; X1, Y1, X2, Y2, X3, Y3, X4, Y4: Integer); + procedure Rectangle(Self : TCanvas; X1,Y1,X2,Y2 : integer); + procedure RoundRect(Self : TCanvas; X1, Y1, X2, Y2, X3, Y3 : integer); + procedure Ellipse(Self : TCanvas;X1, Y1, X2, Y2: Integer); + procedure FillRect(Self : TCanvas; const Rect: TRect); + procedure FloodFill(Self : TCanvas; X, Y: Integer; Color: TColor; FillStyle: TFillStyle); + {$ENDIF} + end; + +{$IFNDEF CLX} +procedure TCanvas_PSHelper.HandleR(var T: Longint); begin T := Self.Handle; end; +procedure TCanvas_PSHelper.HandleW(T: Longint); begin Self.Handle:= T; end; +{$ENDIF} + +procedure TCanvas_PSHelper.PixelsR(var T: Longint; X,Y: Longint); begin T := Self.Pixels[X,Y]; end; +procedure TCanvas_PSHelper.PixelsW(T, X, Y: Longint); begin Self.Pixels[X,Y]:= T; end; +{$IFDEF FPC} +procedure TCanvas_PSHelper.Arc(Self : TCanvas; X1, Y1, X2, Y2, X3, Y3, X4, Y4: Integer); begin Self.Arc(X1, Y1, X2, Y2, X3, Y3, X4, Y4); end; +procedure TCanvas_PSHelper.Chord(Self : TCanvas; X1, Y1, X2, Y2, X3, Y3, X4, Y4: Integer); begin self.Chord(X1, Y1, X2, Y2, X3, Y3, X4, Y4); end; +procedure TCanvas_PSHelper.Rectangle(Self : TCanvas; X1,Y1,X2,Y2 : integer); begin self.Rectangle(x1,y1,x2,y2); end; +procedure TCanvas_PSHelper.RoundRect(Self : TCanvas; X1, Y1, X2, Y2, X3, Y3 : integer); begin self.RoundRect(X1, Y1, X2, Y2, X3, Y3); end; +procedure TCanvas_PSHelper.Ellipse(Self : TCanvas;X1, Y1, X2, Y2: Integer); begin self.Ellipse(X1, Y1, X2, Y2); end; +procedure TCanvas_PSHelper.FillRect(Self : TCanvas; const Rect: TRect); begin self.FillRect(rect); end; +procedure TCanvas_PSHelper.FloodFill(Self : TCanvas; X, Y: Integer; Color: TColor; FillStyle: TFillStyle); begin self.FloodFill(x,y,color,fillstyle); end; +{$ENDIF} + +procedure RIRegisterTCanvas(cl: TPSRuntimeClassImporter); // requires TPersistent +begin + with Cl.Add(TCanvas) do + begin + RegisterMethod(@TCanvas.Arc, 'Arc'); + RegisterMethod(@TCanvas.Chord, 'Chord'); + RegisterMethod(@TCanvas.Rectangle, 'Rectangle'); + RegisterMethod(@TCanvas.RoundRect, 'RoundRect'); + RegisterMethod(@TCanvas.Ellipse, 'Ellipse'); + RegisterMethod(@TCanvas.FillRect, 'FillRect'); +{$IFDEF FPC} + RegisterMethod(@TCanvas.FloodFill, 'FloodFill'); +{$ELSE} +{$IFNDEF CLX} + RegisterMethod(@TCanvas.FloodFill, 'FloodFill'); +{$ENDIF} +{$ENDIF} + RegisterMethod(@TCanvas.Draw, 'Draw'); + + RegisterMethod(@TCanvas.Lineto, 'LineTo'); + RegisterMethod(@TCanvas.Moveto, 'MoveTo'); + RegisterMethod(@TCanvas.Pie, 'Pie'); + RegisterMethod(@TCanvas.Refresh, 'Refresh'); + RegisterMethod(@TCanvas.TextHeight, 'TextHeight'); + RegisterMethod(@TCanvas.TextOut, 'TextOut'); + RegisterMethod(@TCanvas.TextWidth, 'TextWidth'); +{$IFNDEF CLX} + RegisterPropertyHelper(@TCanvas.HandleR, @TCanvas.HandleW, 'Handle'); +{$ENDIF} + RegisterPropertyHelper(@TCanvas.PixelsR, @TCanvas.PixelsW, 'Pixels'); + end; +end; + + +{$ELSE} + {$IFNDEF CLX} procedure TCanvasHandleR(Self: TCanvas; var T: Longint); begin T := Self.Handle; end; procedure TCanvasHandleW(Self: TCanvas; T: Longint); begin Self.Handle:= T; end; @@ -77,7 +192,7 @@ begin RegisterMethod(@TCanvasEllipse, 'Ellipse'); RegisterMethod(@TCanvasFillRect, 'FillRect'); RegisterMethod(@TCanvasFloodFill, 'FloodFill'); -{$ELSE} +{$ELSE} RegisterMethod(@TCanvas{$IFNDEF FPC}.{$ENDIF}Arc, 'Arc'); RegisterMethod(@TCanvas{$IFNDEF FPC}.{$ENDIF}Chord, 'Chord'); RegisterMethod(@TCanvas{$IFNDEF FPC}.{$ENDIF}Rectangle, 'Rectangle'); @@ -105,10 +220,33 @@ begin end; +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TGraphicsObject'}{$ENDIF} +{$IFDEF class_helper_present} +type + TGraphicsObject_PSHelper = class helper for TGraphicsObject + public + procedure ONCHANGE_W(T: TNotifyEvent); + procedure ONCHANGE_R(var T: TNotifyEvent); + end; + +procedure TGraphicsObject_PSHelper.ONCHANGE_W(T: TNotifyEvent); begin Self.OnChange := t; end; +procedure TGraphicsObject_PSHelper.ONCHANGE_R(var T: TNotifyEvent); begin T :=Self.OnChange; end; + + +procedure RIRegisterTGRAPHICSOBJECT(Cl: TPSRuntimeClassImporter); +begin + with Cl.Add(TGraphicsObject) do + begin + RegisterPropertyHelper(@TGraphicsObject.ONCHANGE_R, @TGraphicsObject.ONCHANGE_W, 'OnChange'); + end; +end; +{$ELSE} procedure TGRAPHICSOBJECTONCHANGE_W(Self: TGraphicsObject; T: TNotifyEvent); begin Self.OnChange := t; end; procedure TGRAPHICSOBJECTONCHANGE_R(Self: TGraphicsObject; var T: TNotifyEvent); begin T :=Self.OnChange; end; - procedure RIRegisterTGRAPHICSOBJECT(Cl: TPSRuntimeClassImporter); begin with Cl.Add(TGRAPHICSOBJECT) do @@ -116,23 +254,74 @@ begin RegisterPropertyHelper(@TGRAPHICSOBJECTONCHANGE_R, @TGRAPHICSOBJECTONCHANGE_W, 'OnChange'); end; end; +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} +{$IFDEF DELPHI10UP}{$REGION 'TPen'}{$ENDIF} procedure RIRegisterTPEN(Cl: TPSRuntimeClassImporter); begin - with Cl.Add(TPEN) do + with Cl.Add(TPen) do begin RegisterConstructor(@TPEN.CREATE, 'Create'); end; end; +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} +{$IFDEF DELPHI10UP}{$REGION 'TBrush'}{$ENDIF} procedure RIRegisterTBRUSH(Cl: TPSRuntimeClassImporter); begin - with Cl.Add(TBRUSH) do + with Cl.Add(TBrush) do begin RegisterConstructor(@TBRUSH.CREATE, 'Create'); end; end; +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} +{$IFDEF DELPHI10UP}{$REGION 'TGraphic'}{$ENDIF} +{$IFDEF class_helper_present} +type + TGraphic_PSHelper = class helper for TGraphic + public + procedure OnChange_W(const T: TNotifyEvent); + procedure OnChange_R(var T: TNotifyEvent); + procedure Width_W(const T: Integer); + procedure Width_R(var T: Integer); + procedure Modified_W(const T: Boolean); + procedure Modified_R(var T: Boolean); + procedure Height_W(const T: Integer); + procedure Height_R(var T: Integer); + procedure Empty_R(var T: Boolean); + end; + +procedure TGraphic_PSHelper.OnChange_W(const T: TNotifyEvent); begin Self.OnChange := T; end; +procedure TGraphic_PSHelper.OnChange_R(var T: TNotifyEvent); begin T := Self.OnChange; end; +procedure TGraphic_PSHelper.Width_W(const T: Integer); begin Self.Width := T; end; +procedure TGraphic_PSHelper.Width_R(var T: Integer); begin T := Self.Width; end; +procedure TGraphic_PSHelper.Modified_W(const T: Boolean); begin Self.Modified := T; end; +procedure TGraphic_PSHelper.Modified_R(var T: Boolean); begin T := Self.Modified; end; +procedure TGraphic_PSHelper.Height_W(const T: Integer); begin Self.Height := T; end; +procedure TGraphic_PSHelper.Height_R(var T: Integer); begin T := Self.Height; end; +procedure TGraphic_PSHelper.Empty_R(var T: Boolean); begin T := Self.Empty; end; + +procedure RIRegisterTGraphic(CL: TPSRuntimeClassImporter); +begin + with CL.Add(TGraphic) do + begin + RegisterVirtualConstructor(@TGraphic.Create, 'Create'); + RegisterVirtualMethod(@TGraphic.LoadFromFile, 'LoadFromFile'); + RegisterVirtualMethod(@TGraphic.SaveToFile, 'SaveToFile'); + RegisterPropertyHelper(@TGraphic.Empty_R,nil,'Empty'); + RegisterPropertyHelper(@TGraphic.Height_R,@TGraphic.Height_W,'Height'); + RegisterPropertyHelper(@TGraphic.Width_R,@TGraphic.Width_W,'Width'); + RegisterPropertyHelper(@TGraphic.OnChange_R,@TGraphic.OnChange_W,'OnChange'); + + {$IFNDEF PS_MINIVCL} + RegisterPropertyHelper(@TGraphic.Modified_R,@TGraphic.Modified_W,'Modified'); + {$ENDIF} + end; +end; + +{$ELSE} procedure TGraphicOnChange_W(Self: TGraphic; const T: TNotifyEvent); begin Self.OnChange := T; end; procedure TGraphicOnChange_R(Self: TGraphic; var T: TNotifyEvent); begin T := Self.OnChange; end; procedure TGraphicWidth_W(Self: TGraphic; const T: Integer); begin Self.Width := T; end; @@ -161,6 +350,88 @@ begin end; end; +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TBitmap'}{$ENDIF} +{$IFDEF class_helper_present} +type + TBitmap_PSHelper = class helper for TBitmap + public + procedure TransparentColor_R(var T: TColor); + {$IFNDEF CLX} + {$IFNDEF FPC} + procedure IgnorePalette_W(const T: Boolean); + procedure IgnorePalette_R(var T: Boolean); + {$ENDIF} + procedure Palette_W(const T: HPALETTE); + procedure Palette_R(var T: HPALETTE); + {$ENDIF} + procedure Monochrome_W(const T: Boolean); + procedure Monochrome_R(var T: Boolean); + {$IFNDEF CLX} + procedure Handle_W(const T: HBITMAP); + procedure Handle_R(var T: HBITMAP); + {$ENDIF} + procedure Canvas_R(var T: TCanvas); + end; + +procedure TBitmap_PSHelper.TransparentColor_R(var T: TColor); begin T := Self.TransparentColor; end; +{$IFNDEF CLX} +{$IFNDEF FPC} +procedure TBitmap_PSHelper.IgnorePalette_W(const T: Boolean); begin Self.IgnorePalette := T; end; +procedure TBitmap_PSHelper.IgnorePalette_R(var T: Boolean); begin T := Self.IgnorePalette; end; +{$ENDIF} +procedure TBitmap_PSHelper.Palette_W(const T: HPALETTE); begin Self.Palette := T; end; +procedure TBitmap_PSHelper.Palette_R(var T: HPALETTE); begin T := Self.Palette; end; +{$ENDIF} +procedure TBitmap_PSHelper.Monochrome_W(const T: Boolean); begin Self.Monochrome := T; end; +procedure TBitmap_PSHelper.Monochrome_R(var T: Boolean); begin T := Self.Monochrome; end; +{$IFNDEF CLX} +procedure TBitmap_PSHelper.Handle_W(const T: HBITMAP); begin Self.Handle := T; end; +procedure TBitmap_PSHelper.Handle_R(var T: HBITMAP); begin T := Self.Handle; end; +{$ENDIF} +procedure TBitmap_PSHelper.Canvas_R(var T: TCanvas); begin T := Self.Canvas; end; + +procedure RIRegisterTBitmap(CL: TPSRuntimeClassImporter; Streams: Boolean); +begin + with CL.Add(TBitmap) do + begin + if Streams then begin + RegisterMethod(@TBitmap.LoadFromStream, 'LoadFromStream'); + RegisterMethod(@TBitmap.SaveToStream, 'SaveToStream'); + end; + RegisterPropertyHelper(@TBitmap.Canvas_R,nil,'Canvas'); +{$IFNDEF CLX} + RegisterPropertyHelper(@TBitmap.Handle_R,@TBitmap.Handle_W,'Handle'); +{$ENDIF} + + {$IFNDEF PS_MINIVCL} +{$IFNDEF FPC} + RegisterMethod(@TBitmap.Dormant, 'Dormant'); +{$ENDIF} + RegisterMethod(@TBitmap.FreeImage, 'FreeImage'); +{$IFNDEF CLX} + RegisterMethod(@TBitmap.LoadFromClipboardFormat, 'LoadFromClipboardFormat'); +{$ENDIF} + RegisterMethod(@TBitmap.LoadFromResourceName, 'LoadFromResourceName'); + RegisterMethod(@TBitmap.LoadFromResourceID, 'LoadFromResourceID'); +{$IFNDEF CLX} + RegisterMethod(@TBitmap.ReleaseHandle, 'ReleaseHandle'); + RegisterMethod(@TBitmap.ReleasePalette, 'ReleasePalette'); + RegisterMethod(@TBitmap.SaveToClipboardFormat, 'SaveToClipboardFormat'); + RegisterPropertyHelper(@TBitmap.Monochrome_R,@TBitmap.Monochrome_W,'Monochrome'); + RegisterPropertyHelper(@TBitmap.Palette_R,@TBitmap.Palette_W,'Palette'); +{$IFNDEF FPC} + RegisterPropertyHelper(@TBitmap.IgnorePalette_R,@TBitmap.IgnorePalette_W,'IgnorePalette'); +{$ENDIF} +{$ENDIF} + RegisterPropertyHelper(@TBitmap.TransparentColor_R,nil,'TransparentColor'); + {$ENDIF} + end; +end; + +{$ELSE} procedure TBitmapTransparentColor_R(Self: TBitmap; var T: TColor); begin T := Self.TransparentColor; end; {$IFNDEF CLX} {$IFNDEF FPC} @@ -216,6 +487,26 @@ begin end; end; +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TPicture'}{$ENDIF} +{$IFDEF class_helper_present} +type + TPicture_PSHelper = class helper for TPicture + public + procedure Bitmap_W(const T: TBitmap); + procedure Bitmap_R(var T: TBitmap); + end; + +procedure TPicture_PSHelper.Bitmap_W(const T: TBitmap); begin Self.Bitmap := T; end; +procedure TPicture_PSHelper.Bitmap_R(var T: TBitmap); begin T := Self.Bitmap; end; +procedure RIRegisterTPicture(CL: TPSRuntimeClassImporter); +begin + with CL.Add(TPicture) do + registerPropertyHelper(@TPicture.Bitmap_R,@TPicture.Bitmap_W,'Bitmap'); +end; +{$ELSE} procedure TPictureBitmap_W(Self: TPicture; const T: TBitmap); begin Self.Bitmap := T; end; procedure TPictureBitmap_R(Self: TPicture; var T: TBitmap); begin T := Self.Bitmap; end; procedure RIRegisterTPicture(CL: TPSRuntimeClassImporter); @@ -223,6 +514,8 @@ begin with CL.Add(TPicture) do registerPropertyHelper(@TPictureBitmap_R,@TPictureBitmap_W,'Bitmap'); end; +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} procedure RIRegister_Graphics(Cl: TPSRuntimeClassImporter; Streams: Boolean); begin diff --git a/Source/uPSR_menus.pas b/Source/uPSR_menus.pas index 632ec9f..823c187 100644 --- a/Source/uPSR_menus.pas +++ b/Source/uPSR_menus.pas @@ -1,4 +1,4 @@ - + Unit uPSR_menus; {$I PascalScript.inc} Interface @@ -28,13 +28,138 @@ Uses Uses {$IFNDEF FPC}WINDOWS,{$ELSE} LCLType,{$ENDIF} SYSUTILS, CLASSES, CONTNRS, MESSAGES, GRAPHICS, IMGLIST, ACTNLIST, Menus; {$ENDIF} +{$IFDEF DELPHI10UP}{$REGION 'TPopupList'}{$ENDIF} +{$IFNDEF FPC} +{$IFDEF class_helper_present} +type + TPopupList_PSHelper = class helper for TPopupList + public + procedure WINDOW_R(var T: HWND); + end; + +procedure TPopupList_PSHelper.WINDOW_R(var T: HWND); +begin T := Self.WINDOW; end; + +procedure RIRegisterTPOPUPLIST(Cl: TPSRuntimeClassImporter); +begin + with Cl.Add(TPOPUPLIST) do + begin + RegisterPropertyHelper(@TPOPUPLIST.WINDOW_R,nil,'Window'); + RegisterMethod(@TPOPUPLIST.ADD, 'Add'); + RegisterMethod(@TPOPUPLIST.REMOVE, 'Remove'); + end; +end; + +{$ELSE} +procedure TPOPUPLISTWINDOW_R(Self: TPopupList; var T: HWND); +begin T := Self.WINDOW; end; + +procedure RIRegisterTPOPUPLIST(Cl: TPSRuntimeClassImporter); +begin + with Cl.Add(TPOPUPLIST) do + begin + RegisterPropertyHelper(@TPOPUPLISTWINDOW_R,nil,'Window'); + RegisterMethod(@TPOPUPLIST.ADD, 'Add'); + RegisterMethod(@TPOPUPLIST.REMOVE, 'Remove'); + end; +end; + +{$ENDIF class_helper_present} +{$ENDIF FPC} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TPopupMenu'}{$ENDIF} +{$IFDEF class_helper_present} +type + TPopupMenu_PSHelper = class helper for TPopupMenu + public + procedure ONPOPUP_W(const T: TNOTIFYEVENT); + procedure ONPOPUP_R(var T: TNOTIFYEVENT); + {$IFNDEF FPC} + procedure TRACKBUTTON_W(const T: TTRACKBUTTON); + procedure TRACKBUTTON_R(var T: TTRACKBUTTON); + procedure MENUANIMATION_W(const T: TMENUANIMATION); + procedure MENUANIMATION_R(var T: TMENUANIMATION); + procedure HELPCONTEXT_W(const T: THELPCONTEXT); + procedure HELPCONTEXT_R(var T: THELPCONTEXT); + {$ENDIF} + procedure AUTOPOPUP_W(const T: BOOLEAN); + procedure AUTOPOPUP_R(var T: BOOLEAN); + {$IFNDEF FPC} + procedure ALIGNMENT_W(const T: TPOPUPALIGNMENT); + procedure ALIGNMENT_R(var T: TPOPUPALIGNMENT); + {$ENDIF} + procedure POPUPCOMPONENT_W(const T: TCOMPONENT); + procedure POPUPCOMPONENT_R(var T: TCOMPONENT); + end; + +procedure TPopupMenu_PSHelper.ONPOPUP_W(const T: TNOTIFYEVENT); +begin Self.ONPOPUP := T; end; + +procedure TPopupMenu_PSHelper.ONPOPUP_R(var T: TNOTIFYEVENT); +begin T := Self.ONPOPUP; end; {$IFNDEF FPC} -procedure TPOPUPLISTWINDOW_R(Self: TPOPUPLIST; var T: HWND); -begin T := Self.WINDOW; end; +procedure TPopupMenu_PSHelper.TRACKBUTTON_W(const T: TTRACKBUTTON); +begin Self.TRACKBUTTON := T; end; + +procedure TPopupMenu_PSHelper.TRACKBUTTON_R(var T: TTRACKBUTTON); +begin T := Self.TRACKBUTTON; end; + + +procedure TPopupMenu_PSHelper.MENUANIMATION_W(const T: TMENUANIMATION); +begin Self.MENUANIMATION := T; end; + +procedure TPopupMenu_PSHelper.MENUANIMATION_R(var T: TMENUANIMATION); +begin T := Self.MENUANIMATION; end; + +procedure TPopupMenu_PSHelper.HELPCONTEXT_W(const T: THELPCONTEXT); +begin Self.HELPCONTEXT := T; end; + +procedure TPopupMenu_PSHelper.HELPCONTEXT_R(var T: THELPCONTEXT); +begin T := Self.HELPCONTEXT; end; {$ENDIF} -procedure TPOPUPMENUONPOPUP_W(Self: TPOPUPMENU; const T: TNOTIFYEVENT); +procedure TPopupMenu_PSHelper.AUTOPOPUP_W(const T: BOOLEAN); +begin Self.AUTOPOPUP := T; end; + +procedure TPopupMenu_PSHelper.AUTOPOPUP_R(var T: BOOLEAN); +begin T := Self.AUTOPOPUP; end; + +{$IFNDEF FPC} +procedure TPopupMenu_PSHelper.ALIGNMENT_W(const T: TPOPUPALIGNMENT); +begin Self.ALIGNMENT := T; end; + +procedure TPopupMenu_PSHelper.ALIGNMENT_R(var T: TPOPUPALIGNMENT); +begin T := Self.ALIGNMENT; end; +{$ENDIF} + +procedure TPopupMenu_PSHelper.POPUPCOMPONENT_W(const T: TCOMPONENT); +begin Self.POPUPCOMPONENT := T; end; + +procedure TPopupMenu_PSHelper.POPUPCOMPONENT_R(var T: TCOMPONENT); +begin T := Self.POPUPCOMPONENT; end; + +procedure RIRegisterTPOPUPMENU(Cl: TPSRuntimeClassImporter); +begin + with Cl.Add(TPopupMenu) do + begin + RegisterConstructor(@TPopupMenu.CREATE, 'Create'); + RegisterVirtualMethod(@TPopupMenu.POPUP, 'Popup'); + RegisterPropertyHelper(@TPopupMenu.POPUPCOMPONENT_R,@TPopupMenu.POPUPCOMPONENT_W,'PopupComponent'); + RegisterEventPropertyHelper(@TPopupMenu.ONPOPUP_R,@TPopupMenu.ONPOPUP_W,'OnPopup'); +{$IFNDEF FPC} + RegisterPropertyHelper(@TPopupMenu.ALIGNMENT_R,@TPopupMenu.ALIGNMENT_W,'Alignment'); + RegisterPropertyHelper(@TPopupMenu.AUTOPOPUP_R,@TPopupMenu.AUTOPOPUP_W,'AutoPopup'); + RegisterPropertyHelper(@TPopupMenu.HELPCONTEXT_R,@TPopupMenu.HELPCONTEXT_W,'HelpContext'); + RegisterPropertyHelper(@TPopupMenu.MENUANIMATION_R,@TPopupMenu.MENUANIMATION_W,'MenuAnimation'); + RegisterPropertyHelper(@TPopupMenu.TRACKBUTTON_R,@TPopupMenu.TRACKBUTTON_W,'TrackButton'); +{$ENDIF} + end; +end; + +{$ELSE} +procedure TPOPUPMENUONPOPUP_W(Self: TPopupMenu; const T: TNOTIFYEVENT); begin Self.ONPOPUP := T; end; procedure TPOPUPMENUONPOPUP_R(Self: TPOPUPMENU; var T: TNOTIFYEVENT); @@ -80,18 +205,189 @@ begin Self.POPUPCOMPONENT := T; end; procedure TPOPUPMENUPOPUPCOMPONENT_R(Self: TPOPUPMENU; var T: TCOMPONENT); begin T := Self.POPUPCOMPONENT; end; +procedure RIRegisterTPOPUPMENU(Cl: TPSRuntimeClassImporter); +begin + with Cl.Add(TPOPUPMENU) do + begin + RegisterConstructor(@TPOPUPMENU.CREATE, 'Create'); + RegisterVirtualMethod(@TPOPUPMENU.POPUP, 'Popup'); + RegisterPropertyHelper(@TPOPUPMENUPOPUPCOMPONENT_R,@TPOPUPMENUPOPUPCOMPONENT_W,'PopupComponent'); + RegisterEventPropertyHelper(@TPOPUPMENUONPOPUP_R,@TPOPUPMENUONPOPUP_W,'OnPopup'); +{$IFNDEF FPC} + RegisterPropertyHelper(@TPOPUPMENUALIGNMENT_R,@TPOPUPMENUALIGNMENT_W,'Alignment'); + RegisterPropertyHelper(@TPOPUPMENUAUTOPOPUP_R,@TPOPUPMENUAUTOPOPUP_W,'AutoPopup'); + RegisterPropertyHelper(@TPOPUPMENUHELPCONTEXT_R,@TPOPUPMENUHELPCONTEXT_W,'HelpContext'); + RegisterPropertyHelper(@TPOPUPMENUMENUANIMATION_R,@TPOPUPMENUMENUANIMATION_W,'MenuAnimation'); + RegisterPropertyHelper(@TPOPUPMENUTRACKBUTTON_R,@TPOPUPMENUTRACKBUTTON_W,'TrackButton'); +{$ENDIF} + end; +end; + +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TMainMenu'}{$ENDIF} +{$IFDEF class_helper_present} +type + TMainMenu_PSHelper = class helper for TMainMenu + public + {$IFNDEF FPC} + procedure AUTOMERGE_W(const T: BOOLEAN); + procedure AUTOMERGE_R(var T: BOOLEAN); + {$ENDIF} + end; {$IFNDEF FPC} -procedure TMAINMENUAUTOMERGE_W(Self: TMAINMENU; const T: BOOLEAN); +procedure TMainMenu_PSHelper.AUTOMERGE_W(const T: BOOLEAN); +begin Self.AUTOMERGE := T; end; + +procedure TMainMenu_PSHelper.AUTOMERGE_R(var T: BOOLEAN); +begin T := Self.AUTOMERGE; end; +{$ENDIF} +procedure RIRegisterTMAINMENU(Cl: TPSRuntimeClassImporter); +begin + with Cl.Add(TMAINMENU) do + begin +{$IFNDEF FPC} + RegisterMethod(@TMAINMENU.MERGE, 'Merge'); + RegisterMethod(@TMAINMENU.UNMERGE, 'Unmerge'); + RegisterMethod(@TMAINMENU.POPULATEOLE2MENU, 'PopulateOle2Menu'); + RegisterMethod(@TMAINMENU.GETOLE2ACCELERATORTABLE, 'GetOle2AcceleratorTable'); + RegisterMethod(@TMAINMENU.SETOLE2MENUHANDLE, 'SetOle2MenuHandle'); + RegisterPropertyHelper(@TMAINMENU.AUTOMERGE_R,@TMAINMENU.AUTOMERGE_W,'AutoMerge'); +{$ENDIF} + end; +end; + +{$ELSE} +{$IFNDEF FPC} +procedure TMAINMENUAUTOMERGE_W(Self: TMainMenu; const T: BOOLEAN); begin Self.AUTOMERGE := T; end; procedure TMAINMENUAUTOMERGE_R(Self: TMAINMENU; var T: BOOLEAN); begin T := Self.AUTOMERGE; end; {$ENDIF} +procedure RIRegisterTMAINMENU(Cl: TPSRuntimeClassImporter); +begin + with Cl.Add(TMAINMENU) do + begin +{$IFNDEF FPC} + RegisterMethod(@TMAINMENU.MERGE, 'Merge'); + RegisterMethod(@TMAINMENU.UNMERGE, 'Unmerge'); + RegisterMethod(@TMAINMENU.POPULATEOLE2MENU, 'PopulateOle2Menu'); + RegisterMethod(@TMAINMENU.GETOLE2ACCELERATORTABLE, 'GetOle2AcceleratorTable'); + RegisterMethod(@TMAINMENU.SETOLE2MENUHANDLE, 'SetOle2MenuHandle'); + RegisterPropertyHelper(@TMAINMENUAUTOMERGE_R,@TMAINMENUAUTOMERGE_W,'AutoMerge'); +{$ENDIF} + end; +end; -procedure TMENUITEMS_R(Self: TMENU; var T: TMENUITEM); +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TMenu'}{$ENDIF} +{$IFDEF class_helper_present} +type + TMenu_PSHelper = class helper for TMenu + public + procedure ITEMS_R(var T: TMENUITEM); + {$IFNDEF FPC} + procedure WINDOWHANDLE_W(const T: HWND); + procedure WINDOWHANDLE_R(var T: HWND); + procedure PARENTBIDIMODE_W(const T: BOOLEAN); + procedure PARENTBIDIMODE_R(var T: BOOLEAN); + procedure OWNERDRAW_W(const T: BOOLEAN); + procedure OWNERDRAW_R(var T: BOOLEAN); + procedure BIDIMODE_W(const T: TBIDIMODE); + procedure BIDIMODE_R(var T: TBIDIMODE); + procedure AUTOLINEREDUCTION_W(const T: TMENUAUTOFLAG); + procedure AUTOLINEREDUCTION_R(var T: TMENUAUTOFLAG); + procedure AUTOHOTKEYS_W(const T: TMENUAUTOFLAG); + procedure AUTOHOTKEYS_R(var T: TMENUAUTOFLAG); + {$ENDIF} + procedure HANDLE_R(var T: HMENU); + procedure IMAGES_W(const T: TCUSTOMIMAGELIST); + procedure IMAGES_R(var T: TCUSTOMIMAGELIST); + end; + +procedure TMenu_PSHelper.ITEMS_R(var T: TMENUITEM); begin T := Self.ITEMS; end; +{$IFNDEF FPC} +procedure TMenu_PSHelper.WINDOWHANDLE_W(const T: HWND); +begin Self.WINDOWHANDLE := T; end; + +procedure TMenu_PSHelper.WINDOWHANDLE_R(var T: HWND); +begin T := Self.WINDOWHANDLE; end; + +procedure TMenu_PSHelper.PARENTBIDIMODE_W(const T: BOOLEAN); +begin Self.PARENTBIDIMODE := T; end; + +procedure TMenu_PSHelper.PARENTBIDIMODE_R(var T: BOOLEAN); +begin T := Self.PARENTBIDIMODE; end; + +procedure TMenu_PSHelper.OWNERDRAW_W(const T: BOOLEAN); +begin Self.OWNERDRAW := T; end; + +procedure TMenu_PSHelper.OWNERDRAW_R(var T: BOOLEAN); +begin T := Self.OWNERDRAW; end; + +procedure TMenu_PSHelper.BIDIMODE_W(const T: TBIDIMODE); +begin Self.BIDIMODE := T; end; + +procedure TMenu_PSHelper.BIDIMODE_R(var T: TBIDIMODE); +begin T := Self.BIDIMODE; end; + +procedure TMenu_PSHelper.AUTOLINEREDUCTION_W(const T: TMENUAUTOFLAG); +begin Self.AUTOLINEREDUCTION := T; end; + +procedure TMenu_PSHelper.AUTOLINEREDUCTION_R(var T: TMENUAUTOFLAG); +begin T := Self.AUTOLINEREDUCTION; end; + +procedure TMenu_PSHelper.AUTOHOTKEYS_W(const T: TMENUAUTOFLAG); +begin Self.AUTOHOTKEYS := T; end; + +procedure TMenu_PSHelper.AUTOHOTKEYS_R(var T: TMENUAUTOFLAG); +begin T := Self.AUTOHOTKEYS; end; +{$ENDIF} + +procedure TMenu_PSHelper.HANDLE_R(var T: HMENU); +begin T := Self.HANDLE; end; + +procedure TMenu_PSHelper.IMAGES_W(const T: TCUSTOMIMAGELIST); +begin Self.IMAGES := T; end; + +procedure TMenu_PSHelper.IMAGES_R(var T: TCUSTOMIMAGELIST); +begin T := Self.IMAGES; end; + +procedure RIRegisterTMENU(Cl: TPSRuntimeClassImporter); +begin + with Cl.Add(TMENU) do + begin + RegisterConstructor(@TMENU.CREATE, 'Create'); + RegisterMethod(@TMENU.DISPATCHCOMMAND, 'DispatchCommand'); + RegisterMethod(@TMENU.FINDITEM, 'FindItem'); + RegisterPropertyHelper(@TMENU.IMAGES_R,@TMENU.IMAGES_W,'Images'); + RegisterMethod(@TMENU.ISRIGHTTOLEFT, 'IsRightToLeft'); + RegisterPropertyHelper(@TMENU.HANDLE_R,nil,'Handle'); + RegisterPropertyHelper(@TMENU.ITEMS_R,nil,'Items'); +{$IFNDEF FPC} + RegisterMethod(@TMENU.DISPATCHPOPUP, 'DispatchPopup'); + RegisterMethod(@TMENU.PARENTBIDIMODECHANGED, 'ParentBiDiModeChanged'); + RegisterMethod(@TMENU.PROCESSMENUCHAR, 'ProcessMenuChar'); + RegisterPropertyHelper(@TMENU.AUTOHOTKEYS_R,@TMENU.AUTOHOTKEYS_W,'AutoHotkeys'); + RegisterPropertyHelper(@TMENU.AUTOLINEREDUCTION_R,@TMENU.AUTOLINEREDUCTION_W,'AutoLineReduction'); + RegisterPropertyHelper(@TMENU.BIDIMODE_R,@TMENU.BIDIMODE_W,'BiDiMode'); + RegisterMethod(@TMENU.GETHELPCONTEXT, 'GetHelpContext'); + RegisterPropertyHelper(@TMENU.OWNERDRAW_R,@TMENU.OWNERDRAW_W,'OwnerDraw'); + RegisterPropertyHelper(@TMENU.PARENTBIDIMODE_R,@TMENU.PARENTBIDIMODE_W,'ParentBiDiMode'); + RegisterPropertyHelper(@TMENU.WINDOWHANDLE_R,@TMENU.WINDOWHANDLE_W,'WindowHandle'); +{$ENDIF} + end; +end; +{$ELSE} +procedure TMENUITEMS_R(Self: TMenu; var T: TMENUITEM); +begin T := Self.ITEMS; end; {$IFNDEF FPC} procedure TMENUWINDOWHANDLE_W(Self: TMENU; const T: HWND); @@ -145,8 +441,298 @@ begin Self.IMAGES := T; end; procedure TMENUIMAGES_R(Self: TMENU; var T: TCUSTOMIMAGELIST); begin T := Self.IMAGES; end; +procedure RIRegisterTMENU(Cl: TPSRuntimeClassImporter); +begin + with Cl.Add(TMENU) do + begin + RegisterConstructor(@TMENU.CREATE, 'Create'); + RegisterMethod(@TMENU.DISPATCHCOMMAND, 'DispatchCommand'); + RegisterMethod(@TMENU.FINDITEM, 'FindItem'); + RegisterPropertyHelper(@TMENUIMAGES_R,@TMENUIMAGES_W,'Images'); + RegisterMethod(@TMENU.ISRIGHTTOLEFT, 'IsRightToLeft'); + RegisterPropertyHelper(@TMENUHANDLE_R,nil,'Handle'); + RegisterPropertyHelper(@TMENUITEMS_R,nil,'Items'); {$IFNDEF FPC} -procedure TMENUITEMONMEASUREITEM_W(Self: TMENUITEM; const T: TMENUMEASUREITEMEVENT); + RegisterMethod(@TMENU.DISPATCHPOPUP, 'DispatchPopup'); + RegisterMethod(@TMENU.PARENTBIDIMODECHANGED, 'ParentBiDiModeChanged'); + RegisterMethod(@TMENU.PROCESSMENUCHAR, 'ProcessMenuChar'); + RegisterPropertyHelper(@TMENUAUTOHOTKEYS_R,@TMENUAUTOHOTKEYS_W,'AutoHotkeys'); + RegisterPropertyHelper(@TMENUAUTOLINEREDUCTION_R,@TMENUAUTOLINEREDUCTION_W,'AutoLineReduction'); + RegisterPropertyHelper(@TMENUBIDIMODE_R,@TMENUBIDIMODE_W,'BiDiMode'); + RegisterMethod(@TMENU.GETHELPCONTEXT, 'GetHelpContext'); + RegisterPropertyHelper(@TMENUOWNERDRAW_R,@TMENUOWNERDRAW_W,'OwnerDraw'); + RegisterPropertyHelper(@TMENUPARENTBIDIMODE_R,@TMENUPARENTBIDIMODE_W,'ParentBiDiMode'); + RegisterPropertyHelper(@TMENUWINDOWHANDLE_R,@TMENUWINDOWHANDLE_W,'WindowHandle'); +{$ENDIF} + end; +end; +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TMenuItem'}{$ENDIF} +{$IFDEF class_helper_present} +type + TMenuItem_PSHelper = class helper for TMenuItem + public + {$IFNDEF FPC} + procedure ONMEASUREITEM_W(const T: TMENUMEASUREITEMEVENT); + procedure ONMEASUREITEM_R(var T: TMENUMEASUREITEMEVENT); + procedure ONADVANCEDDRAWITEM_W(const T: TADVANCEDMENUDRAWITEMEVENT); + procedure ONADVANCEDDRAWITEM_R(var T: TADVANCEDMENUDRAWITEMEVENT); + procedure ONDRAWITEM_W(const T: TMENUDRAWITEMEVENT); + procedure ONDRAWITEM_R(var T: TMENUDRAWITEMEVENT); + {$ENDIF} + procedure ONCLICK_W(const T: TNOTIFYEVENT); + procedure ONCLICK_R(var T: TNOTIFYEVENT); + procedure VISIBLE_W(const T: BOOLEAN); + procedure VISIBLE_R(var T: BOOLEAN); + procedure SHORTCUT_W(const T: TSHORTCUT); + procedure SHORTCUT_R(var T: TSHORTCUT); + procedure RADIOITEM_W(const T: BOOLEAN); + procedure RADIOITEM_R(var T: BOOLEAN); + procedure IMAGEINDEX_W(const T: TIMAGEINDEX); + procedure IMAGEINDEX_R(var T: TIMAGEINDEX); + procedure HINT_W(const T: STRING); + procedure HINT_R(var T: STRING); + procedure HELPCONTEXT_W(const T: THELPCONTEXT); + procedure HELPCONTEXT_R(var T: THELPCONTEXT); + procedure GROUPINDEX_W(const T: BYTE); + procedure GROUPINDEX_R(var T: BYTE); + procedure ENABLED_W(const T: BOOLEAN); + procedure ENABLED_R(var T: BOOLEAN); + procedure DEFAULT_W(const T: BOOLEAN); + procedure DEFAULT_R(var T: BOOLEAN); + procedure SUBMENUIMAGES_W(const T: TCUSTOMIMAGELIST); + procedure SUBMENUIMAGES_R(var T: TCUSTOMIMAGELIST); + procedure CHECKED_W(const T: BOOLEAN); + procedure CHECKED_R(var T: BOOLEAN); + procedure CAPTION_W(const T: STRING); + procedure CAPTION_R(var T: STRING); + procedure BITMAP_W(const T: TBITMAP); + procedure BITMAP_R(var T: TBITMAP); + {$IFNDEF FPC} + procedure AUTOLINEREDUCTION_W(const T: TMENUITEMAUTOFLAG); + procedure AUTOLINEREDUCTION_R(var T: TMENUITEMAUTOFLAG); + procedure AUTOHOTKEYS_W(const T: TMENUITEMAUTOFLAG); + procedure AUTOHOTKEYS_R(var T: TMENUITEMAUTOFLAG); + {$ENDIF} + procedure ACTION_W(const T: TBASICACTION); + procedure ACTION_R(var T: TBASICACTION); + procedure PARENT_R(var T: TMENUITEM); + procedure MENUINDEX_W(const T: INTEGER); + procedure MENUINDEX_R(var T: INTEGER); + procedure ITEMS_R(var T: TMENUITEM; const t1: INTEGER); + procedure COUNT_R(var T: INTEGER); + procedure HANDLE_R(var T: HMENU); + procedure COMMAND_R(var T: WORD); + end; +{$IFNDEF FPC} +procedure TMenuItem_PSHelper.ONMEASUREITEM_W(const T: TMENUMEASUREITEMEVENT); +begin Self.ONMEASUREITEM := T; end; + +procedure TMenuItem_PSHelper.ONMEASUREITEM_R(var T: TMENUMEASUREITEMEVENT); +begin T := Self.ONMEASUREITEM; end; + +procedure TMenuItem_PSHelper.ONADVANCEDDRAWITEM_W(const T: TADVANCEDMENUDRAWITEMEVENT); +begin Self.ONADVANCEDDRAWITEM := T; end; + +procedure TMenuItem_PSHelper.ONADVANCEDDRAWITEM_R(var T: TADVANCEDMENUDRAWITEMEVENT); +begin T := Self.ONADVANCEDDRAWITEM; end; + +procedure TMenuItem_PSHelper.ONDRAWITEM_W(const T: TMENUDRAWITEMEVENT); +begin Self.ONDRAWITEM := T; end; + +procedure TMenuItem_PSHelper.ONDRAWITEM_R(var T: TMENUDRAWITEMEVENT); +begin T := Self.ONDRAWITEM; end; +{$ENDIF} + +procedure TMenuItem_PSHelper.ONCLICK_W(const T: TNOTIFYEVENT); +begin Self.ONCLICK := T; end; + +procedure TMenuItem_PSHelper.ONCLICK_R(var T: TNOTIFYEVENT); +begin T := Self.ONCLICK; end; + +procedure TMenuItem_PSHelper.VISIBLE_W(const T: BOOLEAN); +begin Self.VISIBLE := T; end; + +procedure TMenuItem_PSHelper.VISIBLE_R(var T: BOOLEAN); +begin T := Self.VISIBLE; end; + +procedure TMenuItem_PSHelper.SHORTCUT_W(const T: TSHORTCUT); +begin Self.SHORTCUT := T; end; + +procedure TMenuItem_PSHelper.SHORTCUT_R(var T: TSHORTCUT); +begin T := Self.SHORTCUT; end; + +procedure TMenuItem_PSHelper.RADIOITEM_W(const T: BOOLEAN); +begin Self.RADIOITEM := T; end; + +procedure TMenuItem_PSHelper.RADIOITEM_R(var T: BOOLEAN); +begin T := Self.RADIOITEM; end; + +procedure TMenuItem_PSHelper.IMAGEINDEX_W(const T: TIMAGEINDEX); +begin Self.IMAGEINDEX := T; end; + +procedure TMenuItem_PSHelper.IMAGEINDEX_R(var T: TIMAGEINDEX); +begin T := Self.IMAGEINDEX; end; + +procedure TMenuItem_PSHelper.HINT_W(const T: STRING); +begin Self.HINT := T; end; + +procedure TMenuItem_PSHelper.HINT_R(var T: STRING); +begin T := Self.HINT; end; + +procedure TMenuItem_PSHelper.HELPCONTEXT_W(const T: THELPCONTEXT); +begin Self.HELPCONTEXT := T; end; + +procedure TMenuItem_PSHelper.HELPCONTEXT_R(var T: THELPCONTEXT); +begin T := Self.HELPCONTEXT; end; + +procedure TMenuItem_PSHelper.GROUPINDEX_W(const T: BYTE); +begin Self.GROUPINDEX := T; end; + +procedure TMenuItem_PSHelper.GROUPINDEX_R(var T: BYTE); +begin T := Self.GROUPINDEX; end; + +procedure TMenuItem_PSHelper.ENABLED_W(const T: BOOLEAN); +begin Self.ENABLED := T; end; + +procedure TMenuItem_PSHelper.ENABLED_R(var T: BOOLEAN); +begin T := Self.ENABLED; end; + +procedure TMenuItem_PSHelper.DEFAULT_W(const T: BOOLEAN); +begin Self.DEFAULT := T; end; + +procedure TMenuItem_PSHelper.DEFAULT_R(var T: BOOLEAN); +begin T := Self.DEFAULT; end; + +procedure TMenuItem_PSHelper.SUBMENUIMAGES_W(const T: TCUSTOMIMAGELIST); +begin Self.SUBMENUIMAGES := T; end; + +procedure TMenuItem_PSHelper.SUBMENUIMAGES_R(var T: TCUSTOMIMAGELIST); +begin T := Self.SUBMENUIMAGES; end; + +procedure TMenuItem_PSHelper.CHECKED_W(const T: BOOLEAN); +begin Self.CHECKED := T; end; + +procedure TMenuItem_PSHelper.CHECKED_R(var T: BOOLEAN); +begin T := Self.CHECKED; end; + +procedure TMenuItem_PSHelper.CAPTION_W(const T: STRING); +begin Self.CAPTION := T; end; + +procedure TMenuItem_PSHelper.CAPTION_R(var T: STRING); +begin T := Self.CAPTION; end; + +procedure TMenuItem_PSHelper.BITMAP_W(const T: TBITMAP); +begin Self.BITMAP := T; end; + +procedure TMenuItem_PSHelper.BITMAP_R(var T: TBITMAP); +begin T := Self.BITMAP; end; + +{$IFNDEF FPC} +procedure TMenuItem_PSHelper.AUTOLINEREDUCTION_W(const T: TMENUITEMAUTOFLAG); +begin Self.AUTOLINEREDUCTION := T; end; + +procedure TMenuItem_PSHelper.AUTOLINEREDUCTION_R(var T: TMENUITEMAUTOFLAG); +begin T := Self.AUTOLINEREDUCTION; end; + +procedure TMenuItem_PSHelper.AUTOHOTKEYS_W(const T: TMENUITEMAUTOFLAG); +begin Self.AUTOHOTKEYS := T; end; + +procedure TMenuItem_PSHelper.AUTOHOTKEYS_R(var T: TMENUITEMAUTOFLAG); +begin T := Self.AUTOHOTKEYS; end; +{$ENDIF} + +procedure TMenuItem_PSHelper.ACTION_W(const T: TBASICACTION); +begin Self.ACTION := T; end; + +procedure TMenuItem_PSHelper.ACTION_R(var T: TBASICACTION); +begin T := Self.ACTION; end; + +procedure TMenuItem_PSHelper.PARENT_R(var T: TMENUITEM); +begin T := Self.PARENT; end; + +procedure TMenuItem_PSHelper.MENUINDEX_W(const T: INTEGER); +begin Self.MENUINDEX := T; end; + +procedure TMenuItem_PSHelper.MENUINDEX_R(var T: INTEGER); +begin T := Self.MENUINDEX; end; + +procedure TMenuItem_PSHelper.ITEMS_R(var T: TMENUITEM; const t1: INTEGER); +begin T := Self.ITEMS[t1]; end; + +procedure TMenuItem_PSHelper.COUNT_R(var T: INTEGER); +begin T := Self.COUNT; end; + +procedure TMenuItem_PSHelper.HANDLE_R(var T: HMENU); +begin T := Self.HANDLE; end; + +procedure TMenuItem_PSHelper.COMMAND_R(var T: WORD); +begin T := Self.COMMAND; end; + + +procedure RIRegisterTMENUITEM(Cl: TPSRuntimeClassImporter); +begin + with Cl.Add(TMenuItem) do + begin + RegisterConstructor(@TMenuItem.CREATE, 'Create'); + RegisterVirtualMethod(@TMenuItem.INITIATEACTION, 'InitiateAction'); + RegisterMethod(@TMenuItem.INSERT, 'Insert'); + RegisterMethod(@TMenuItem.DELETE, 'Delete'); + RegisterMethod(@TMenuItem.CLEAR, 'Clear'); + RegisterVirtualMethod(@TMenuItem.CLICK, 'Click'); +{$IFNDEF FPC} + RegisterMethod(@TMenuItem.FIND, 'Find'); + RegisterMethod(@TMenuItem.NEWTOPLINE, 'NewTopLine'); + RegisterMethod(@TMenuItem.NEWBOTTOMLINE, 'NewBottomLine'); + RegisterMethod(@TMenuItem.INSERTNEWLINEBEFORE, 'InsertNewLineBefore'); + RegisterMethod(@TMenuItem.INSERTNEWLINEAFTER, 'InsertNewLineAfter'); + RegisterMethod(@TMenuItem.RETHINKHOTKEYS, 'RethinkHotkeys'); + RegisterMethod(@TMenuItem.RETHINKLINES, 'RethinkLines'); + RegisterMethod(@TMenuItem.ISLINE, 'IsLine'); +{$ENDIF} + RegisterMethod(@TMenuItem.INDEXOF, 'IndexOf'); + RegisterMethod(@TMenuItem.GETIMAGELIST, 'GetImageList'); + RegisterMethod(@TMenuItem.GETPARENTCOMPONENT, 'GetParentComponent'); + RegisterMethod(@TMenuItem.GETPARENTMENU, 'GetParentMenu'); + RegisterMethod(@TMenuItem.HASPARENT, 'HasParent'); + RegisterMethod(@TMenuItem.ADD, 'Add'); + RegisterMethod(@TMenuItem.REMOVE, 'Remove'); +{$IFNDEF FPC} + RegisterPropertyHelper(@TMenuItem.AUTOHOTKEYS_R,@TMenuItem.AUTOHOTKEYS_W,'AutoHotkeys'); + RegisterPropertyHelper(@TMenuItem.AUTOLINEREDUCTION_R,@TMenuItem.AUTOLINEREDUCTION_W,'AutoLineReduction'); + RegisterEventPropertyHelper(@TMenuItem.ONDRAWITEM_R,@TMenuItem.ONDRAWITEM_W,'OnDrawItem'); + RegisterEventPropertyHelper(@TMenuItem.ONADVANCEDDRAWITEM_R,@TMenuItem.ONADVANCEDDRAWITEM_W,'OnAdvancedDrawItem'); + RegisterEventPropertyHelper(@TMenuItem.ONMEASUREITEM_R,@TMenuItem.ONMEASUREITEM_W,'OnMeasureItem'); +{$ENDIF} + RegisterPropertyHelper(@TMenuItem.COMMAND_R,nil,'Command'); + RegisterPropertyHelper(@TMenuItem.HANDLE_R,nil,'Handle'); + RegisterPropertyHelper(@TMenuItem.COUNT_R,nil,'Count'); + RegisterPropertyHelper(@TMenuItem.ITEMS_R,nil,'Items'); + RegisterPropertyHelper(@TMenuItem.MENUINDEX_R,@TMenuItem.MENUINDEX_W,'MenuIndex'); + RegisterPropertyHelper(@TMenuItem.PARENT_R,nil,'Parent'); + RegisterPropertyHelper(@TMenuItem.ACTION_R,@TMenuItem.ACTION_W,'Action'); + RegisterPropertyHelper(@TMenuItem.BITMAP_R,@TMenuItem.BITMAP_W,'Bitmap'); + RegisterPropertyHelper(@TMenuItem.CAPTION_R,@TMenuItem.CAPTION_W,'Caption'); + RegisterPropertyHelper(@TMenuItem.CHECKED_R,@TMenuItem.CHECKED_W,'Checked'); + RegisterPropertyHelper(@TMenuItem.SUBMENUIMAGES_R,@TMenuItem.SUBMENUIMAGES_W,'SubMenuImages'); + RegisterPropertyHelper(@TMenuItem.DEFAULT_R,@TMenuItem.DEFAULT_W,'Default'); + RegisterPropertyHelper(@TMenuItem.ENABLED_R,@TMenuItem.ENABLED_W,'Enabled'); + RegisterPropertyHelper(@TMenuItem.GROUPINDEX_R,@TMenuItem.GROUPINDEX_W,'GroupIndex'); + RegisterPropertyHelper(@TMenuItem.HELPCONTEXT_R,@TMenuItem.HELPCONTEXT_W,'HelpContext'); + RegisterPropertyHelper(@TMenuItem.HINT_R,@TMenuItem.HINT_W,'Hint'); + RegisterPropertyHelper(@TMenuItem.IMAGEINDEX_R,@TMenuItem.IMAGEINDEX_W,'ImageIndex'); + RegisterPropertyHelper(@TMenuItem.RADIOITEM_R,@TMenuItem.RADIOITEM_W,'RadioItem'); + RegisterPropertyHelper(@TMenuItem.SHORTCUT_R,@TMenuItem.SHORTCUT_W,'ShortCut'); + RegisterPropertyHelper(@TMenuItem.VISIBLE_R,@TMenuItem.VISIBLE_W,'Visible'); + RegisterEventPropertyHelper(@TMenuItem.ONCLICK_R,@TMenuItem.ONCLICK_W,'OnClick'); + end; +end; + +{$ELSE} +{$IFNDEF FPC} +procedure TMENUITEMONMEASUREITEM_W(Self: TMenuItem; const T: TMENUMEASUREITEMEVENT); begin Self.ONMEASUREITEM := T; end; procedure TMENUITEMONMEASUREITEM_R(Self: TMENUITEM; var T: TMENUMEASUREITEMEVENT); @@ -290,102 +876,6 @@ begin T := Self.HANDLE; end; procedure TMENUITEMCOMMAND_R(Self: TMENUITEM; var T: WORD); begin T := Self.COMMAND; end; -procedure RIRegister_Menus_Routines(S: TPSExec); -begin - S.RegisterDelphiFunction(@SHORTCUT, 'ShortCut', cdRegister); - S.RegisterDelphiFunction(@SHORTCUTTOKEY, 'ShortCutToKey', cdRegister); -{$IFNDEF FPC} - S.RegisterDelphiFunction(@SHORTCUTTOTEXT, 'ShortCutToText', cdRegister); - S.RegisterDelphiFunction(@TEXTTOSHORTCUT, 'TextToShortCut', cdRegister); - S.RegisterDelphiFunction(@NEWMENU, 'NewMenu', cdRegister); - S.RegisterDelphiFunction(@NEWPOPUPMENU, 'NewPopupMenu', cdRegister); - S.RegisterDelphiFunction(@NEWSUBMENU, 'NewSubMenu', cdRegister); - S.RegisterDelphiFunction(@NEWITEM, 'NewItem', cdRegister); - S.RegisterDelphiFunction(@NEWLINE, 'NewLine', cdRegister); - S.RegisterDelphiFunction(@DRAWMENUITEM, 'DrawMenuItem', cdRegister); -{$ENDIF} -end; - -{$IFNDEF FPC} -procedure RIRegisterTMENUITEMSTACK(Cl: TPSRuntimeClassImporter); -begin - with Cl.Add(TMENUITEMSTACK) do - begin - RegisterMethod(@TMENUITEMSTACK.CLEARITEM, 'ClearItem'); - end; -end; - -procedure RIRegisterTPOPUPLIST(Cl: TPSRuntimeClassImporter); -begin - with Cl.Add(TPOPUPLIST) do - begin - RegisterPropertyHelper(@TPOPUPLISTWINDOW_R,nil,'Window'); - RegisterMethod(@TPOPUPLIST.ADD, 'Add'); - RegisterMethod(@TPOPUPLIST.REMOVE, 'Remove'); - end; -end; -{$ENDIF} - - -procedure RIRegisterTPOPUPMENU(Cl: TPSRuntimeClassImporter); -begin - with Cl.Add(TPOPUPMENU) do - begin - RegisterConstructor(@TPOPUPMENU.CREATE, 'Create'); - RegisterVirtualMethod(@TPOPUPMENU.POPUP, 'Popup'); - RegisterPropertyHelper(@TPOPUPMENUPOPUPCOMPONENT_R,@TPOPUPMENUPOPUPCOMPONENT_W,'PopupComponent'); - RegisterEventPropertyHelper(@TPOPUPMENUONPOPUP_R,@TPOPUPMENUONPOPUP_W,'OnPopup'); -{$IFNDEF FPC} - RegisterPropertyHelper(@TPOPUPMENUALIGNMENT_R,@TPOPUPMENUALIGNMENT_W,'Alignment'); - RegisterPropertyHelper(@TPOPUPMENUAUTOPOPUP_R,@TPOPUPMENUAUTOPOPUP_W,'AutoPopup'); - RegisterPropertyHelper(@TPOPUPMENUHELPCONTEXT_R,@TPOPUPMENUHELPCONTEXT_W,'HelpContext'); - RegisterPropertyHelper(@TPOPUPMENUMENUANIMATION_R,@TPOPUPMENUMENUANIMATION_W,'MenuAnimation'); - RegisterPropertyHelper(@TPOPUPMENUTRACKBUTTON_R,@TPOPUPMENUTRACKBUTTON_W,'TrackButton'); -{$ENDIF} - end; -end; - -procedure RIRegisterTMAINMENU(Cl: TPSRuntimeClassImporter); -begin - with Cl.Add(TMAINMENU) do - begin -{$IFNDEF FPC} - RegisterMethod(@TMAINMENU.MERGE, 'Merge'); - RegisterMethod(@TMAINMENU.UNMERGE, 'Unmerge'); - RegisterMethod(@TMAINMENU.POPULATEOLE2MENU, 'PopulateOle2Menu'); - RegisterMethod(@TMAINMENU.GETOLE2ACCELERATORTABLE, 'GetOle2AcceleratorTable'); - RegisterMethod(@TMAINMENU.SETOLE2MENUHANDLE, 'SetOle2MenuHandle'); - RegisterPropertyHelper(@TMAINMENUAUTOMERGE_R,@TMAINMENUAUTOMERGE_W,'AutoMerge'); -{$ENDIF} - end; -end; - - -procedure RIRegisterTMENU(Cl: TPSRuntimeClassImporter); -begin - with Cl.Add(TMENU) do - begin - RegisterConstructor(@TMENU.CREATE, 'Create'); - RegisterMethod(@TMENU.DISPATCHCOMMAND, 'DispatchCommand'); - RegisterMethod(@TMENU.FINDITEM, 'FindItem'); - RegisterPropertyHelper(@TMENUIMAGES_R,@TMENUIMAGES_W,'Images'); - RegisterMethod(@TMENU.ISRIGHTTOLEFT, 'IsRightToLeft'); - RegisterPropertyHelper(@TMENUHANDLE_R,nil,'Handle'); - RegisterPropertyHelper(@TMENUITEMS_R,nil,'Items'); -{$IFNDEF FPC} - RegisterMethod(@TMENU.DISPATCHPOPUP, 'DispatchPopup'); - RegisterMethod(@TMENU.PARENTBIDIMODECHANGED, 'ParentBiDiModeChanged'); - RegisterMethod(@TMENU.PROCESSMENUCHAR, 'ProcessMenuChar'); - RegisterPropertyHelper(@TMENUAUTOHOTKEYS_R,@TMENUAUTOHOTKEYS_W,'AutoHotkeys'); - RegisterPropertyHelper(@TMENUAUTOLINEREDUCTION_R,@TMENUAUTOLINEREDUCTION_W,'AutoLineReduction'); - RegisterPropertyHelper(@TMENUBIDIMODE_R,@TMENUBIDIMODE_W,'BiDiMode'); - RegisterMethod(@TMENU.GETHELPCONTEXT, 'GetHelpContext'); - RegisterPropertyHelper(@TMENUOWNERDRAW_R,@TMENUOWNERDRAW_W,'OwnerDraw'); - RegisterPropertyHelper(@TMENUPARENTBIDIMODE_R,@TMENUPARENTBIDIMODE_W,'ParentBiDiMode'); - RegisterPropertyHelper(@TMENUWINDOWHANDLE_R,@TMENUWINDOWHANDLE_W,'WindowHandle'); -{$ENDIF} - end; -end; procedure RIRegisterTMENUITEM(Cl: TPSRuntimeClassImporter); begin @@ -445,6 +935,37 @@ begin end; end; +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +procedure RIRegister_Menus_Routines(S: TPSExec); +begin + S.RegisterDelphiFunction(@SHORTCUT, 'ShortCut', cdRegister); + S.RegisterDelphiFunction(@SHORTCUTTOKEY, 'ShortCutToKey', cdRegister); +{$IFNDEF FPC} + S.RegisterDelphiFunction(@SHORTCUTTOTEXT, 'ShortCutToText', cdRegister); + S.RegisterDelphiFunction(@TEXTTOSHORTCUT, 'TextToShortCut', cdRegister); + S.RegisterDelphiFunction(@NEWMENU, 'NewMenu', cdRegister); + S.RegisterDelphiFunction(@NEWPOPUPMENU, 'NewPopupMenu', cdRegister); + S.RegisterDelphiFunction(@NEWSUBMENU, 'NewSubMenu', cdRegister); + S.RegisterDelphiFunction(@NEWITEM, 'NewItem', cdRegister); + S.RegisterDelphiFunction(@NEWLINE, 'NewLine', cdRegister); + S.RegisterDelphiFunction(@DRAWMENUITEM, 'DrawMenuItem', cdRegister); +{$ENDIF} +end; + +{$IFDEF DELPHI10UP}{$REGION 'TMenuItemStack'}{$ENDIF} +{$IFNDEF FPC} +procedure RIRegisterTMENUITEMSTACK(Cl: TPSRuntimeClassImporter); +begin + with Cl.Add(TMenuItemStack) do + begin + RegisterMethod(@TMENUITEMSTACK.CLEARITEM, 'ClearItem'); + end; +end; +{$ENDIF} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + procedure RIRegister_Menus(CL: TPSRuntimeClassImporter); begin RIRegisterTMENUITEM(Cl); diff --git a/Source/uPSR_std.pas b/Source/uPSR_std.pas index e256e21..746d225 100644 --- a/Source/uPSR_std.pas +++ b/Source/uPSR_std.pas @@ -15,9 +15,8 @@ implementation uses Classes; - - -procedure RIRegisterTObject(CL: TPSRuntimeClassImporter); +{$IFDEF DELPHI10UP}{$REGION 'TObject'}{$ENDIF} +procedure RIRegisterTObject(CL: TPSRuntimeClassImporter); begin with cl.Add(TObject) do begin @@ -25,7 +24,9 @@ begin RegisterMethod(@TObject.Free, 'Free'); end; end; +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} +{$IFDEF DELPHI10UP}{$REGION 'TPersistent'}{$ENDIF} procedure RIRegisterTPersistent(Cl: TPSRuntimeClassImporter); begin with Cl.Add(TPersistent) do @@ -33,10 +34,52 @@ begin RegisterVirtualMethod(@TPersistent.Assign, 'Assign'); end; end; +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} +{$IFDEF DELPHI10UP}{$REGION 'TComponent'}{$ENDIF} +{$IFDEF class_helper_present} +type + TComponent_PSHelper = class helper for TComponent + public + procedure OwnerR(var T: TComponent); + procedure COMPONENTS_R(var T: TCOMPONENT; t1: INTEGER); + procedure COMPONENTCOUNT_R(var T: INTEGER); + procedure COMPONENTINDEX_R(var T: INTEGER); + procedure COMPONENTINDEX_W(T: INTEGER); + procedure COMPONENTSTATE_R(var T: TCOMPONENTSTATE); + procedure DESIGNINFO_R(var T: LONGINT); + procedure DESIGNINFO_W(T: LONGINT); + end; + +procedure TComponent_PSHelper.OwnerR(var T: TComponent); begin T := Self.Owner; end; +procedure TComponent_PSHelper.COMPONENTS_R(var T: TCOMPONENT; t1: INTEGER); begin T := Self.COMPONENTS[t1]; end; +procedure TComponent_PSHelper.COMPONENTCOUNT_R(var T: INTEGER); begin t := Self.COMPONENTCOUNT; end; +procedure TComponent_PSHelper.COMPONENTINDEX_R(var T: INTEGER); begin t := Self.COMPONENTINDEX; end; +procedure TComponent_PSHelper.COMPONENTINDEX_W(T: INTEGER); begin Self.COMPONENTINDEX := t; end; +procedure TComponent_PSHelper.COMPONENTSTATE_R(var T: TCOMPONENTSTATE); begin t := Self.COMPONENTSTATE; end; +procedure TComponent_PSHelper.DESIGNINFO_R(var T: LONGINT); begin t := Self.DESIGNINFO; end; +procedure TComponent_PSHelper.DESIGNINFO_W(T: LONGINT); begin Self.DESIGNINFO := t; end; + + +procedure RIRegisterTComponent(Cl: TPSRuntimeClassImporter); +begin + with Cl.Add(TComponent) do + begin + RegisterMethod(@TComponent.FindComponent, 'FindComponent'); + RegisterVirtualConstructor(@TComponent.Create, 'Create'); + RegisterPropertyHelper(@TComponent.OwnerR, nil, 'Owner'); + + RegisterMethod(@TComponent.DESTROYCOMPONENTS, 'DestroyComponents'); + RegisterPropertyHelper(@TComponent.COMPONENTS_R, nil, 'Components'); + RegisterPropertyHelper(@TComponent.COMPONENTCOUNT_R, nil, 'ComponentCount'); + RegisterPropertyHelper(@TComponent.COMPONENTINDEX_R, @TComponent.COMPONENTINDEX_W, 'ComponentIndex'); + RegisterPropertyHelper(@TComponent.COMPONENTSTATE_R, nil, 'ComponentState'); + RegisterPropertyHelper(@TComponent.DESIGNINFO_R, @TComponent.DESIGNINFO_W, 'DesignInfo'); + end; +end; + +{$ELSE} procedure TComponentOwnerR(Self: TComponent; var T: TComponent); begin T := Self.Owner; end; - - procedure TCOMPONENTCOMPONENTS_R(Self: TCOMPONENT; var T: TCOMPONENT; t1: INTEGER); begin T := Self.COMPONENTS[t1]; end; procedure TCOMPONENTCOMPONENTCOUNT_R(Self: TCOMPONENT; var T: INTEGER); begin t := Self.COMPONENTCOUNT; end; procedure TCOMPONENTCOMPONENTINDEX_R(Self: TCOMPONENT; var T: INTEGER); begin t := Self.COMPONENTINDEX; end; @@ -63,12 +106,8 @@ begin end; end; - - - - - - +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} procedure RIRegister_Std(Cl: TPSRuntimeClassImporter); begin RIRegisterTObject(CL); diff --git a/Source/uPSR_stdctrls.pas b/Source/uPSR_stdctrls.pas index 32ec626..4add086 100644 --- a/Source/uPSR_stdctrls.pas +++ b/Source/uPSR_stdctrls.pas @@ -32,16 +32,45 @@ implementation uses sysutils, classes{$IFDEF CLX}, QControls, QStdCtrls, QGraphics{$ELSE}, controls, stdctrls, Graphics{$ENDIF}{$IFDEF FPC},buttons{$ENDIF}; +{$IFDEF DELPHI10UP}{$REGION 'TCustomGroupBox'}{$ENDIF} procedure RIRegisterTCUSTOMGROUPBOX(Cl: TPSRuntimeClassImporter); begin - Cl.Add(TCUSTOMGROUPBOX); + Cl.Add(TCustomGroupBox); end; +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} - +{$IFDEF DELPHI10UP}{$REGION 'MyRegion'}{$ENDIF} procedure RIRegisterTGROUPBOX(Cl: TPSRuntimeClassImporter); begin - Cl.Add(TGROUPBOX); + Cl.Add(TGroupBox); end; +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TCustomLabel'}{$ENDIF} +{$IFDEF class_helper_present} +{$IFNDEF PS_MINIVCL}{$IFNDEF CLX} +type + TCustomLabel_PSHelper = class helper for TCustomLabel + public + procedure CANVAS_R(var T: TCanvas); + end; + +procedure TCustomLabel_PSHelper.CANVAS_R(var T: TCanvas); begin T := Self.CANVAS; end; +{$ENDIF}{$ENDIF} + +procedure RIRegisterTCUSTOMLABEL(Cl: TPSRuntimeClassImporter); +begin + with Cl.Add(TCustomLabel) do + begin + {$IFNDEF PS_MINIVCL} + {$IFNDEF CLX} + RegisterPropertyHelper(@TCustomLabel.CANVAS_R, nil, 'Canvas'); + {$ENDIF} + {$ENDIF} + end; +end; + +{$ELSE} {$IFNDEF CLX} procedure TCUSTOMLABELCANVAS_R(Self: TCUSTOMLABEL; var T: TCanvas); begin T := Self.CANVAS; end; {$ENDIF} @@ -58,11 +87,72 @@ begin end; end; +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TLabel'}{$ENDIF} procedure RIRegisterTLABEL(Cl: TPSRuntimeClassImporter); begin - Cl.Add(TLABEL); + Cl.Add(TLabel); end; -procedure TCUSTOMEDITMODIFIED_R(Self: TCUSTOMEDIT; var T: BOOLEAN); begin T := Self.MODIFIED; end; +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TCustomEdit'}{$ENDIF} +{$IFDEF class_helper_present} +type + TCustomEdit_PSHelper = class helper for TCustomEdit + public + procedure MODIFIED_R(var T: BOOLEAN); + procedure MODIFIED_W(T: BOOLEAN); + procedure SELLENGTH_R(var T: INTEGER); + procedure SELLENGTH_W(T: INTEGER); + procedure SELSTART_R(var T: INTEGER); + procedure SELSTART_W(T: INTEGER); + procedure SELTEXT_R(var T: STRING); + procedure SELTEXT_W(T: STRING); + procedure TEXT_R(var T: string); + procedure TEXT_W(T: string); + end; + +procedure TCustomEdit_PSHelper.MODIFIED_R(var T: BOOLEAN); begin T := Self.MODIFIED; end; +procedure TCustomEdit_PSHelper.MODIFIED_W(T: BOOLEAN); begin Self.MODIFIED := T; end; +procedure TCustomEdit_PSHelper.SELLENGTH_R(var T: INTEGER); begin T := Self.SELLENGTH; end; +procedure TCustomEdit_PSHelper.SELLENGTH_W(T: INTEGER); begin Self.SELLENGTH := T; end; +procedure TCustomEdit_PSHelper.SELSTART_R(var T: INTEGER); begin T := Self.SELSTART; end; +procedure TCustomEdit_PSHelper.SELSTART_W(T: INTEGER); begin Self.SELSTART := T; end; +procedure TCustomEdit_PSHelper.SELTEXT_R(var T: STRING); begin T := Self.SELTEXT; end; +procedure TCustomEdit_PSHelper.SELTEXT_W(T: STRING); begin Self.SELTEXT := T; end; +procedure TCustomEdit_PSHelper.TEXT_R(var T: string); begin T := Self.TEXT; end; +procedure TCustomEdit_PSHelper.TEXT_W(T: string); begin Self.TEXT := T; end; + + +procedure RIRegisterTCUSTOMEDIT(Cl: TPSRuntimeClassImporter); +begin + with Cl.Add(TCustomEdit) do + begin + RegisterMethod(@TCustomEdit.CLEAR, 'Clear'); + RegisterMethod(@TCustomEdit.CLEARSELECTION, 'ClearSelection'); + RegisterMethod(@TCustomEdit.SELECTALL, 'SelectAll'); + RegisterPropertyHelper(@TCustomEdit.MODIFIED_R, @TCustomEdit.MODIFIED_W, 'Modified'); + RegisterPropertyHelper(@TCustomEdit.SELLENGTH_R, @TCustomEdit.SELLENGTH_W, 'SelLength'); + RegisterPropertyHelper(@TCustomEdit.SELSTART_R, @TCustomEdit.SELSTART_W, 'SelStart'); + RegisterPropertyHelper(@TCustomEdit.SELTEXT_R, @TCustomEdit.SELTEXT_W, 'SelText'); + RegisterPropertyHelper(@TCustomEdit.TEXT_R, @TCustomEdit.TEXT_W, 'Text'); + + {$IFNDEF PS_MINIVCL} + RegisterMethod(@TCustomEdit.COPYTOCLIPBOARD, 'CopyToClipboard'); + RegisterMethod(@TCustomEdit.CUTTOCLIPBOARD, 'CutToClipboard'); + RegisterMethod(@TCustomEdit.PASTEFROMCLIPBOARD, 'PasteFromClipboard'); + {$IFNDEF FPC} + RegisterMethod(@TCustomEdit.GETSELTEXTBUF, 'GetSelTextBuf'); + RegisterMethod(@TCustomEdit.SETSELTEXTBUF, 'SetSelTextBuf'); + {$ENDIF}{FPC} + {$ENDIF} + end; +end; + +{$ELSE} +procedure TCUSTOMEDITMODIFIED_R(Self: TCustomEdit; var T: BOOLEAN); begin T := Self.MODIFIED; end; procedure TCUSTOMEDITMODIFIED_W(Self: TCUSTOMEDIT; T: BOOLEAN); begin Self.MODIFIED := T; end; procedure TCUSTOMEDITSELLENGTH_R(Self: TCUSTOMEDIT; var T: INTEGER); begin T := Self.SELLENGTH; end; procedure TCUSTOMEDITSELLENGTH_W(Self: TCUSTOMEDIT; T: INTEGER); begin Self.SELLENGTH := T; end; @@ -99,19 +189,49 @@ begin end; end; +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TEdit'}{$ENDIF} procedure RIRegisterTEDIT(Cl: TPSRuntimeClassImporter); begin - Cl.Add(TEDIT); + Cl.Add(TEdit); +end; +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TCustomMemo/TMemo'}{$ENDIF} +{$IFDEF class_helper_present} +type + TCustomMemo_PSHelper = class helper for TCustomMemo + public + procedure LINES_R(var T: TSTRINGS); + procedure LINES_W(T: TSTRINGS); + end; + +procedure TCustomMemo_PSHelper.LINES_R(var T: TSTRINGS); begin T := Self.LINES; end; +procedure TCustomMemo_PSHelper.LINES_W(T: TSTRINGS); begin Self.LINES := T; end; + +procedure RIRegisterTCUSTOMMEMO(Cl: TPSRuntimeClassImporter); +begin + with Cl.Add(TCustomMemo) do + begin + RegisterPropertyHelper(@TCustomMemo.LINES_R, @TCustomMemo.LINES_W, 'Lines'); + end; end; +procedure RIRegisterTMEMO(Cl: TPSRuntimeClassImporter); +begin + Cl.Add(TMEMO); +end; +{$ELSE} procedure TCUSTOMMEMOLINES_R(Self: {$IFDEF CLX}TMemo{$ELSE}TCUSTOMMEMO{$ENDIF}; var T: TSTRINGS); begin T := Self.LINES; end; procedure TCUSTOMMEMOLINES_W(Self: {$IFDEF CLX}TMemo{$ELSE}TCUSTOMMEMO{$ENDIF}; T: TSTRINGS); begin Self.LINES := T; end; procedure RIRegisterTCUSTOMMEMO(Cl: TPSRuntimeClassImporter); begin - with Cl.Add(TCUSTOMMEMO) do + with Cl.Add(TCustomMemo) do begin {$IFNDEF CLX} RegisterPropertyHelper(@TCUSTOMMEMOLINES_R, @TCUSTOMMEMOLINES_W, 'Lines'); @@ -119,7 +239,6 @@ begin end; end; - procedure RIRegisterTMEMO(Cl: TPSRuntimeClassImporter); begin with Cl.Add(TMEMO) do @@ -129,9 +248,65 @@ begin {$ENDIF} end; end; +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + +{$IFDEF DELPHI10UP}{$REGION 'TCustomComboBox'}{$ENDIF} +{$IFDEF class_helper_present} +type + TCustomComboBox_PSHelper = class helper for TCustomComboBox + public + procedure CANVAS_R(var T: TCANVAS); + procedure DROPPEDDOWN_R(var T: BOOLEAN); + procedure DROPPEDDOWN_W(T: BOOLEAN); + procedure ITEMS_R(var T: TSTRINGS); + procedure ITEMS_W(T: TSTRINGS); + procedure ITEMINDEX_R(var T: INTEGER); + procedure ITEMINDEX_W(T: INTEGER); + procedure SELLENGTH_R(var T: INTEGER); + procedure SELLENGTH_W(T: INTEGER); + procedure SELSTART_R(var T: INTEGER); + procedure SELSTART_W(T: INTEGER); + procedure SELTEXT_R(var T: STRING); + procedure SELTEXT_W(T: STRING); + end; + +procedure TCustomComboBox_PSHelper.CANVAS_R(var T: TCANVAS); begin T := Self.CANVAS; end; +procedure TCustomComboBox_PSHelper.DROPPEDDOWN_R(var T: BOOLEAN); begin T := Self.DROPPEDDOWN; end; +procedure TCustomComboBox_PSHelper.DROPPEDDOWN_W(T: BOOLEAN); begin Self.DROPPEDDOWN := T; end; +procedure TCustomComboBox_PSHelper.ITEMS_R(var T: TSTRINGS); begin T := Self.ITEMS; end; +procedure TCustomComboBox_PSHelper.ITEMS_W(T: TSTRINGS); begin Self.ITEMS := T; end; +procedure TCustomComboBox_PSHelper.ITEMINDEX_R(var T: INTEGER); begin T := Self.ITEMINDEX; end; +procedure TCustomComboBox_PSHelper.ITEMINDEX_W(T: INTEGER); begin Self.ITEMINDEX := T; end; +procedure TCustomComboBox_PSHelper.SELLENGTH_R(var T: INTEGER); begin T := Self.SELLENGTH; end; +procedure TCustomComboBox_PSHelper.SELLENGTH_W(T: INTEGER); begin Self.SELLENGTH := T; end; +procedure TCustomComboBox_PSHelper.SELSTART_R(var T: INTEGER); begin T := Self.SELSTART; end; +procedure TCustomComboBox_PSHelper.SELSTART_W(T: INTEGER); begin Self.SELSTART := T; end; +procedure TCustomComboBox_PSHelper.SELTEXT_R(var T: STRING); begin T := Self.SELTEXT; end; +procedure TCustomComboBox_PSHelper.SELTEXT_W(T: STRING); begin Self.SELTEXT := T; end; -procedure TCUSTOMCOMBOBOXCANVAS_R(Self: TCUSTOMCOMBOBOX; var T: TCANVAS); begin T := Self.CANVAS; end; +procedure RIRegisterTCUSTOMCOMBOBOX(Cl: TPSRuntimeClassImporter); +begin + with Cl.Add(TCustomComboBox) do + begin + RegisterPropertyHelper(@TCustomComboBox.DROPPEDDOWN_R, @TCustomComboBox.DROPPEDDOWN_W, 'DroppedDown'); + RegisterPropertyHelper(@TCustomComboBox.ITEMS_R, @TCustomComboBox.ITEMS_W, 'Items'); + RegisterPropertyHelper(@TCustomComboBox.ITEMINDEX_R, @TCustomComboBox.ITEMINDEX_W, 'ItemIndex'); + + {$IFNDEF PS_MINIVCL} + RegisterMethod(@TCustomComboBox.CLEAR, 'Clear'); + RegisterMethod(@TCustomComboBox.SELECTALL, 'SelectAll'); + RegisterPropertyHelper(@TCustomComboBox.CANVAS_R, nil, 'Canvas'); + RegisterPropertyHelper(@TCustomComboBox.SELLENGTH_R, @TCustomComboBox.SELLENGTH_W, 'SelLength'); + RegisterPropertyHelper(@TCustomComboBox.SELSTART_R, @TCustomComboBox.SELSTART_W, 'SelStart'); + RegisterPropertyHelper(@TCustomComboBox.SELTEXT_R, @TCustomComboBox.SELTEXT_W, 'SelText'); + {$ENDIF} + end; +end; +{$ELSE} + +procedure TCUSTOMCOMBOBOXCANVAS_R(Self: TCustomComboBox; var T: TCANVAS); begin T := Self.CANVAS; end; procedure TCUSTOMCOMBOBOXDROPPEDDOWN_R(Self: TCUSTOMCOMBOBOX; var T: BOOLEAN); begin T := Self.DROPPEDDOWN; end; procedure TCUSTOMCOMBOBOXDROPPEDDOWN_W(Self: TCUSTOMCOMBOBOX; T: BOOLEAN); begin Self.DROPPEDDOWN := T; end; procedure TCUSTOMCOMBOBOXITEMS_R(Self: TCUSTOMCOMBOBOX; var T: TSTRINGS); begin T := Self.ITEMS; end; @@ -164,50 +339,101 @@ begin {$ENDIF} end; end; +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} - - - +{$IFDEF DELPHI10UP}{$REGION 'TComboBox'}{$ENDIF} procedure RIRegisterTCOMBOBOX(Cl: TPSRuntimeClassImporter); begin - Cl.Add(TCOMBOBOX); + Cl.Add(TComboBox); end; +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} - - +{$IFDEF DELPHI10UP}{$REGION 'TButtonControl'}{$ENDIF} procedure RIRegisterTBUTTONCONTROL(Cl: TPSRuntimeClassImporter); begin - Cl.Add(TBUTTONCONTROL); + Cl.Add(TButtonControl); end; +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} - - +{$IFDEF DELPHI10UP}{$REGION 'TButton'}{$ENDIF} procedure RIRegisterTBUTTON(Cl: TPSRuntimeClassImporter); begin - Cl.Add(TBUTTON); + Cl.Add(TButton); end; +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} - - - +{$IFDEF DELPHI10UP}{$REGION 'TCustomCheckBox'}{$ENDIF} procedure RIRegisterTCUSTOMCHECKBOX(Cl: TPSRuntimeClassImporter); begin - Cl.Add(TCUSTOMCHECKBOX); + Cl.Add(TCustomCheckBox); end; +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} - +{$IFDEF DELPHI10UP}{$REGION 'TCheckBox'}{$ENDIF} procedure RIRegisterTCHECKBOX(Cl: TPSRuntimeClassImporter); begin - Cl.Add(TCHECKBOX); + Cl.Add(TCheckBox); end; +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} - +{$IFDEF DELPHI10UP}{$REGION 'TRadioButton'}{$ENDIF} procedure RIRegisterTRADIOBUTTON(Cl: TPSRuntimeClassImporter); begin - Cl.Add(TRADIOBUTTON); + Cl.Add(TRadioButton); end; +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} -procedure TCUSTOMLISTBOXCANVAS_R(Self: TCUSTOMLISTBOX; var T: TCANVAS); begin T := Self.CANVAS; end; +{$IFDEF DELPHI10UP}{$REGION 'TCustomListBox'}{$ENDIF} +{$IFDEF class_helper_present} +type + TCustomListBox_PSHelper = class helper for TCustomListBox + public + procedure CANVAS_R(var T: TCANVAS); + procedure ITEMS_R(var T: TSTRINGS); + procedure ITEMS_W(T: TSTRINGS); + procedure ITEMINDEX_R(var T: INTEGER); + procedure ITEMINDEX_W(T: INTEGER); + procedure SELCOUNT_R(var T: INTEGER); + procedure SELECTED_R(var T: BOOLEAN; t1: INTEGER); + procedure SELECTED_W(T: BOOLEAN; t1: INTEGER); + procedure TOPINDEX_R(var T: INTEGER); + procedure TOPINDEX_W(T: INTEGER); + end; + +procedure TCustomListBox_PSHelper.CANVAS_R(var T: TCANVAS); begin T := Self.CANVAS; end; +procedure TCustomListBox_PSHelper.ITEMS_R(var T: TSTRINGS); begin T := Self.ITEMS; end; +procedure TCustomListBox_PSHelper.ITEMS_W(T: TSTRINGS); begin Self.ITEMS := T; end; +procedure TCustomListBox_PSHelper.ITEMINDEX_R(var T: INTEGER); begin T := Self.ITEMINDEX; end; +procedure TCustomListBox_PSHelper.ITEMINDEX_W(T: INTEGER); begin Self.ITEMINDEX := T; end; +procedure TCustomListBox_PSHelper.SELCOUNT_R(var T: INTEGER); begin T := Self.SELCOUNT; end; +procedure TCustomListBox_PSHelper.SELECTED_R(var T: BOOLEAN; t1: INTEGER); begin T := Self.SELECTED[t1]; end; +procedure TCustomListBox_PSHelper.SELECTED_W(T: BOOLEAN; t1: INTEGER); begin Self.SELECTED[t1] := T; end; +procedure TCustomListBox_PSHelper.TOPINDEX_R(var T: INTEGER); begin T := Self.TOPINDEX; end; +procedure TCustomListBox_PSHelper.TOPINDEX_W(T: INTEGER); begin Self.TOPINDEX := T; end; + + +procedure RIRegisterTCUSTOMLISTBOX(Cl: TPSRuntimeClassImporter); +begin + with Cl.Add(TCustomListBox) do + begin + RegisterPropertyHelper(@TCustomListBox.ITEMS_R, @TCustomListBox.ITEMS_W, 'Items'); + RegisterPropertyHelper(@TCustomListBox.ITEMINDEX_R, @TCustomListBox.ITEMINDEX_W, 'ItemIndex'); + RegisterPropertyHelper(@TCustomListBox.SELCOUNT_R, nil, 'SelCount'); + RegisterPropertyHelper(@TCustomListBox.SELECTED_R, @TCustomListBox.SELECTED_W, 'Selected'); + + {$IFNDEF PS_MINIVCL} + RegisterMethod(@TCustomListBox.CLEAR, 'Clear'); + RegisterMethod(@TCustomListBox.ITEMATPOS, 'ItemAtPos'); + RegisterMethod(@TCustomListBox.ITEMRECT, 'ItemRect'); + RegisterPropertyHelper(@TCustomListBox.CANVAS_R, nil, 'Canvas'); + RegisterPropertyHelper(@TCustomListBox.TOPINDEX_R, @TCustomListBox.TOPINDEX_W, 'TopIndex'); + {$ENDIF} + end; +end; +{$ELSE} + +procedure TCUSTOMLISTBOXCANVAS_R(Self: TCustomListBox; var T: TCANVAS); begin T := Self.CANVAS; end; procedure TCUSTOMLISTBOXITEMS_R(Self: TCUSTOMLISTBOX; var T: TSTRINGS); begin T := Self.ITEMS; end; procedure TCUSTOMLISTBOXITEMS_W(Self: TCUSTOMLISTBOX; T: TSTRINGS); begin Self.ITEMS := T; end; procedure TCUSTOMLISTBOXITEMINDEX_R(Self: TCUSTOMLISTBOX; var T: INTEGER); begin T := Self.ITEMINDEX; end; @@ -237,21 +463,26 @@ begin {$ENDIF} end; end; +{$ENDIF class_helper_present} +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} - +{$IFDEF DELPHI10UP}{$REGION 'TListBox'}{$ENDIF} procedure RIRegisterTLISTBOX(Cl: TPSRuntimeClassImporter); begin - Cl.Add(TLISTBOX); + Cl.Add(TListBox); end; +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} - +{$IFDEF DELPHI10UP}{$REGION 'TScrollBar'}{$ENDIF} procedure RIRegisterTSCROLLBAR(Cl: TPSRuntimeClassImporter); begin - with Cl.Add(TSCROLLBAR) do + with Cl.Add(TScrollBar) do begin RegisterMethod(@TSCROLLBAR.SETPARAMS, 'SetParams'); end; end; +{$IFDEF DELPHI10UP}{$ENDREGION}{$ENDIF} + procedure RIRegister_stdctrls(cl: TPSRuntimeClassImporter); diff --git a/Source/uPSRuntime.pas b/Source/uPSRuntime.pas index 1988881..c7aff33 100644 --- a/Source/uPSRuntime.pas +++ b/Source/uPSRuntime.pas @@ -10476,7 +10476,6 @@ var CurrStack: Cardinal; cc: TPSCallingConvention; s: tbtString; - dx: Integer; begin s := p.Decl; if length(S) < 2 then