diff --git a/lib/loggerpro/packages/d120/loggerproRT.dproj b/lib/loggerpro/packages/d120/loggerproRT.dproj index aa94c289..d6d614f9 100644 --- a/lib/loggerpro/packages/d120/loggerproRT.dproj +++ b/lib/loggerpro/packages/d120/loggerproRT.dproj @@ -14,6 +14,16 @@ true + + true + Base + true + + + true + Base + true + true Base @@ -58,6 +68,16 @@ CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=Daniele Teti;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments= 120 + + package=com.embarcadero.$(MSBuildProjectName);label=$(MSBuildProjectName);versionCode=1;versionName=1.0.0;persistent=False;restoreAnyVersion=False;installLocation=auto;largeHeap=False;theme=TitleBar;hardwareAccelerated=true;apiKey=;minSdkVersion=23;targetSdkVersion=34 + Debug + activity-1.7.2.dex.jar;annotation-experimental-1.3.0.dex.jar;annotation-jvm-1.6.0.dex.jar;annotations-13.0.dex.jar;appcompat-1.2.0.dex.jar;appcompat-resources-1.2.0.dex.jar;billing-6.0.1.dex.jar;biometric-1.1.0.dex.jar;browser-1.4.0.dex.jar;cloud-messaging.dex.jar;collection-1.1.0.dex.jar;concurrent-futures-1.1.0.dex.jar;core-1.10.1.dex.jar;core-common-2.2.0.dex.jar;core-ktx-1.10.1.dex.jar;core-runtime-2.2.0.dex.jar;cursoradapter-1.0.0.dex.jar;customview-1.0.0.dex.jar;documentfile-1.0.0.dex.jar;drawerlayout-1.0.0.dex.jar;error_prone_annotations-2.9.0.dex.jar;exifinterface-1.3.6.dex.jar;firebase-annotations-16.2.0.dex.jar;firebase-common-20.3.1.dex.jar;firebase-components-17.1.0.dex.jar;firebase-datatransport-18.1.7.dex.jar;firebase-encoders-17.0.0.dex.jar;firebase-encoders-json-18.0.0.dex.jar;firebase-encoders-proto-16.0.0.dex.jar;firebase-iid-interop-17.1.0.dex.jar;firebase-installations-17.1.3.dex.jar;firebase-installations-interop-17.1.0.dex.jar;firebase-measurement-connector-19.0.0.dex.jar;firebase-messaging-23.1.2.dex.jar;fmx.dex.jar;fragment-1.2.5.dex.jar;google-play-licensing.dex.jar;interpolator-1.0.0.dex.jar;javax.inject-1.dex.jar;kotlin-stdlib-1.8.22.dex.jar;kotlin-stdlib-common-1.8.22.dex.jar;kotlin-stdlib-jdk7-1.8.22.dex.jar;kotlin-stdlib-jdk8-1.8.22.dex.jar;kotlinx-coroutines-android-1.6.4.dex.jar;kotlinx-coroutines-core-jvm-1.6.4.dex.jar;legacy-support-core-utils-1.0.0.dex.jar;lifecycle-common-2.6.1.dex.jar;lifecycle-livedata-2.6.1.dex.jar;lifecycle-livedata-core-2.6.1.dex.jar;lifecycle-runtime-2.6.1.dex.jar;lifecycle-service-2.6.1.dex.jar;lifecycle-viewmodel-2.6.1.dex.jar;lifecycle-viewmodel-savedstate-2.6.1.dex.jar;listenablefuture-1.0.dex.jar;loader-1.0.0.dex.jar;localbroadcastmanager-1.0.0.dex.jar;okio-jvm-3.4.0.dex.jar;play-services-ads-22.2.0.dex.jar;play-services-ads-base-22.2.0.dex.jar;play-services-ads-identifier-18.0.0.dex.jar;play-services-ads-lite-22.2.0.dex.jar;play-services-appset-16.0.1.dex.jar;play-services-base-18.1.0.dex.jar;play-services-basement-18.1.0.dex.jar;play-services-cloud-messaging-17.0.1.dex.jar;play-services-location-21.0.1.dex.jar;play-services-maps-18.1.0.dex.jar;play-services-measurement-base-20.1.2.dex.jar;play-services-measurement-sdk-api-20.1.2.dex.jar;play-services-stats-17.0.2.dex.jar;play-services-tasks-18.0.2.dex.jar;print-1.0.0.dex.jar;profileinstaller-1.3.0.dex.jar;room-common-2.2.5.dex.jar;room-runtime-2.2.5.dex.jar;savedstate-1.2.1.dex.jar;sqlite-2.1.0.dex.jar;sqlite-framework-2.1.0.dex.jar;startup-runtime-1.1.1.dex.jar;tracing-1.0.0.dex.jar;transport-api-3.0.0.dex.jar;transport-backend-cct-3.1.8.dex.jar;transport-runtime-3.1.8.dex.jar;user-messaging-platform-2.0.0.dex.jar;vectordrawable-1.1.0.dex.jar;vectordrawable-animated-1.1.0.dex.jar;versionedparcelable-1.1.1.dex.jar;viewpager-1.0.0.dex.jar;work-runtime-2.7.0.dex.jar + + + package=com.embarcadero.$(MSBuildProjectName);label=$(MSBuildProjectName);versionCode=1;versionName=1.0.0;persistent=False;restoreAnyVersion=False;installLocation=auto;largeHeap=False;theme=TitleBar;hardwareAccelerated=true;apiKey=;minSdkVersion=23;targetSdkVersion=34 + Debug + activity-1.7.2.dex.jar;annotation-experimental-1.3.0.dex.jar;annotation-jvm-1.6.0.dex.jar;annotations-13.0.dex.jar;appcompat-1.2.0.dex.jar;appcompat-resources-1.2.0.dex.jar;billing-6.0.1.dex.jar;biometric-1.1.0.dex.jar;browser-1.4.0.dex.jar;cloud-messaging.dex.jar;collection-1.1.0.dex.jar;concurrent-futures-1.1.0.dex.jar;core-1.10.1.dex.jar;core-common-2.2.0.dex.jar;core-ktx-1.10.1.dex.jar;core-runtime-2.2.0.dex.jar;cursoradapter-1.0.0.dex.jar;customview-1.0.0.dex.jar;documentfile-1.0.0.dex.jar;drawerlayout-1.0.0.dex.jar;error_prone_annotations-2.9.0.dex.jar;exifinterface-1.3.6.dex.jar;firebase-annotations-16.2.0.dex.jar;firebase-common-20.3.1.dex.jar;firebase-components-17.1.0.dex.jar;firebase-datatransport-18.1.7.dex.jar;firebase-encoders-17.0.0.dex.jar;firebase-encoders-json-18.0.0.dex.jar;firebase-encoders-proto-16.0.0.dex.jar;firebase-iid-interop-17.1.0.dex.jar;firebase-installations-17.1.3.dex.jar;firebase-installations-interop-17.1.0.dex.jar;firebase-measurement-connector-19.0.0.dex.jar;firebase-messaging-23.1.2.dex.jar;fmx.dex.jar;fragment-1.2.5.dex.jar;google-play-licensing.dex.jar;interpolator-1.0.0.dex.jar;javax.inject-1.dex.jar;kotlin-stdlib-1.8.22.dex.jar;kotlin-stdlib-common-1.8.22.dex.jar;kotlin-stdlib-jdk7-1.8.22.dex.jar;kotlin-stdlib-jdk8-1.8.22.dex.jar;kotlinx-coroutines-android-1.6.4.dex.jar;kotlinx-coroutines-core-jvm-1.6.4.dex.jar;legacy-support-core-utils-1.0.0.dex.jar;lifecycle-common-2.6.1.dex.jar;lifecycle-livedata-2.6.1.dex.jar;lifecycle-livedata-core-2.6.1.dex.jar;lifecycle-runtime-2.6.1.dex.jar;lifecycle-service-2.6.1.dex.jar;lifecycle-viewmodel-2.6.1.dex.jar;lifecycle-viewmodel-savedstate-2.6.1.dex.jar;listenablefuture-1.0.dex.jar;loader-1.0.0.dex.jar;localbroadcastmanager-1.0.0.dex.jar;okio-jvm-3.4.0.dex.jar;play-services-ads-22.2.0.dex.jar;play-services-ads-base-22.2.0.dex.jar;play-services-ads-identifier-18.0.0.dex.jar;play-services-ads-lite-22.2.0.dex.jar;play-services-appset-16.0.1.dex.jar;play-services-base-18.1.0.dex.jar;play-services-basement-18.1.0.dex.jar;play-services-cloud-messaging-17.0.1.dex.jar;play-services-location-21.0.1.dex.jar;play-services-maps-18.1.0.dex.jar;play-services-measurement-base-20.1.2.dex.jar;play-services-measurement-sdk-api-20.1.2.dex.jar;play-services-stats-17.0.2.dex.jar;play-services-tasks-18.0.2.dex.jar;print-1.0.0.dex.jar;profileinstaller-1.3.0.dex.jar;room-common-2.2.5.dex.jar;room-runtime-2.2.5.dex.jar;savedstate-1.2.1.dex.jar;sqlite-2.1.0.dex.jar;sqlite-framework-2.1.0.dex.jar;startup-runtime-1.1.1.dex.jar;tracing-1.0.0.dex.jar;transport-api-3.0.0.dex.jar;transport-backend-cct-3.1.8.dex.jar;transport-runtime-3.1.8.dex.jar;user-messaging-platform-2.0.0.dex.jar;vectordrawable-1.1.0.dex.jar;vectordrawable-animated-1.1.0.dex.jar;versionedparcelable-1.1.1.dex.jar;viewpager-1.0.0.dex.jar;work-runtime-2.7.0.dex.jar + Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) Debug @@ -1010,6 +1030,9 @@ + False + False + False True False False diff --git a/lib/swagdoc/Source/SwagDoc.dproj b/lib/swagdoc/Source/SwagDoc.dproj index edfaa96d..63ccf228 100644 --- a/lib/swagdoc/Source/SwagDoc.dproj +++ b/lib/swagdoc/Source/SwagDoc.dproj @@ -14,6 +14,16 @@ true + + true + Base + true + + + true + Base + true + true Base @@ -60,6 +70,18 @@ true true + + package=com.embarcadero.$(MSBuildProjectName);label=$(MSBuildProjectName);versionCode=1;versionName=1.0.0;persistent=False;restoreAnyVersion=False;installLocation=auto;largeHeap=False;theme=TitleBar;hardwareAccelerated=true;apiKey=;minSdkVersion=23;targetSdkVersion=34 + Debug + false + activity-1.7.2.dex.jar;annotation-experimental-1.3.0.dex.jar;annotation-jvm-1.6.0.dex.jar;annotations-13.0.dex.jar;appcompat-1.2.0.dex.jar;appcompat-resources-1.2.0.dex.jar;billing-6.0.1.dex.jar;biometric-1.1.0.dex.jar;browser-1.4.0.dex.jar;cloud-messaging.dex.jar;collection-1.1.0.dex.jar;concurrent-futures-1.1.0.dex.jar;core-1.10.1.dex.jar;core-common-2.2.0.dex.jar;core-ktx-1.10.1.dex.jar;core-runtime-2.2.0.dex.jar;cursoradapter-1.0.0.dex.jar;customview-1.0.0.dex.jar;documentfile-1.0.0.dex.jar;drawerlayout-1.0.0.dex.jar;error_prone_annotations-2.9.0.dex.jar;exifinterface-1.3.6.dex.jar;firebase-annotations-16.2.0.dex.jar;firebase-common-20.3.1.dex.jar;firebase-components-17.1.0.dex.jar;firebase-datatransport-18.1.7.dex.jar;firebase-encoders-17.0.0.dex.jar;firebase-encoders-json-18.0.0.dex.jar;firebase-encoders-proto-16.0.0.dex.jar;firebase-iid-interop-17.1.0.dex.jar;firebase-installations-17.1.3.dex.jar;firebase-installations-interop-17.1.0.dex.jar;firebase-measurement-connector-19.0.0.dex.jar;firebase-messaging-23.1.2.dex.jar;fmx.dex.jar;fragment-1.2.5.dex.jar;google-play-licensing.dex.jar;interpolator-1.0.0.dex.jar;javax.inject-1.dex.jar;kotlin-stdlib-1.8.22.dex.jar;kotlin-stdlib-common-1.8.22.dex.jar;kotlin-stdlib-jdk7-1.8.22.dex.jar;kotlin-stdlib-jdk8-1.8.22.dex.jar;kotlinx-coroutines-android-1.6.4.dex.jar;kotlinx-coroutines-core-jvm-1.6.4.dex.jar;legacy-support-core-utils-1.0.0.dex.jar;lifecycle-common-2.6.1.dex.jar;lifecycle-livedata-2.6.1.dex.jar;lifecycle-livedata-core-2.6.1.dex.jar;lifecycle-runtime-2.6.1.dex.jar;lifecycle-service-2.6.1.dex.jar;lifecycle-viewmodel-2.6.1.dex.jar;lifecycle-viewmodel-savedstate-2.6.1.dex.jar;listenablefuture-1.0.dex.jar;loader-1.0.0.dex.jar;localbroadcastmanager-1.0.0.dex.jar;okio-jvm-3.4.0.dex.jar;play-services-ads-22.2.0.dex.jar;play-services-ads-base-22.2.0.dex.jar;play-services-ads-identifier-18.0.0.dex.jar;play-services-ads-lite-22.2.0.dex.jar;play-services-appset-16.0.1.dex.jar;play-services-base-18.1.0.dex.jar;play-services-basement-18.1.0.dex.jar;play-services-cloud-messaging-17.0.1.dex.jar;play-services-location-21.0.1.dex.jar;play-services-maps-18.1.0.dex.jar;play-services-measurement-base-20.1.2.dex.jar;play-services-measurement-sdk-api-20.1.2.dex.jar;play-services-stats-17.0.2.dex.jar;play-services-tasks-18.0.2.dex.jar;print-1.0.0.dex.jar;profileinstaller-1.3.0.dex.jar;room-common-2.2.5.dex.jar;room-runtime-2.2.5.dex.jar;savedstate-1.2.1.dex.jar;sqlite-2.1.0.dex.jar;sqlite-framework-2.1.0.dex.jar;startup-runtime-1.1.1.dex.jar;tracing-1.0.0.dex.jar;transport-api-3.0.0.dex.jar;transport-backend-cct-3.1.8.dex.jar;transport-runtime-3.1.8.dex.jar;user-messaging-platform-2.0.0.dex.jar;vectordrawable-1.1.0.dex.jar;vectordrawable-animated-1.1.0.dex.jar;versionedparcelable-1.1.1.dex.jar;viewpager-1.0.0.dex.jar;work-runtime-2.7.0.dex.jar + + + package=com.embarcadero.$(MSBuildProjectName);label=$(MSBuildProjectName);versionCode=1;versionName=1.0.0;persistent=False;restoreAnyVersion=False;installLocation=auto;largeHeap=False;theme=TitleBar;hardwareAccelerated=true;apiKey=;minSdkVersion=23;targetSdkVersion=34 + Debug + false + activity-1.7.2.dex.jar;annotation-experimental-1.3.0.dex.jar;annotation-jvm-1.6.0.dex.jar;annotations-13.0.dex.jar;appcompat-1.2.0.dex.jar;appcompat-resources-1.2.0.dex.jar;billing-6.0.1.dex.jar;biometric-1.1.0.dex.jar;browser-1.4.0.dex.jar;cloud-messaging.dex.jar;collection-1.1.0.dex.jar;concurrent-futures-1.1.0.dex.jar;core-1.10.1.dex.jar;core-common-2.2.0.dex.jar;core-ktx-1.10.1.dex.jar;core-runtime-2.2.0.dex.jar;cursoradapter-1.0.0.dex.jar;customview-1.0.0.dex.jar;documentfile-1.0.0.dex.jar;drawerlayout-1.0.0.dex.jar;error_prone_annotations-2.9.0.dex.jar;exifinterface-1.3.6.dex.jar;firebase-annotations-16.2.0.dex.jar;firebase-common-20.3.1.dex.jar;firebase-components-17.1.0.dex.jar;firebase-datatransport-18.1.7.dex.jar;firebase-encoders-17.0.0.dex.jar;firebase-encoders-json-18.0.0.dex.jar;firebase-encoders-proto-16.0.0.dex.jar;firebase-iid-interop-17.1.0.dex.jar;firebase-installations-17.1.3.dex.jar;firebase-installations-interop-17.1.0.dex.jar;firebase-measurement-connector-19.0.0.dex.jar;firebase-messaging-23.1.2.dex.jar;fmx.dex.jar;fragment-1.2.5.dex.jar;google-play-licensing.dex.jar;interpolator-1.0.0.dex.jar;javax.inject-1.dex.jar;kotlin-stdlib-1.8.22.dex.jar;kotlin-stdlib-common-1.8.22.dex.jar;kotlin-stdlib-jdk7-1.8.22.dex.jar;kotlin-stdlib-jdk8-1.8.22.dex.jar;kotlinx-coroutines-android-1.6.4.dex.jar;kotlinx-coroutines-core-jvm-1.6.4.dex.jar;legacy-support-core-utils-1.0.0.dex.jar;lifecycle-common-2.6.1.dex.jar;lifecycle-livedata-2.6.1.dex.jar;lifecycle-livedata-core-2.6.1.dex.jar;lifecycle-runtime-2.6.1.dex.jar;lifecycle-service-2.6.1.dex.jar;lifecycle-viewmodel-2.6.1.dex.jar;lifecycle-viewmodel-savedstate-2.6.1.dex.jar;listenablefuture-1.0.dex.jar;loader-1.0.0.dex.jar;localbroadcastmanager-1.0.0.dex.jar;okio-jvm-3.4.0.dex.jar;play-services-ads-22.2.0.dex.jar;play-services-ads-base-22.2.0.dex.jar;play-services-ads-identifier-18.0.0.dex.jar;play-services-ads-lite-22.2.0.dex.jar;play-services-appset-16.0.1.dex.jar;play-services-base-18.1.0.dex.jar;play-services-basement-18.1.0.dex.jar;play-services-cloud-messaging-17.0.1.dex.jar;play-services-location-21.0.1.dex.jar;play-services-maps-18.1.0.dex.jar;play-services-measurement-base-20.1.2.dex.jar;play-services-measurement-sdk-api-20.1.2.dex.jar;play-services-stats-17.0.2.dex.jar;play-services-tasks-18.0.2.dex.jar;print-1.0.0.dex.jar;profileinstaller-1.3.0.dex.jar;room-common-2.2.5.dex.jar;room-runtime-2.2.5.dex.jar;savedstate-1.2.1.dex.jar;sqlite-2.1.0.dex.jar;sqlite-framework-2.1.0.dex.jar;startup-runtime-1.1.1.dex.jar;tracing-1.0.0.dex.jar;transport-api-3.0.0.dex.jar;transport-backend-cct-3.1.8.dex.jar;transport-runtime-3.1.8.dex.jar;user-messaging-platform-2.0.0.dex.jar;vectordrawable-1.1.0.dex.jar;vectordrawable-animated-1.1.0.dex.jar;versionedparcelable-1.1.1.dex.jar;viewpager-1.0.0.dex.jar;work-runtime-2.7.0.dex.jar + Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) Debug @@ -1020,6 +1042,9 @@ + False + False + False True False False diff --git a/packages/d120/dmvcframeworkDT.dproj b/packages/d120/dmvcframeworkDT.dproj index f5d4991b..0e58ebde 100644 --- a/packages/d120/dmvcframeworkDT.dproj +++ b/packages/d120/dmvcframeworkDT.dproj @@ -14,6 +14,16 @@ true + + true + Base + true + + + true + Base + true + true Base @@ -69,6 +79,16 @@ DelphiMVCFramework IDE Expert 120 + + package=com.embarcadero.$(MSBuildProjectName);label=$(MSBuildProjectName);versionCode=1;versionName=1.0.0;persistent=False;restoreAnyVersion=False;installLocation=auto;largeHeap=False;theme=TitleBar;hardwareAccelerated=true;apiKey=;minSdkVersion=23;targetSdkVersion=34 + Debug + activity-1.7.2.dex.jar;annotation-experimental-1.3.0.dex.jar;annotation-jvm-1.6.0.dex.jar;annotations-13.0.dex.jar;appcompat-1.2.0.dex.jar;appcompat-resources-1.2.0.dex.jar;billing-6.0.1.dex.jar;biometric-1.1.0.dex.jar;browser-1.4.0.dex.jar;cloud-messaging.dex.jar;collection-1.1.0.dex.jar;concurrent-futures-1.1.0.dex.jar;core-1.10.1.dex.jar;core-common-2.2.0.dex.jar;core-ktx-1.10.1.dex.jar;core-runtime-2.2.0.dex.jar;cursoradapter-1.0.0.dex.jar;customview-1.0.0.dex.jar;documentfile-1.0.0.dex.jar;drawerlayout-1.0.0.dex.jar;error_prone_annotations-2.9.0.dex.jar;exifinterface-1.3.6.dex.jar;firebase-annotations-16.2.0.dex.jar;firebase-common-20.3.1.dex.jar;firebase-components-17.1.0.dex.jar;firebase-datatransport-18.1.7.dex.jar;firebase-encoders-17.0.0.dex.jar;firebase-encoders-json-18.0.0.dex.jar;firebase-encoders-proto-16.0.0.dex.jar;firebase-iid-interop-17.1.0.dex.jar;firebase-installations-17.1.3.dex.jar;firebase-installations-interop-17.1.0.dex.jar;firebase-measurement-connector-19.0.0.dex.jar;firebase-messaging-23.1.2.dex.jar;fmx.dex.jar;fragment-1.2.5.dex.jar;google-play-licensing.dex.jar;interpolator-1.0.0.dex.jar;javax.inject-1.dex.jar;kotlin-stdlib-1.8.22.dex.jar;kotlin-stdlib-common-1.8.22.dex.jar;kotlin-stdlib-jdk7-1.8.22.dex.jar;kotlin-stdlib-jdk8-1.8.22.dex.jar;kotlinx-coroutines-android-1.6.4.dex.jar;kotlinx-coroutines-core-jvm-1.6.4.dex.jar;legacy-support-core-utils-1.0.0.dex.jar;lifecycle-common-2.6.1.dex.jar;lifecycle-livedata-2.6.1.dex.jar;lifecycle-livedata-core-2.6.1.dex.jar;lifecycle-runtime-2.6.1.dex.jar;lifecycle-service-2.6.1.dex.jar;lifecycle-viewmodel-2.6.1.dex.jar;lifecycle-viewmodel-savedstate-2.6.1.dex.jar;listenablefuture-1.0.dex.jar;loader-1.0.0.dex.jar;localbroadcastmanager-1.0.0.dex.jar;okio-jvm-3.4.0.dex.jar;play-services-ads-22.2.0.dex.jar;play-services-ads-base-22.2.0.dex.jar;play-services-ads-identifier-18.0.0.dex.jar;play-services-ads-lite-22.2.0.dex.jar;play-services-appset-16.0.1.dex.jar;play-services-base-18.1.0.dex.jar;play-services-basement-18.1.0.dex.jar;play-services-cloud-messaging-17.0.1.dex.jar;play-services-location-21.0.1.dex.jar;play-services-maps-18.1.0.dex.jar;play-services-measurement-base-20.1.2.dex.jar;play-services-measurement-sdk-api-20.1.2.dex.jar;play-services-stats-17.0.2.dex.jar;play-services-tasks-18.0.2.dex.jar;print-1.0.0.dex.jar;profileinstaller-1.3.0.dex.jar;room-common-2.2.5.dex.jar;room-runtime-2.2.5.dex.jar;savedstate-1.2.1.dex.jar;sqlite-2.1.0.dex.jar;sqlite-framework-2.1.0.dex.jar;startup-runtime-1.1.1.dex.jar;tracing-1.0.0.dex.jar;transport-api-3.0.0.dex.jar;transport-backend-cct-3.1.8.dex.jar;transport-runtime-3.1.8.dex.jar;user-messaging-platform-2.0.0.dex.jar;vectordrawable-1.1.0.dex.jar;vectordrawable-animated-1.1.0.dex.jar;versionedparcelable-1.1.1.dex.jar;viewpager-1.0.0.dex.jar;work-runtime-2.7.0.dex.jar + + + package=com.embarcadero.$(MSBuildProjectName);label=$(MSBuildProjectName);versionCode=1;versionName=1.0.0;persistent=False;restoreAnyVersion=False;installLocation=auto;largeHeap=False;theme=TitleBar;hardwareAccelerated=true;apiKey=;minSdkVersion=23;targetSdkVersion=34 + Debug + activity-1.7.2.dex.jar;annotation-experimental-1.3.0.dex.jar;annotation-jvm-1.6.0.dex.jar;annotations-13.0.dex.jar;appcompat-1.2.0.dex.jar;appcompat-resources-1.2.0.dex.jar;billing-6.0.1.dex.jar;biometric-1.1.0.dex.jar;browser-1.4.0.dex.jar;cloud-messaging.dex.jar;collection-1.1.0.dex.jar;concurrent-futures-1.1.0.dex.jar;core-1.10.1.dex.jar;core-common-2.2.0.dex.jar;core-ktx-1.10.1.dex.jar;core-runtime-2.2.0.dex.jar;cursoradapter-1.0.0.dex.jar;customview-1.0.0.dex.jar;documentfile-1.0.0.dex.jar;drawerlayout-1.0.0.dex.jar;error_prone_annotations-2.9.0.dex.jar;exifinterface-1.3.6.dex.jar;firebase-annotations-16.2.0.dex.jar;firebase-common-20.3.1.dex.jar;firebase-components-17.1.0.dex.jar;firebase-datatransport-18.1.7.dex.jar;firebase-encoders-17.0.0.dex.jar;firebase-encoders-json-18.0.0.dex.jar;firebase-encoders-proto-16.0.0.dex.jar;firebase-iid-interop-17.1.0.dex.jar;firebase-installations-17.1.3.dex.jar;firebase-installations-interop-17.1.0.dex.jar;firebase-measurement-connector-19.0.0.dex.jar;firebase-messaging-23.1.2.dex.jar;fmx.dex.jar;fragment-1.2.5.dex.jar;google-play-licensing.dex.jar;interpolator-1.0.0.dex.jar;javax.inject-1.dex.jar;kotlin-stdlib-1.8.22.dex.jar;kotlin-stdlib-common-1.8.22.dex.jar;kotlin-stdlib-jdk7-1.8.22.dex.jar;kotlin-stdlib-jdk8-1.8.22.dex.jar;kotlinx-coroutines-android-1.6.4.dex.jar;kotlinx-coroutines-core-jvm-1.6.4.dex.jar;legacy-support-core-utils-1.0.0.dex.jar;lifecycle-common-2.6.1.dex.jar;lifecycle-livedata-2.6.1.dex.jar;lifecycle-livedata-core-2.6.1.dex.jar;lifecycle-runtime-2.6.1.dex.jar;lifecycle-service-2.6.1.dex.jar;lifecycle-viewmodel-2.6.1.dex.jar;lifecycle-viewmodel-savedstate-2.6.1.dex.jar;listenablefuture-1.0.dex.jar;loader-1.0.0.dex.jar;localbroadcastmanager-1.0.0.dex.jar;okio-jvm-3.4.0.dex.jar;play-services-ads-22.2.0.dex.jar;play-services-ads-base-22.2.0.dex.jar;play-services-ads-identifier-18.0.0.dex.jar;play-services-ads-lite-22.2.0.dex.jar;play-services-appset-16.0.1.dex.jar;play-services-base-18.1.0.dex.jar;play-services-basement-18.1.0.dex.jar;play-services-cloud-messaging-17.0.1.dex.jar;play-services-location-21.0.1.dex.jar;play-services-maps-18.1.0.dex.jar;play-services-measurement-base-20.1.2.dex.jar;play-services-measurement-sdk-api-20.1.2.dex.jar;play-services-stats-17.0.2.dex.jar;play-services-tasks-18.0.2.dex.jar;print-1.0.0.dex.jar;profileinstaller-1.3.0.dex.jar;room-common-2.2.5.dex.jar;room-runtime-2.2.5.dex.jar;savedstate-1.2.1.dex.jar;sqlite-2.1.0.dex.jar;sqlite-framework-2.1.0.dex.jar;startup-runtime-1.1.1.dex.jar;tracing-1.0.0.dex.jar;transport-api-3.0.0.dex.jar;transport-backend-cct-3.1.8.dex.jar;transport-runtime-3.1.8.dex.jar;user-messaging-platform-2.0.0.dex.jar;vectordrawable-1.1.0.dex.jar;vectordrawable-animated-1.1.0.dex.jar;versionedparcelable-1.1.1.dex.jar;viewpager-1.0.0.dex.jar;work-runtime-2.7.0.dex.jar + Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) Debug @@ -1049,6 +1069,9 @@ + False + False + False True False False diff --git a/packages/d120/dmvcframeworkRT.dproj b/packages/d120/dmvcframeworkRT.dproj index 49407b4d..5945524e 100644 --- a/packages/d120/dmvcframeworkRT.dproj +++ b/packages/d120/dmvcframeworkRT.dproj @@ -14,6 +14,16 @@ true + + true + Base + true + + + true + Base + true + true Base @@ -70,6 +80,16 @@ DMVCFramework - CopyRight (2010-2020) Daniele Teti and the DMVCFramework Team 120 + + package=com.embarcadero.$(MSBuildProjectName);label=$(MSBuildProjectName);versionCode=1;versionName=1.0.0;persistent=False;restoreAnyVersion=False;installLocation=auto;largeHeap=False;theme=TitleBar;hardwareAccelerated=true;apiKey=;minSdkVersion=23;targetSdkVersion=34 + Debug + activity-1.7.2.dex.jar;annotation-experimental-1.3.0.dex.jar;annotation-jvm-1.6.0.dex.jar;annotations-13.0.dex.jar;appcompat-1.2.0.dex.jar;appcompat-resources-1.2.0.dex.jar;billing-6.0.1.dex.jar;biometric-1.1.0.dex.jar;browser-1.4.0.dex.jar;cloud-messaging.dex.jar;collection-1.1.0.dex.jar;concurrent-futures-1.1.0.dex.jar;core-1.10.1.dex.jar;core-common-2.2.0.dex.jar;core-ktx-1.10.1.dex.jar;core-runtime-2.2.0.dex.jar;cursoradapter-1.0.0.dex.jar;customview-1.0.0.dex.jar;documentfile-1.0.0.dex.jar;drawerlayout-1.0.0.dex.jar;error_prone_annotations-2.9.0.dex.jar;exifinterface-1.3.6.dex.jar;firebase-annotations-16.2.0.dex.jar;firebase-common-20.3.1.dex.jar;firebase-components-17.1.0.dex.jar;firebase-datatransport-18.1.7.dex.jar;firebase-encoders-17.0.0.dex.jar;firebase-encoders-json-18.0.0.dex.jar;firebase-encoders-proto-16.0.0.dex.jar;firebase-iid-interop-17.1.0.dex.jar;firebase-installations-17.1.3.dex.jar;firebase-installations-interop-17.1.0.dex.jar;firebase-measurement-connector-19.0.0.dex.jar;firebase-messaging-23.1.2.dex.jar;fmx.dex.jar;fragment-1.2.5.dex.jar;google-play-licensing.dex.jar;interpolator-1.0.0.dex.jar;javax.inject-1.dex.jar;kotlin-stdlib-1.8.22.dex.jar;kotlin-stdlib-common-1.8.22.dex.jar;kotlin-stdlib-jdk7-1.8.22.dex.jar;kotlin-stdlib-jdk8-1.8.22.dex.jar;kotlinx-coroutines-android-1.6.4.dex.jar;kotlinx-coroutines-core-jvm-1.6.4.dex.jar;legacy-support-core-utils-1.0.0.dex.jar;lifecycle-common-2.6.1.dex.jar;lifecycle-livedata-2.6.1.dex.jar;lifecycle-livedata-core-2.6.1.dex.jar;lifecycle-runtime-2.6.1.dex.jar;lifecycle-service-2.6.1.dex.jar;lifecycle-viewmodel-2.6.1.dex.jar;lifecycle-viewmodel-savedstate-2.6.1.dex.jar;listenablefuture-1.0.dex.jar;loader-1.0.0.dex.jar;localbroadcastmanager-1.0.0.dex.jar;okio-jvm-3.4.0.dex.jar;play-services-ads-22.2.0.dex.jar;play-services-ads-base-22.2.0.dex.jar;play-services-ads-identifier-18.0.0.dex.jar;play-services-ads-lite-22.2.0.dex.jar;play-services-appset-16.0.1.dex.jar;play-services-base-18.1.0.dex.jar;play-services-basement-18.1.0.dex.jar;play-services-cloud-messaging-17.0.1.dex.jar;play-services-location-21.0.1.dex.jar;play-services-maps-18.1.0.dex.jar;play-services-measurement-base-20.1.2.dex.jar;play-services-measurement-sdk-api-20.1.2.dex.jar;play-services-stats-17.0.2.dex.jar;play-services-tasks-18.0.2.dex.jar;print-1.0.0.dex.jar;profileinstaller-1.3.0.dex.jar;room-common-2.2.5.dex.jar;room-runtime-2.2.5.dex.jar;savedstate-1.2.1.dex.jar;sqlite-2.1.0.dex.jar;sqlite-framework-2.1.0.dex.jar;startup-runtime-1.1.1.dex.jar;tracing-1.0.0.dex.jar;transport-api-3.0.0.dex.jar;transport-backend-cct-3.1.8.dex.jar;transport-runtime-3.1.8.dex.jar;user-messaging-platform-2.0.0.dex.jar;vectordrawable-1.1.0.dex.jar;vectordrawable-animated-1.1.0.dex.jar;versionedparcelable-1.1.1.dex.jar;viewpager-1.0.0.dex.jar;work-runtime-2.7.0.dex.jar + + + package=com.embarcadero.$(MSBuildProjectName);label=$(MSBuildProjectName);versionCode=1;versionName=1.0.0;persistent=False;restoreAnyVersion=False;installLocation=auto;largeHeap=False;theme=TitleBar;hardwareAccelerated=true;apiKey=;minSdkVersion=23;targetSdkVersion=34 + Debug + activity-1.7.2.dex.jar;annotation-experimental-1.3.0.dex.jar;annotation-jvm-1.6.0.dex.jar;annotations-13.0.dex.jar;appcompat-1.2.0.dex.jar;appcompat-resources-1.2.0.dex.jar;billing-6.0.1.dex.jar;biometric-1.1.0.dex.jar;browser-1.4.0.dex.jar;cloud-messaging.dex.jar;collection-1.1.0.dex.jar;concurrent-futures-1.1.0.dex.jar;core-1.10.1.dex.jar;core-common-2.2.0.dex.jar;core-ktx-1.10.1.dex.jar;core-runtime-2.2.0.dex.jar;cursoradapter-1.0.0.dex.jar;customview-1.0.0.dex.jar;documentfile-1.0.0.dex.jar;drawerlayout-1.0.0.dex.jar;error_prone_annotations-2.9.0.dex.jar;exifinterface-1.3.6.dex.jar;firebase-annotations-16.2.0.dex.jar;firebase-common-20.3.1.dex.jar;firebase-components-17.1.0.dex.jar;firebase-datatransport-18.1.7.dex.jar;firebase-encoders-17.0.0.dex.jar;firebase-encoders-json-18.0.0.dex.jar;firebase-encoders-proto-16.0.0.dex.jar;firebase-iid-interop-17.1.0.dex.jar;firebase-installations-17.1.3.dex.jar;firebase-installations-interop-17.1.0.dex.jar;firebase-measurement-connector-19.0.0.dex.jar;firebase-messaging-23.1.2.dex.jar;fmx.dex.jar;fragment-1.2.5.dex.jar;google-play-licensing.dex.jar;interpolator-1.0.0.dex.jar;javax.inject-1.dex.jar;kotlin-stdlib-1.8.22.dex.jar;kotlin-stdlib-common-1.8.22.dex.jar;kotlin-stdlib-jdk7-1.8.22.dex.jar;kotlin-stdlib-jdk8-1.8.22.dex.jar;kotlinx-coroutines-android-1.6.4.dex.jar;kotlinx-coroutines-core-jvm-1.6.4.dex.jar;legacy-support-core-utils-1.0.0.dex.jar;lifecycle-common-2.6.1.dex.jar;lifecycle-livedata-2.6.1.dex.jar;lifecycle-livedata-core-2.6.1.dex.jar;lifecycle-runtime-2.6.1.dex.jar;lifecycle-service-2.6.1.dex.jar;lifecycle-viewmodel-2.6.1.dex.jar;lifecycle-viewmodel-savedstate-2.6.1.dex.jar;listenablefuture-1.0.dex.jar;loader-1.0.0.dex.jar;localbroadcastmanager-1.0.0.dex.jar;okio-jvm-3.4.0.dex.jar;play-services-ads-22.2.0.dex.jar;play-services-ads-base-22.2.0.dex.jar;play-services-ads-identifier-18.0.0.dex.jar;play-services-ads-lite-22.2.0.dex.jar;play-services-appset-16.0.1.dex.jar;play-services-base-18.1.0.dex.jar;play-services-basement-18.1.0.dex.jar;play-services-cloud-messaging-17.0.1.dex.jar;play-services-location-21.0.1.dex.jar;play-services-maps-18.1.0.dex.jar;play-services-measurement-base-20.1.2.dex.jar;play-services-measurement-sdk-api-20.1.2.dex.jar;play-services-stats-17.0.2.dex.jar;play-services-tasks-18.0.2.dex.jar;print-1.0.0.dex.jar;profileinstaller-1.3.0.dex.jar;room-common-2.2.5.dex.jar;room-runtime-2.2.5.dex.jar;savedstate-1.2.1.dex.jar;sqlite-2.1.0.dex.jar;sqlite-framework-2.1.0.dex.jar;startup-runtime-1.1.1.dex.jar;tracing-1.0.0.dex.jar;transport-api-3.0.0.dex.jar;transport-backend-cct-3.1.8.dex.jar;transport-runtime-3.1.8.dex.jar;user-messaging-platform-2.0.0.dex.jar;vectordrawable-1.1.0.dex.jar;vectordrawable-animated-1.1.0.dex.jar;versionedparcelable-1.1.1.dex.jar;viewpager-1.0.0.dex.jar;work-runtime-2.7.0.dex.jar + Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) Debug @@ -1100,6 +1120,9 @@ + False + False + False True False False diff --git a/samples/functional_programming/FunctionalProgramming.dpr b/samples/higher_order_functions/HigherOrderFunctions.dpr similarity index 87% rename from samples/functional_programming/FunctionalProgramming.dpr rename to samples/higher_order_functions/HigherOrderFunctions.dpr index 303c3571..7b260150 100644 --- a/samples/functional_programming/FunctionalProgramming.dpr +++ b/samples/higher_order_functions/HigherOrderFunctions.dpr @@ -1,4 +1,4 @@ -program FunctionalProgramming; +program HigherOrderFunctions; uses Vcl.Forms, diff --git a/samples/functional_programming/FunctionalProgramming.dproj b/samples/higher_order_functions/HigherOrderFunctions.dproj similarity index 98% rename from samples/functional_programming/FunctionalProgramming.dproj rename to samples/higher_order_functions/HigherOrderFunctions.dproj index 306c1cb7..b382167c 100644 --- a/samples/functional_programming/FunctionalProgramming.dproj +++ b/samples/higher_order_functions/HigherOrderFunctions.dproj @@ -1,14 +1,15 @@  {2443E8EE-CE91-4279-B049-8119378EB494} - 20.1 + 20.2 VCL - FunctionalProgramming.dpr + HigherOrderFunctions.dpr True Debug Win32 1 Application + HigherOrderFunctions true @@ -40,7 +41,7 @@ true - FunctionalProgramming + HigherOrderFunctions $(BDS)\bin\delphi_PROJECTICON.ico System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;$(DCC_Namespace) .\$(Platform)\$(Config) @@ -160,13 +161,14 @@ - FunctionalProgramming.dpr + HigherOrderFunctions.dpr - - + + + - FunctionalProgramming.exe + HigherOrderFunctions.exe true @@ -182,16 +184,6 @@ 0 - - - classes - 64 - - - classes - 64 - - res\xml @@ -824,6 +816,9 @@ 1 + + 1 + @@ -1116,11 +1111,13 @@ + True False + False 12 diff --git a/samples/functional_programming/MainFormU.dfm b/samples/higher_order_functions/MainFormU.dfm similarity index 82% rename from samples/functional_programming/MainFormU.dfm rename to samples/higher_order_functions/MainFormU.dfm index 03475c22..5adfe264 100644 --- a/samples/functional_programming/MainFormU.dfm +++ b/samples/higher_order_functions/MainFormU.dfm @@ -1,49 +1,51 @@ object MainForm: TMainForm Left = 0 Top = 0 - Caption = 'DMVCFramework | Map, Filter, Reduce sample' - ClientHeight = 326 - ClientWidth = 800 + BorderStyle = bsDialog + Caption = 'DMVCFramework | Map, Filter, Reduce | Sample' + ClientHeight = 383 + ClientWidth = 754 Color = clBtnFace Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'Tahoma' Font.Style = [] + Position = poScreenCenter DesignSize = ( - 800 - 326) + 754 + 383) TextHeight = 13 object Label1: TLabel - Left = 18 + Left = 8 Top = 8 Width = 20 Height = 13 Caption = 'Map' end object Label2: TLabel - Left = 204 + Left = 194 Top = 8 Width = 36 Height = 13 Caption = 'Reduce' end object Label3: TLabel - Left = 390 + Left = 380 Top = 8 Width = 24 Height = 13 Caption = 'Filter' end object btnForEach: TLabel - Left = 576 + Left = 566 Top = 8 Width = 39 Height = 13 Caption = 'ForEach' end object btnMapAddStars: TButton - Left = 18 + Left = 8 Top = 27 Width = 95 Height = 30 @@ -52,16 +54,17 @@ object MainForm: TMainForm OnClick = btnMapAddStarsClick end object lbMap: TListBox - Left = 18 + Left = 8 Top = 99 Width = 180 - Height = 219 + Height = 276 Anchors = [akLeft, akTop, akBottom] ItemHeight = 13 TabOrder = 1 + ExplicitHeight = 219 end object btnFilterBetween: TButton - Left = 390 + Left = 380 Top = 63 Width = 75 Height = 30 @@ -71,16 +74,17 @@ object MainForm: TMainForm OnClick = btnFilterBetwenClick end object lbFilter: TListBox - Left = 390 + Left = 380 Top = 99 Width = 180 - Height = 219 + Height = 276 Anchors = [akLeft, akTop, akBottom] ItemHeight = 13 TabOrder = 3 + ExplicitHeight = 219 end object btnReduceSum: TButton - Left = 204 + Left = 194 Top = 27 Width = 77 Height = 30 @@ -89,16 +93,17 @@ object MainForm: TMainForm OnClick = btnReduceSumClick end object lbReduce: TListBox - Left = 204 + Left = 194 Top = 99 Width = 180 - Height = 219 + Height = 276 Anchors = [akLeft, akTop, akBottom] ItemHeight = 13 TabOrder = 5 + ExplicitHeight = 219 end object btnReduceMin: TButton - Left = 204 + Left = 194 Top = 63 Width = 77 Height = 30 @@ -107,7 +112,7 @@ object MainForm: TMainForm OnClick = btnReduceMinClick end object btnReduceMul: TButton - Left = 287 + Left = 277 Top = 27 Width = 77 Height = 30 @@ -116,7 +121,7 @@ object MainForm: TMainForm OnClick = btnReduceMulClick end object btnReduceMax: TButton - Left = 287 + Left = 277 Top = 63 Width = 77 Height = 30 @@ -125,7 +130,7 @@ object MainForm: TMainForm OnClick = btnReduceMaxClick end object btnFilterOdd: TButton - Left = 390 + Left = 380 Top = 27 Width = 75 Height = 30 @@ -135,7 +140,7 @@ object MainForm: TMainForm OnClick = btnFilterOddClick end object btnFilterEven: TButton - Left = 471 + Left = 461 Top = 27 Width = 82 Height = 30 @@ -145,7 +150,7 @@ object MainForm: TMainForm OnClick = btnFilterEvenClick end object btnMapCapitalize: TButton - Left = 18 + Left = 8 Top = 63 Width = 95 Height = 30 @@ -154,7 +159,7 @@ object MainForm: TMainForm OnClick = btnMapCapitalizeClick end object btnJustLoop: TButton - Left = 576 + Left = 566 Top = 27 Width = 180 Height = 30 @@ -163,16 +168,17 @@ object MainForm: TMainForm OnClick = btnJustLoopClick end object lbForEach: TListBox - Left = 576 + Left = 566 Top = 99 Width = 180 - Height = 219 + Height = 276 Anchors = [akLeft, akTop, akBottom] ItemHeight = 13 TabOrder = 13 + ExplicitHeight = 219 end object btnForEachWithException: TButton - Left = 576 + Left = 566 Top = 63 Width = 180 Height = 30 diff --git a/samples/functional_programming/MainFormU.pas b/samples/higher_order_functions/MainFormU.pas similarity index 89% rename from samples/functional_programming/MainFormU.pas rename to samples/higher_order_functions/MainFormU.pas index a7bec445..36c68227 100644 --- a/samples/functional_programming/MainFormU.pas +++ b/samples/higher_order_functions/MainFormU.pas @@ -28,7 +28,7 @@ interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, - Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, MVCFramework.Functional; + Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, MVCFramework.Utils; type TMainForm = class(TForm) @@ -107,18 +107,17 @@ begin Result[9] := 'mary'; end; - procedure TMainForm.btnFilterBetwenClick(Sender: TObject); var InputData, OutputData: TArray; - FilterFunc: TPredicate; + FilterFunc: TPredicateClosure; begin InputData := GetIntArrayOfData; FilterFunc := function(const Item: Integer): boolean begin Result := (Item > 2) and (Item < 8) end; - OutputData := Functional.Filter(InputData, FilterFunc); + OutputData := HigherOrder.Filter(InputData, FilterFunc); FillList(OutputData, lbFilter.Items); end; @@ -127,7 +126,7 @@ var InputData, OutputData: TArray; begin InputData := GetIntArrayOfData; - OutputData := Functional.Filter(InputData, + OutputData := HigherOrder.Filter(InputData, function(const Item: Integer): boolean begin Result := Item mod 2 = 0; @@ -140,7 +139,7 @@ var InputData, OutputData: TArray; begin InputData := GetIntArrayOfData; - OutputData := Functional.Filter(InputData, + OutputData := HigherOrder.Filter(InputData, function(const Item: Integer): boolean begin Result := Item mod 2 > 0; @@ -151,7 +150,7 @@ end; procedure TMainForm.btnForEachWithExceptionClick(Sender: TObject); begin lbForEach.Clear; - Functional.ForEach(GetIntArrayOfData, + HigherOrder.ForEach(GetIntArrayOfData, procedure(const Item: Integer) begin if Item = 5 then @@ -164,7 +163,7 @@ end; procedure TMainForm.btnJustLoopClick(Sender: TObject); begin lbForEach.Clear; - Functional.ForEach(GetStringArrayOfData, + HigherOrder.ForEach(GetStringArrayOfData, procedure(const Item: String) begin lbForEach.Items.Add(Item); @@ -176,7 +175,7 @@ var InputData, OutputData: TArray; begin InputData := GetStringArrayOfData; - OutputData := Functional.Map(InputData, + OutputData := HigherOrder.Map(InputData, function(const Item: String): String begin Result := '*' + Item + '*'; @@ -189,7 +188,7 @@ var InputData, OutputData: TArray; begin InputData := GetStringArrayOfData; - OutputData := Functional.Map(InputData, + OutputData := HigherOrder.Map(InputData, function(const Item: String): String begin Result := String(Item.Chars[0]).ToUpper + Item.Substring(1); @@ -203,7 +202,7 @@ var OutputData: Integer; begin InputData := GetIntArrayOfData; - OutputData := Functional.Reduce(InputData, + OutputData := HigherOrder.Reduce(InputData, function(const Item1, Item2: Integer): Integer begin if Item1 > Item2 then @@ -220,7 +219,7 @@ var OutputData: Integer; begin InputData := GetIntArrayOfData; - OutputData := Functional.Reduce(InputData, + OutputData := HigherOrder.Reduce(InputData, function(const Item1, Item2: Integer): Integer begin if Item1 < Item2 then @@ -237,7 +236,7 @@ var OutputData: Integer; begin InputData := GetIntArrayOfData; - OutputData := Functional.Reduce(InputData, + OutputData := HigherOrder.Reduce(InputData, function(const Item1, Item2: Integer): Integer begin Result := Item1 * Item2; @@ -251,7 +250,7 @@ var OutputData: Integer; begin InputData := GetIntArrayOfData; - OutputData := Functional.Reduce(InputData, + OutputData := HigherOrder.Reduce(InputData, function(const Item1, Item2: Integer): Integer begin Result := Item1 + Item2; @@ -261,21 +260,21 @@ end; procedure TMainForm.FillList(Data: TArray; AStrings: TStrings); var - I: Integer; + lItem: Integer; begin AStrings.Clear; - for I in Data do - AStrings.Add(I.ToString); + for lItem in Data do + AStrings.Add(lItem.ToString); end; procedure TMainForm.FillList(Data: TArray; AStrings: TStrings); var - s: string; + lItem: string; begin AStrings.Clear; - for s in Data do - AStrings.Add(s); + for lItem in Data do + AStrings.Add(lItem); end; end. diff --git a/sources/MVCFramework.Functional.pas b/sources/MVCFramework.Functional.pas deleted file mode 100644 index 9b66a826..00000000 --- a/sources/MVCFramework.Functional.pas +++ /dev/null @@ -1,160 +0,0 @@ -// *************************************************************************** -// -// Delphi MVC Framework -// -// Copyright (c) 2010-2024 Daniele Teti and the DMVCFramework Team -// -// https://github.com/danieleteti/delphimvcframework -// -// *************************************************************************** -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// *************************************************************************** } - -unit MVCFramework.Functional; - -interface - -uses - System.SysUtils, System.Classes; - - -type - EFunctionalError = class(Exception) - - end; - EFunctionalMapError = class(EFunctionalError) - - end; - - EFunctionalFilterError = class(EFunctionalError) - - end; - - EFunctionalForEachError = class(EFunctionalError) - - end; - - EFunctionalReduceError = class(EFunctionalError) - - end; - - TMapClosure = reference to function(const Item: T): T; - TForEachClosure = reference to procedure(const Item: T); - TMapReduce = reference to function(const Left: T; const Right: T): T; - TPredicate = reference to function(const Item: T): Boolean; - Functional = class sealed - class function Map(InputArray: TArray; MapClosure: TMapClosure): TArray; - class function Reduce(InputArray: TArray; ReduceFunction: TMapReduce; InitValue: T): T; - class function Filter(InputArray: TArray; FilterFunction: TPredicate): TArray; - class procedure ForEach(InputArray: TArray; ForEachClosure: TForEachClosure); - end; - -implementation - -uses - System.Generics.Collections; - -{ Functional } - -class function Functional.Filter(InputArray: TArray; FilterFunction: TPredicate): TArray; -var - lIdx, I: Integer; - List: TList; -begin - lIdx := -1; - try - List := TList.Create; - try - for I := 0 to length(InputArray) - 1 do - begin - lIdx := I; - if FilterFunction(InputArray[I]) then - begin - List.add(InputArray[I]); - end; - end; - Result := List.ToArray; - finally - List.Free; - end; - except - on E: Exception do - begin - raise EFunctionalFilterError.CreateFmt('Filter error at index %d - [Class: %s][Message: %s]', [lIdx, E.ClassName, E.Message]); - end; - end; -end; - -class procedure Functional.ForEach(InputArray: TArray; ForEachClosure: TForEachClosure); -var - I, lIdx: Integer; -begin - lIdx := 0; - try - for I := Low(InputArray) to High(InputArray) do - begin - lIdx := I; - ForEachClosure(InputArray[I]); - end; - except - on E: Exception do - begin - raise EFunctionalForEachError.CreateFmt('ForEach error at index %d - [Class: %s][Message: %s]', [lIdx, E.ClassName, E.Message]); - end; - end; -end; - -class function Functional.Map(InputArray: TArray; MapClosure: TMapClosure): TArray; -var - lIdx, I: Integer; -begin - lIdx := 0; - try - SetLength(Result, Length(InputArray)); - for I := 0 to length(InputArray) - 1 do - begin - lIdx := I; - Result[I] := MapClosure(InputArray[I]); - end; - except - on E: Exception do - begin - raise EFunctionalMapError.CreateFmt('Map error at index %d - [Class: %s][Message: %s]', [lIdx, E.ClassName, E.Message]); - end; - end; -end; - -class function Functional.Reduce(InputArray: TArray; ReduceFunction: TMapReduce; InitValue: T): T; -var - I: T; - lIdx: Integer; -begin - lIdx := 0; - Result := InitValue; - try - for I in InputArray do - begin - Result := ReduceFunction(Result, I); - Inc(lIdx); - end; - except - on E: Exception do - begin - raise EFunctionalReduceError.CreateFmt('Reduce error at index %d - [Class: %s][Message: %s]', [lIdx, E.ClassName, E.Message]); - end; - end; -end; - -end. diff --git a/sources/MVCFramework.Utils.pas b/sources/MVCFramework.Utils.pas index cdc1f739..628fa5aa 100644 --- a/sources/MVCFramework.Utils.pas +++ b/sources/MVCFramework.Utils.pas @@ -29,18 +29,54 @@ unit MVCFramework.Utils; interface uses - MVCFramework.Serializer.Commons, JsonDataObjects, MVCFramework.DuckTyping, - System.Classes; + MVCFramework.Serializer.Commons, JsonDataObjects, + MVCFramework.DuckTyping, System.Classes, System.SysUtils; +type + EHOError = class(Exception) + + end; + + EHOMapError = class(EHOError) + + end; + + EHOFilterError = class(EHOError) + + end; + + EHOForEachError = class(EHOError) + + end; + + EHOReduceError = class(EHOError) + + end; + + TMapClosure = reference to function(const Item: T): T; + TForEachClosure = reference to procedure(const Item: T); + TMapReduceClosure = reference to function(const Left: T; const Right: T): T; + TPredicateClosure = reference to function(const Item: T): Boolean; + + HigherOrder = class sealed + class function Map(const InputArray: TArray; + const MapClosure: TMapClosure): TArray; + class function Reduce(const InputArray: TArray; + const ReduceFunction: TMapReduceClosure; InitValue: T): T; + class function Filter(const InputArray: TArray; + const FilterFunction: TPredicateClosure): TArray; + class procedure ForEach(const InputArray: TArray; + const ForEachClosure: TForEachClosure); + end; function NewJSONSerializer: IMVCJSONSerializer; -function StrToJSONObject(const aString: String; ARaiseExceptionOnError: Boolean = False): TJsonObject; -function StrToJSONArray(const aString: String; ARaiseExceptionOnError: Boolean = False): TJsonArray; -function WrapAsList(const AObject: TObject; AOwnsObject: Boolean = False): IMVCList; -function GetMD5HashFromStream(AStream: TStream): string; -function GetMD5HashFromString(const AString: String): string; -function GetSHA1HashFromString(const AString: String): string; -function GetSHA1HashFromStream(AStream: TStream): string; +function StrToJSONObject(const aString: String; aRaiseExceptionOnError: Boolean = False): TJsonObject; +function StrToJSONArray(const aString: String; aRaiseExceptionOnError: Boolean = False): TJsonArray; +function WrapAsList(const aObject: TObject; const aOwnsObject: Boolean = False): IMVCList; +function GetMD5HashFromStream(const aStream: TStream): string; +function GetMD5HashFromString(const aString: String): string; +function GetSHA1HashFromString(const aString: String): string; +function GetSHA1HashFromStream(const aStream: TStream): string; implementation @@ -51,77 +87,77 @@ uses IdHashMessageDigest, IdHashSHA, {$ENDIF} + System.Generics.Collections, MVCFramework.Serializer.JsonDataObjects, MVCFramework.Commons, - System.SysUtils, System.TypInfo; -function GetMD5HashFromStream(AStream: TStream): string; +function GetMD5HashFromStream(const aStream: TStream): string; {$IF not defined(TOKYOORBETTER)} var lMD5Hash: TIdHashMessageDigest5; {$ENDIF} begin {$IF defined(TOKYOORBETTER)} - Result := THashMD5.GetHashString(AStream); + Result := THashMD5.GetHashString(aStream); {$ELSE} lMD5Hash := TIdHashMessageDigest5.Create; try - Result := lMD5Hash.HashStreamAsHex(AStream); + Result := lMD5Hash.HashStreamAsHex(aStream); finally lMD5Hash.Free; end; {$ENDIF} end; -function GetSHA1HashFromStream(AStream: TStream): string; +function GetSHA1HashFromStream(const aStream: TStream): string; {$IF not defined(TOKYOORBETTER)} var lSHA1Hash: TIdHashSHA1; {$ENDIF} begin {$IF defined(TOKYOORBETTER)} - Result := THashSHA1.GetHashString(AStream); + Result := THashSHA1.GetHashString(aStream); {$ELSE} lSHA1Hash := TIdHashSHA1.Create; try - Result := lSHA1Hash.HashStreamAsHex(AStream); + Result := lSHA1Hash.HashStreamAsHex(aStream); finally lSHA1Hash.Free; end; {$ENDIF} end; -function GetMD5HashFromString(const AString: String): string; +function GetMD5HashFromString(const aString: String): string; {$IF not defined(TOKYOORBETTER)} var lMD5Hash: TIdHashMessageDigest5; {$ENDIF} begin {$IF defined(TOKYOORBETTER)} - Result := THashMD5.GetHashString(AString); + Result := THashMD5.GetHashString(aString); {$ELSE} lMD5Hash := TIdHashMessageDigest5.Create; try - Result := lMD5Hash.HashStringAsHex(AString); + Result := lMD5Hash.HashStringAsHex(aString); finally lMD5Hash.Free; end; {$ENDIF} end; -function GetSHA1HashFromString(const AString: String): string; +function GetSHA1HashFromString(const aString: String): string; {$IF not defined(TOKYOORBETTER)} var lSHA1Hash: TIdHashSHA1; {$ENDIF} begin {$IF defined(TOKYOORBETTER)} - Result := THashSHA1.GetHashString(AString); + Result := THashSHA1.GetHashString(aString); {$ELSE} lSHA1Hash := TIdHashSHA1.Create; try - Result := lSHA1Hash.HashStringAsHex(AString); + Result := lSHA1Hash.HashStringAsHex(aString); finally lSHA1Hash.Free; end; @@ -134,19 +170,122 @@ begin Result := TMVCJsonDataObjectsSerializer.Create; end; -function StrToJSONObject(const aString: String; ARaiseExceptionOnError: Boolean = False): TJsonObject; +function StrToJSONObject(const aString: String; aRaiseExceptionOnError: Boolean = False): TJsonObject; begin - Result := MVCFramework.Serializer.JSONDataObjects.StrToJSONObject(aString, ARaiseExceptionOnError); + Result := MVCFramework.Serializer.JSONDataObjects.StrToJSONObject(aString, aRaiseExceptionOnError); end; -function StrToJSONArray(const aString: String; ARaiseExceptionOnError: Boolean = False): TJsonArray; +function StrToJSONArray(const aString: String; aRaiseExceptionOnError: Boolean = False): TJsonArray; begin - Result := MVCFramework.Serializer.JSONDataObjects.StrToJSONArray(aString, ARaiseExceptionOnError); + Result := MVCFramework.Serializer.JSONDataObjects.StrToJSONArray(aString, aRaiseExceptionOnError); end; -function WrapAsList(const AObject: TObject; AOwnsObject: Boolean = False): IMVCList; +function WrapAsList(const aObject: TObject; const aOwnsObject: Boolean = False): IMVCList; begin - Result := MVCFramework.DuckTyping.WrapAsList(AObject, AOwnsObject); + Result := MVCFramework.DuckTyping.WrapAsList(aObject, aOwnsObject); +end; + +{ HigherOrder } + +class function HigherOrder.Filter(const InputArray: TArray; + const FilterFunction: TPredicateClosure): TArray; +var + lIdx, I: Integer; + lList: TList; +begin + lIdx := -1; + try + lList := TList.Create; + try + for I := 0 to Length(InputArray) - 1 do + begin + lIdx := I; + if FilterFunction(InputArray[I]) then + begin + lList.add(InputArray[I]); + end; + end; + Result := lList.ToArray; + finally + lList.Free; + end; + except + on E: Exception do + begin + raise EHOFilterError.CreateFmt + ('Filter error at index %d - [Class: %s][Message: %s]', + [lIdx, E.ClassName, E.Message]); + end; + end; +end; + +class procedure HigherOrder.ForEach(const InputArray: TArray; + const ForEachClosure: TForEachClosure); +var + I, lIdx: Integer; +begin + lIdx := 0; + try + for I := Low(InputArray) to High(InputArray) do + begin + lIdx := I; + ForEachClosure(InputArray[I]); + end; + except + on E: Exception do + begin + raise EHOForEachError.CreateFmt + ('ForEach error at index %d - [Class: %s][Message: %s]', + [lIdx, E.ClassName, E.Message]); + end; + end; +end; + +class function HigherOrder.Map(const InputArray: TArray; + const MapClosure: TMapClosure): TArray; +var + lIdx, I: Integer; +begin + lIdx := 0; + try + SetLength(Result, Length(InputArray)); + for I := 0 to Length(InputArray) - 1 do + begin + lIdx := I; + Result[I] := MapClosure(InputArray[I]); + end; + except + on E: Exception do + begin + raise EHOMapError.CreateFmt + ('Map error at index %d - [Class: %s][Message: %s]', + [lIdx, E.ClassName, E.Message]); + end; + end; +end; + +class function HigherOrder.Reduce(const InputArray: TArray; + const ReduceFunction: TMapReduceClosure; InitValue: T): T; +var + I: T; + lIdx: Integer; +begin + lIdx := 0; + Result := InitValue; + try + for I in InputArray do + begin + Result := ReduceFunction(Result, I); + Inc(lIdx); + end; + except + on E: Exception do + begin + raise EHOReduceError.CreateFmt + ('Reduce error at index %d - [Class: %s][Message: %s]', + [lIdx, E.ClassName, E.Message]); + end; + end; end; end.